aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.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/mdebugread.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/mdebugread.c')
-rw-r--r--gdb/mdebugread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 0956fbd..eed7146 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -632,7 +632,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK);
s = new_symbol (name);
- SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
+ SET_SYMBOL_VALUE_ADDRESS (s, (CORE_ADDR) sh->value);
add_data_symbol (sh, ax, bigend, s, LOC_STATIC, b, objfile, name);
break;
@@ -649,7 +649,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
global_sym_chain[bucket] = s;
}
else
- SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
+ SET_SYMBOL_VALUE_ADDRESS (s, (CORE_ADDR) sh->value);
add_data_symbol (sh, ax, bigend, s, LOC_STATIC, b, objfile, name);
break;
@@ -706,7 +706,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
s = new_symbol (name);
SYMBOL_DOMAIN (s) = VAR_DOMAIN; /* So that it can be used */
SYMBOL_ACLASS_INDEX (s) = LOC_LABEL; /* but not misused. */
- SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
+ SET_SYMBOL_VALUE_ADDRESS (s, (CORE_ADDR) sh->value);
SYMBOL_TYPE (s) = objfile_type (objfile)->builtin_int;
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
break;