aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-15 08:44:43 -0600
committerTom Tromey <tromey@redhat.com>2014-02-26 12:11:16 -0700
commit40c1a0073715c1e3f93afc83edac8396eb362a98 (patch)
treef18968c9b394e0ba915bf5d59e95de4b7869185c /gdb/symtab.h
parentefd66ac6698323d9523a4dce352008c4c835812e (diff)
downloadgdb-40c1a0073715c1e3f93afc83edac8396eb362a98.zip
gdb-40c1a0073715c1e3f93afc83edac8396eb362a98.tar.gz
gdb-40c1a0073715c1e3f93afc83edac8396eb362a98.tar.bz2
make MSYMBOL_VALUE_ADDRESS an rvalue
This changes MSYMBOL_VALUE_ADDRESS to be an rvalue. In a later patch we change this macro to compute its value; this patch introduces a setter to make the break a bit cleaner. 2014-02-26 Tom Tromey <tromey@redhat.com> * minsyms.c (prim_record_minimal_symbol_full): Use SET_MSYMBOL_VALUE_ADDRESS. * objfiles.c (objfile_relocate1): Use SET_MSYMBOL_VALUE_ADDRESS. * sh64-tdep.c (sh64_elf_make_msymbol_special): Use SET_MSYMBOL_VALUE_ADDRESS. * symtab.h (MSYMBOL_VALUE_ADDRESS): Expand to an rvalue. (SET_MSYMBOL_VALUE_ADDRESS): New macro.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 4bf3035..bf1ef74 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -391,7 +391,9 @@ struct minimal_symbol
#define MSYMBOL_TYPE(msymbol) (msymbol)->type
#define MSYMBOL_VALUE(symbol) (symbol)->mginfo.value.ivalue
-#define MSYMBOL_VALUE_ADDRESS(symbol) (symbol)->mginfo.value.address
+#define MSYMBOL_VALUE_ADDRESS(symbol) ((symbol)->mginfo.value.address + 0)
+#define SET_MSYMBOL_VALUE_ADDRESS(symbol, new_value) \
+ ((symbol)->mginfo.value.address = (new_value))
#define MSYMBOL_VALUE_BYTES(symbol) (symbol)->mginfo.value.bytes
#define MSYMBOL_BLOCK_VALUE(symbol) (symbol)->mginfo.value.block
#define MSYMBOL_VALUE_CHAIN(symbol) (symbol)->mginfo.value.chain