aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-05-15 16:11:33 -0600
committerTom Tromey <tom@tromey.com>2020-05-15 16:11:34 -0600
commit8c14c3a3735d7de43e63710b2cd3a2e89cc4e243 (patch)
tree2fe8466fc509fbb3ddf291c3216c1a22aae7a129 /gdb/mdebugread.c
parent5b4a1a8dbe6b15414c586d8fc6dbaecdcf4046f3 (diff)
downloadgdb-8c14c3a3735d7de43e63710b2cd3a2e89cc4e243.zip
gdb-8c14c3a3735d7de43e63710b2cd3a2e89cc4e243.tar.gz
gdb-8c14c3a3735d7de43e63710b2cd3a2e89cc4e243.tar.bz2
Remove allocate_symbol et al
This removes allocate_symbol, allocate_template_symbol, and initialize_objfile_symbol in favor of changing the default values for symbol members, and updating the one per-arch caller. gdb/ChangeLog 2020-05-15 Tom Tromey <tom@tromey.com> * language.c (language_alloc_type_symbol): Set SYMBOL_SECTION. * symtab.c (initialize_objfile_symbol): Remove. (allocate_symbol): Remove. (allocate_template_symbol): Remove. * dwarf2/read.c (fixup_go_packaging): Use "new". (new_symbol): Use "new". (read_variable): Don't call initialize_objfile_symbol. Use "new". (read_func_scope): Use "new". * xcoffread.c (process_xcoff_symbol): Don't call initialize_objfile_symbol. (SYMBOL_DUP): Remove. * coffread.c (process_coff_symbol, coff_read_enum_type): Use "new". * symtab.h (allocate_symbol, initialize_objfile_symbol) (allocate_template_symbol): Don't declare. (struct symbol): Add copy constructor. Change defaults. * jit.c (finalize_symtab): Use "new". * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb): Use "new". * stabsread.c (patch_block_stabs, define_symbol, read_enum_type) (common_block_end): Use "new". * mdebugread.c (parse_symbol): Use "new". (new_symbol): Likewise.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index eab52c7..ba53512 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1056,7 +1056,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
FIELD_NAME (*f) = debug_info->ss + cur_fdr->issBase + tsym.iss;
FIELD_BITSIZE (*f) = 0;
- enum_sym = allocate_symbol (mdebugread_objfile);
+ enum_sym = new (&mdebugread_objfile->objfile_obstack) symbol;
enum_sym->set_linkage_name
(obstack_strdup (&mdebugread_objfile->objfile_obstack,
f->name));
@@ -4721,7 +4721,7 @@ new_block (enum block_type type, enum language language)
static struct symbol *
new_symbol (const char *name)
{
- struct symbol *s = allocate_symbol (mdebugread_objfile);
+ struct symbol *s = new (&mdebugread_objfile->objfile_obstack) symbol;
s->set_language (psymtab_language, &mdebugread_objfile->objfile_obstack);
s->compute_and_set_names (name, true, mdebugread_objfile->per_bfd);