+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
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
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;
}
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