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/ada-lang.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/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index d819038..29f2a4b 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -819,7 +819,7 @@ ada_main_name (void) if (msym.minsym != NULL) { - CORE_ADDR main_program_name_addr = BMSYMBOL_VALUE_ADDRESS (msym); + CORE_ADDR main_program_name_addr = msym.value_address (); if (main_program_name_addr == 0) error (_("Invalid address for Ada main program name.")); @@ -4825,7 +4825,7 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) && startswith (name1 + len0, "___XV"))); } case LOC_CONST: - return SYMBOL_VALUE (sym0) == SYMBOL_VALUE (sym1) + return sym0->value_longest () == sym1->value_longest () && equiv_types (sym0->type (), sym1->type ()); case LOC_STATIC: @@ -4833,7 +4833,7 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) const char *name0 = sym0->linkage_name (); const char *name1 = sym1->linkage_name (); return (strcmp (name0, name1) == 0 - && SYMBOL_VALUE_ADDRESS (sym0) == SYMBOL_VALUE_ADDRESS (sym1)); + && sym0->value_address () == sym1->value_address ()); } default: @@ -5003,7 +5003,7 @@ symbols_are_identical_enums (const std::vector<struct block_symbol> &syms) /* Quick check: They should all have the same value. */ for (i = 1; i < syms.size (); i++) - if (SYMBOL_VALUE (syms[i].symbol) != SYMBOL_VALUE (syms[0].symbol)) + if (syms[i].symbol->value_longest () != syms[0].symbol->value_longest ()) return 0; /* Quick check: They should all have the same number of enumerals. */ @@ -5077,8 +5077,8 @@ remove_extra_symbols (std::vector<struct block_symbol> *syms) (*syms)[j].symbol->linkage_name ()) == 0 && ((*syms)[i].symbol->aclass () == (*syms)[j].symbol->aclass ()) - && SYMBOL_VALUE_ADDRESS ((*syms)[i].symbol) - == SYMBOL_VALUE_ADDRESS ((*syms)[j].symbol)) + && (*syms)[i].symbol->value_address () + == (*syms)[j].symbol->value_address ()) remove_p = 1; } } @@ -12987,7 +12987,7 @@ ada_add_standard_exceptions (compiled_regex *preg, if (msymbol.minsym != NULL) { struct ada_exc_info info - = {name, BMSYMBOL_VALUE_ADDRESS (msymbol)}; + = {name, msymbol.value_address ()}; exceptions->push_back (info); } @@ -13029,7 +13029,7 @@ ada_add_exceptions_from_frame (compiled_regex *preg, if (ada_is_exception_sym (sym)) { struct ada_exc_info info = {sym->print_name (), - SYMBOL_VALUE_ADDRESS (sym)}; + sym->value_address ()}; exceptions->push_back (info); } @@ -13105,7 +13105,7 @@ ada_add_global_exceptions (compiled_regex *preg, && name_matches_regex (sym->natural_name (), preg)) { struct ada_exc_info info - = {sym->print_name (), SYMBOL_VALUE_ADDRESS (sym)}; + = {sym->print_name (), sym->value_address ()}; exceptions->push_back (info); } |