Make struct symbol inherit from general_symbol_info
authorChristian Biesinger <cbiesinger@google.com>
Mon, 4 Nov 2019 19:12:09 +0000 (13:12 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 12 Nov 2019 21:21:35 +0000 (15:21 -0600)
commit468c0cbb327fadf28386a989f929fcbed4aed8b9
treedf5e63c82ad35603b4fbc8716e72dd417176601e
parented2c82c364043cf4726541cc7e8011197185b3f8
Make struct symbol inherit from general_symbol_info

Since this is now no longer a POD, also give it a constructor that
initializes all fields. (I have considered overloading operator new
to zero-initialize the memory instead; let me know if you prefer that)

gdb/ChangeLog:

2019-11-12  Christian Biesinger  <cbiesinger@google.com>

* ada-exp.y (write_ambiguous_var): Update.
* buildsym.c (add_symbol_to_list): Update.
* dwarf2read.c (read_variable): Update.
(new_symbol): Update.
* jit.c (finalize_symtab): Update.
* language.c (language_alloc_type_symbol): Update.
* symtab.c (fixup_symbol_section): Update.
(initialize_objfile_symbol_1): Move code to...
(initialize_objfile_symbol): ...here. Remove now-unnecessary memset.
(allocate_symbol): Update.
(allocate_template_symbol): Update.
(get_symbol_address): Update.
* symtab.h (struct symbol): Inherit from general_symbol_info instead
of having as a field, and add a constructor.
(SYMBOL_VALUE): Update.
(SYMBOL_VALUE_ADDRESS): Update.
(SET_SYMBOL_VALUE_ADDRESS): Update.
(SYMBOL_VALUE_BYTES): Update.
(SYMBOL_VALUE_COMMON_BLOCK): Update.
(SYMBOL_BLOCK_VALUE): Update.
(SYMBOL_VALUE_CHAIN): Update.
(SYMBOL_LANGUAGE): Update.
(SYMBOL_SECTION): Update.
(SYMBOL_OBJ_SECTION): Update.
(SYMBOL_SET_LANGUAGE): Update.
(SYMBOL_SET_LINKAGE_NAME): Update.
(SYMBOL_SET_NAMES): Update.
(SYMBOL_NATURAL_NAME): Update.
(SYMBOL_LINKAGE_NAME): Update.
(SYMBOL_DEMANGLED_NAME): Update.
(SYMBOL_SEARCH_NAME): Update.
(SYMBOL_MATCHES_SEARCH_NAME): Update.
(struct symbol): Update.
(struct template_symbol): Update.
(struct rust_vtable_symbol): Update.
* xcoffread.c (SYMBOL_DUP): Update.

Change-Id: I05b1628455bcce3efaa101e65ef051708d17eb07
gdb/ChangeLog
gdb/ada-exp.y
gdb/buildsym.c
gdb/dwarf2read.c
gdb/jit.c
gdb/language.c
gdb/symtab.c
gdb/symtab.h
gdb/xcoffread.c
This page took 0.024934 seconds and 4 git commands to generate.