aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-06-25 11:53:11 -0600
committerTom Tromey <tromey@adacore.com>2019-10-02 09:53:17 -0600
commit38583298e0ab81ab78689d89abcb5122e0251c74 (patch)
tree2b36a7aa7b2874177aacd6ce83ad7b0f4256ab99 /gdb/xcoffread.c
parent9344c18feb0ef3dfacfd1d0437c0d1e329feaa83 (diff)
downloadgdb-38583298e0ab81ab78689d89abcb5122e0251c74.zip
gdb-38583298e0ab81ab78689d89abcb5122e0251c74.tar.gz
gdb-38583298e0ab81ab78689d89abcb5122e0251c74.tar.bz2
Change SYMBOL_VALUE_ADDRESS to be an rvalue
This changes SYMBOL_VALUE_ADDRESS to be an rvalue. The symbol readers generally assign using this, so this also introduces SET_SYMBOL_VALUE_ADDRESS and updates the readers. Making this change is useful in a subsequent patch, which redefined SYMBOL_VALUE_ADDRESS. gdb/ChangeLog 2019-10-02 Tom Tromey <tromey@adacore.com> * coffread.c (process_coff_symbol): Update. * dwarf2read.c (var_decode_location, new_symbol): Update. * mdebugread.c (parse_symbol): Update. * objfiles.c (relocate_one_symbol): Update. * stabsread.c (define_symbol, fix_common_block) (scan_file_globals): Update. * symtab.h (SYMBOL_VALUE_ADDRESS): Expand to an rvalue. (SET_SYMBOL_VALUE_ADDRESS): New macro. * xcoffread.c (process_xcoff_symbol): Update.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 2fa2706..aec1923 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1576,7 +1576,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
initialize_objfile_symbol (sym);
/* default assumptions */
- SYMBOL_VALUE_ADDRESS (sym) = cs->c_value + off;
+ SET_SYMBOL_VALUE_ADDRESS (sym, cs->c_value + off);
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_SECTION (sym) = secnum_to_section (cs->c_secnum, objfile);
@@ -1674,7 +1674,9 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
cs->c_name, 0, 0, objfile);
if (sym != NULL)
{
- SYMBOL_VALUE_ADDRESS (sym) += static_block_base;
+ SET_SYMBOL_VALUE_ADDRESS (sym,
+ SYMBOL_VALUE_ADDRESS (sym)
+ + static_block_base);
SYMBOL_SECTION (sym) = static_block_section;
}
return sym;