* utils.c (strcmp_iw): Add a hack to allow "FOO(ARGS)" to
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index 9b30c0fb4dc657874a57da494b00339419da6e99..278aa4490b8474928570e94794fb2388b82ca526 100644 (file)
@@ -95,7 +95,7 @@ allocate_objfile (abfd, mapped)
       if (((mapto = map_to_address ()) == 0) ||
          ((md = mmalloc_attach (fd, (void *) mapto)) == NULL))
        {
-         (void) close (fd);
+         close (fd);
        }
       else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
        {
@@ -121,20 +121,20 @@ allocate_objfile (abfd, mapped)
             the first malloc.  See comments in init_malloc() and mmcheck(). */
          init_malloc (md);
          objfile = (struct objfile *) xmmalloc (md, sizeof (struct objfile));
-         (void) memset (objfile, 0, sizeof (struct objfile));
+         memset (objfile, 0, sizeof (struct objfile));
          objfile -> md = md;
          objfile -> mmfd = fd;
          objfile -> flags |= OBJF_MAPPED;
          mmalloc_setkey (objfile -> md, 0, objfile);
-         obstack_full_begin (&objfile -> psymbol_obstack, 0, 0,
-                             xmmalloc, mfree, objfile -> md,
-                             OBSTACK_MMALLOC_LIKE);
-         obstack_full_begin (&objfile -> symbol_obstack, 0, 0,
-                             xmmalloc, mfree, objfile -> md,
-                             OBSTACK_MMALLOC_LIKE);
-         obstack_full_begin (&objfile -> type_obstack, 0, 0,
-                             xmmalloc, mfree, objfile -> md,
-                             OBSTACK_MMALLOC_LIKE);
+         obstack_specify_allocation_with_arg (&objfile -> psymbol_obstack,
+                                              0, 0, xmmalloc, mfree,
+                                              objfile -> md);
+         obstack_specify_allocation_with_arg (&objfile -> symbol_obstack,
+                                              0, 0, xmmalloc, mfree,
+                                              objfile -> md);
+         obstack_specify_allocation_with_arg (&objfile -> type_obstack,
+                                              0, 0, xmmalloc, mfree,
+                                              objfile -> md);
        }
     }
 
@@ -166,15 +166,14 @@ allocate_objfile (abfd, mapped)
   if (objfile == NULL)
     {
       objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
-      (void) memset (objfile, 0, sizeof (struct objfile));
+      memset (objfile, 0, sizeof (struct objfile));
       objfile -> md = NULL;
-      obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free,
-                         (void *) 0, 0);
-      obstack_full_begin (&objfile -> symbol_obstack, 0, 0, xmalloc, free,
-                         (void *) 0, 0);
-      obstack_full_begin (&objfile -> type_obstack, 0, 0, xmalloc, free,
-                         (void *) 0, 0);
-
+      obstack_specify_allocation (&objfile -> psymbol_obstack, 0, 0, xmalloc,
+                                 free);
+      obstack_specify_allocation (&objfile -> symbol_obstack, 0, 0, xmalloc,
+                                 free);
+      obstack_specify_allocation (&objfile -> type_obstack, 0, 0, xmalloc,
+                                 free);
     }
 
   /* Update the per-objfile information that comes from the bfd, ensuring
@@ -248,7 +247,6 @@ void
 free_objfile (objfile)
      struct objfile *objfile;
 {
-  struct objfile *ofp;
   int mmfd;
 
   /* First do any symbol file specific actions required when we are
@@ -303,7 +301,7 @@ free_objfile (objfile)
       mmfd = objfile -> mmfd;
       mmalloc_detach (objfile -> md);
       objfile = NULL;
-      (void) close (mmfd);
+      close (mmfd);
     }
 
 #endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
@@ -437,7 +435,8 @@ open_existing_mapped_file (symsfilename, mtime, mapped)
        {
          if (!mapped)
            {
-             warning ("mapped symbol file `%s' is out of date", symsfilename);
+             warning ("mapped symbol file `%s' is out of date, ignored it",
+                      symsfilename);
            }
        }
       else if ((fd = open (symsfilename, O_RDWR)) < 0)
@@ -570,4 +569,3 @@ map_to_address ()
 }
 
 #endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
-
This page took 0.03109 seconds and 4 git commands to generate.