* symtab.c (symbol_init_cplus_specific, symbol_set_demangled_name):
authorTom Tromey <tromey@redhat.com>
Mon, 8 Apr 2013 19:53:18 +0000 (19:53 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 8 Apr 2013 19:53:18 +0000 (19:53 +0000)
Take an obstack, not an objfile.
(symbol_set_names): Update.
* symtab.h (symbol_set_demangled_name): Update.

gdb/ChangeLog
gdb/symtab.c
gdb/symtab.h

index 174abc547fdbb18d91f985de422151da1b1bb5a7..17772f96479566eb89ea45b76a6bd03efd447c65 100644 (file)
@@ -1,3 +1,10 @@
+2013-04-08  Tom Tromey  <tromey@redhat.com>
+
+       * symtab.c (symbol_init_cplus_specific, symbol_set_demangled_name):
+       Take an obstack, not an objfile.
+       (symbol_set_names): Update.
+       * symtab.h (symbol_set_demangled_name): Update.
+
 2013-04-08  Tom Tromey  <tromey@redhat.com>
 
        * coffread.c (process_coff_symbol, coff_read_enum_type): Call
index c50e895a57c1ca38f2742b2b598f08863830657c..d56faa6b96acf646d2ad696590b99532c10f2c95 100644 (file)
@@ -420,15 +420,15 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
 
 static void
 symbol_init_cplus_specific (struct general_symbol_info *gsymbol,
-                           struct objfile *objfile)
+                           struct obstack *obstack)
 {
   /* A language_specific structure should not have been previously
      initialized.  */
   gdb_assert (gsymbol->language_specific.cplus_specific == NULL);
-  gdb_assert (objfile != NULL);
+  gdb_assert (obstack != NULL);
 
   gsymbol->language_specific.cplus_specific =
-      OBSTACK_ZALLOC (&objfile->objfile_obstack, struct cplus_specific);
+    OBSTACK_ZALLOC (obstack, struct cplus_specific);
 }
 
 /* Set the demangled name of GSYMBOL to NAME.  NAME must be already
@@ -439,12 +439,12 @@ symbol_init_cplus_specific (struct general_symbol_info *gsymbol,
 void
 symbol_set_demangled_name (struct general_symbol_info *gsymbol,
                            const char *name,
-                           struct objfile *objfile)
+                           struct obstack *obstack)
 {
   if (gsymbol->language == language_cplus)
     {
       if (gsymbol->language_specific.cplus_specific == NULL)
-       symbol_init_cplus_specific (gsymbol, objfile);
+       symbol_init_cplus_specific (gsymbol, obstack);
 
       gsymbol->language_specific.cplus_specific->demangled_name = name;
     }
@@ -791,9 +791,10 @@ symbol_set_names (struct general_symbol_info *gsymbol,
 
   gsymbol->name = (*slot)->mangled + lookup_len - len;
   if ((*slot)->demangled[0] != '\0')
-    symbol_set_demangled_name (gsymbol, (*slot)->demangled, objfile);
+    symbol_set_demangled_name (gsymbol, (*slot)->demangled,
+                              &objfile->objfile_obstack);
   else
-    symbol_set_demangled_name (gsymbol, NULL, objfile);
+    symbol_set_demangled_name (gsymbol, NULL, &objfile->objfile_obstack);
 }
 
 /* Return the source code name of a symbol.  In languages where
index b86c1187578c7a5650ebdfc3b7408d0e5e9749f2..7c27bf927b049c0b7dc68bed40bc5b0f91fcd63f 100644 (file)
@@ -169,7 +169,7 @@ struct general_symbol_info
 
 extern void symbol_set_demangled_name (struct general_symbol_info *,
                                       const char *,
-                                       struct objfile *);
+                                       struct obstack *);
 
 extern const char *symbol_get_demangled_name
   (const struct general_symbol_info *);