* 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.
This commit is contained in:
parent
5f77db5271
commit
e623cf5da2
10 changed files with 76 additions and 44 deletions
36
gdb/symtab.c
36
gdb/symtab.c
|
@ -5119,6 +5119,42 @@ initialize_ordinary_address_classes (void)
|
|||
|
||||
|
||||
|
||||
/* Initialize the symbol SYM. */
|
||||
|
||||
void
|
||||
initialize_symbol (struct symbol *sym)
|
||||
{
|
||||
memset (sym, 0, sizeof (*sym));
|
||||
}
|
||||
|
||||
/* Allocate and initialize a new 'struct symbol' on OBJFILE's
|
||||
obstack. */
|
||||
|
||||
struct symbol *
|
||||
allocate_symbol (struct objfile *objfile)
|
||||
{
|
||||
struct symbol *result;
|
||||
|
||||
result = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Allocate and initialize a new 'struct template_symbol' on OBJFILE's
|
||||
obstack. */
|
||||
|
||||
struct template_symbol *
|
||||
allocate_template_symbol (struct objfile *objfile)
|
||||
{
|
||||
struct template_symbol *result;
|
||||
|
||||
result = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct template_symbol);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
_initialize_symtab (void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue