aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.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/coffread.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/coffread.c')
-rw-r--r--gdb/coffread.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index eff8d64..b5ad8c2 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1581,12 +1581,9 @@ process_coff_symbol (struct coff_symbol *cs,
union internal_auxent *aux,
struct objfile *objfile)
{
- struct symbol *sym
- = (struct symbol *) obstack_alloc (&objfile->objfile_obstack,
- sizeof (struct symbol));
+ struct symbol *sym = allocate_symbol (objfile);
char *name;
- memset (sym, 0, sizeof (struct symbol));
name = cs->c_name;
name = EXTERNAL_NAME (name, objfile->obfd);
SYMBOL_SET_LANGUAGE (sym, current_subfile->language);
@@ -2142,9 +2139,7 @@ coff_read_enum_type (int index, int length, int lastsym,
switch (ms->c_sclass)
{
case C_MOE:
- sym = (struct symbol *) obstack_alloc
- (&objfile->objfile_obstack, sizeof (struct symbol));
- memset (sym, 0, sizeof (struct symbol));
+ sym = allocate_symbol (objfile);
SYMBOL_SET_LINKAGE_NAME (sym,
obstack_copy0 (&objfile->objfile_obstack,