diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-28 08:09:50 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-04-11 10:45:36 -0400 |
commit | 4aeddc50d7a06294cc124dfd8f43992ffa0b7382 (patch) | |
tree | 82c6a016c94112c6e5dc7cf763cc5641d91e6b6e /gdb/compile/compile-cplus-symbols.c | |
parent | 96d368d10456f5a599db759aab20e84a61f361f9 (diff) | |
download | gdb-4aeddc50d7a06294cc124dfd8f43992ffa0b7382.zip gdb-4aeddc50d7a06294cc124dfd8f43992ffa0b7382.tar.gz gdb-4aeddc50d7a06294cc124dfd8f43992ffa0b7382.tar.bz2 |
gdb: remove symbol value macros
Remove all macros related to getting and setting some symbol value:
#define SYMBOL_VALUE(symbol) (symbol)->value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) \
#define SET_SYMBOL_VALUE_ADDRESS(symbol, new_value) \
#define SYMBOL_VALUE_BYTES(symbol) (symbol)->value.bytes
#define SYMBOL_VALUE_COMMON_BLOCK(symbol) (symbol)->value.common_block
#define SYMBOL_BLOCK_VALUE(symbol) (symbol)->value.block
#define SYMBOL_VALUE_CHAIN(symbol) (symbol)->value.chain
#define MSYMBOL_VALUE(symbol) (symbol)->value.ivalue
#define MSYMBOL_VALUE_RAW_ADDRESS(symbol) ((symbol)->value.address + 0)
#define MSYMBOL_VALUE_ADDRESS(objfile, symbol) \
#define BMSYMBOL_VALUE_ADDRESS(symbol) \
#define SET_MSYMBOL_VALUE_ADDRESS(symbol, new_value) \
#define MSYMBOL_VALUE_BYTES(symbol) (symbol)->value.bytes
#define MSYMBOL_BLOCK_VALUE(symbol) (symbol)->value.block
Replace them with equivalent methods on the appropriate objects.
Change-Id: Iafdab3b8eefc6dc2fd895aa955bf64fafc59ed50
Diffstat (limited to 'gdb/compile/compile-cplus-symbols.c')
-rw-r--r-- | gdb/compile/compile-cplus-symbols.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 3657c84..b68184c 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -81,13 +81,13 @@ convert_one_symbol (compile_cplus_instance *instance, case LOC_LABEL: kind = GCC_CP_SYMBOL_LABEL; - addr = SYMBOL_VALUE_ADDRESS (sym.symbol); + addr = sym.symbol->value_address (); break; case LOC_BLOCK: { kind = GCC_CP_SYMBOL_FUNCTION; - addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol)); + addr = BLOCK_START (sym.symbol->value_block ()); if (is_global && sym.symbol->type ()->is_gnu_ifunc ()) addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr); } @@ -101,7 +101,7 @@ convert_one_symbol (compile_cplus_instance *instance, } instance->plugin ().build_constant (sym_type, sym.symbol->natural_name (), - SYMBOL_VALUE (sym.symbol), filename, line); + sym.symbol->value_longest (), filename, line); return; case LOC_CONST_BYTES: @@ -173,7 +173,7 @@ convert_one_symbol (compile_cplus_instance *instance, case LOC_STATIC: kind = GCC_CP_SYMBOL_VARIABLE; - addr = SYMBOL_VALUE_ADDRESS (sym.symbol); + addr = sym.symbol->value_address (); break; case LOC_FINAL_VALUE: @@ -281,7 +281,7 @@ convert_symbol_bmsym (compile_cplus_instance *instance, gcc_type sym_type; CORE_ADDR addr; - addr = MSYMBOL_VALUE_ADDRESS (objfile, msym); + addr = msym->value_address (objfile); /* Conversion copied from write_exp_msymbol. */ switch (MSYMBOL_TYPE (msym)) @@ -441,7 +441,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, gdb_printf (gdb_stdlog, "gcc_symbol_address \"%s\": full symbol\n", identifier); - result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + result = BLOCK_START (sym->value_block ()); if (sym->type ()->is_gnu_ifunc ()) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); found = 1; @@ -458,7 +458,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, "gcc_symbol_address \"%s\": minimal " "symbol\n", identifier); - result = BMSYMBOL_VALUE_ADDRESS (msym); + result = msym.value_address (); if (MSYMBOL_TYPE (msym.minsym) == mst_text_gnu_ifunc) result = gnu_ifunc_resolve_addr (target_gdbarch (), result); found = 1; |