aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:48:30 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:48:30 +0000
commite623cf5da2730784a9062aa7ac9d6c2db37c061d (patch)
tree0d60cf4ef378d9e6a345d2cdac3251a24dc5f27b /gdb/dwarf2read.c
parent5f77db5271f164aec794974ebfc986d8122e71b3 (diff)
downloadgdb-e623cf5da2730784a9062aa7ac9d6c2db37c061d.zip
gdb-e623cf5da2730784a9062aa7ac9d6c2db37c061d.tar.gz
gdb-e623cf5da2730784a9062aa7ac9d6c2db37c061d.tar.bz2
* coffread.c (process_coff_symbol, coff_read_enum_type): Call
allocate_symbol. * dwarf2read.c (fixup_go_packaging): Call allocate_symbol. (read_func_scope): Call allocate_template_symbol. (new_symbol_full): Call allocate_symbol. * jit.c (finalize_symtab): Call allocate_symbol. * jv-lang.c (add_class_symbol): Call allocate_symbol. * mdebugread.c (parse_symbol, new_block): Call allocate_symbol. * stabsread.c (patch_block_stabs, define_symbol, read_enum_type) (common_block_end): Call allocate_symbol. * symtab.c (allocate_symbol, initialize_symbol) (allocate_template_symbol): New functions. * symtab.c (allocate_symbol, initialize_symbol) (allocate_template_symbol): Declare. * xcoffread.c (process_xcoff_symbol): Call initialize_symbol.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 30efacf..76a32b6 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -6952,7 +6952,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
TYPE_TAG_NAME (type) = TYPE_NAME (type);
- sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
+ sym = allocate_symbol (objfile);
SYMBOL_SET_LANGUAGE (sym, language_go);
SYMBOL_SET_NAMES (sym, saved_package_name,
strlen (saved_package_name), 0, objfile);
@@ -9639,8 +9639,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
if (child_die->tag == DW_TAG_template_type_param
|| child_die->tag == DW_TAG_template_value_param)
{
- templ_func = OBSTACK_ZALLOC (&objfile->objfile_obstack,
- struct template_symbol);
+ templ_func = allocate_template_symbol (objfile);
templ_func->base.is_cplus_template_function = 1;
break;
}
@@ -15972,7 +15971,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
if (space)
sym = space;
else
- sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
+ sym = allocate_symbol (objfile);
OBJSTAT (objfile, n_syms++);
/* Cache this symbol's name and the name's demangled form (if any). */