From 38583298e0ab81ab78689d89abcb5122e0251c74 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 25 Jun 2019 11:53:11 -0600 Subject: 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 * 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. --- gdb/objfiles.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 90c4650..f9e7d20 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -707,7 +707,9 @@ relocate_one_symbol (struct symbol *sym, struct objfile *objfile, || SYMBOL_CLASS (sym) == LOC_STATIC) && SYMBOL_SECTION (sym) >= 0) { - SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (delta, SYMBOL_SECTION (sym)); + SET_SYMBOL_VALUE_ADDRESS (sym, + SYMBOL_VALUE_ADDRESS (sym) + + ANOFFSET (delta, SYMBOL_SECTION (sym))); } } -- cgit v1.1