aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:53:18 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:53:18 +0000
commitccde22c0a47c50f54635b7b9fcbf5ddc19cdf9ca (patch)
tree65f2ffd2ee6c9fe3d6d0ece522470aa30f8e5af3
parente623cf5da2730784a9062aa7ac9d6c2db37c061d (diff)
downloadgdb-ccde22c0a47c50f54635b7b9fcbf5ddc19cdf9ca.zip
gdb-ccde22c0a47c50f54635b7b9fcbf5ddc19cdf9ca.tar.gz
gdb-ccde22c0a47c50f54635b7b9fcbf5ddc19cdf9ca.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/symtab.c15
-rw-r--r--gdb/symtab.h2
3 files changed, 16 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 174abc5..17772f9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
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
allocate_symbol.
* dwarf2read.c (fixup_go_packaging): Call allocate_symbol.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c50e895..d56faa6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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
diff --git a/gdb/symtab.h b/gdb/symtab.h
index b86c118..7c27bf9 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -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 *);