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
This commit is contained in:
Simon Marchi
2022-01-28 08:09:50 -05:00
parent 96d368d104
commit 4aeddc50d7
90 changed files with 503 additions and 461 deletions

View File

@ -750,7 +750,7 @@ print_frame_args (const frame_print_options &fp_opts,
if (func)
{
const struct block *b = SYMBOL_BLOCK_VALUE (func);
const struct block *b = func->value_block ();
struct block_iterator iter;
struct symbol *sym;
@ -778,7 +778,7 @@ print_frame_args (const frame_print_options &fp_opts,
case LOC_ARG:
case LOC_REF_ARG:
{
long current_offset = SYMBOL_VALUE (sym);
long current_offset = sym->value_longest ();
int arg_size = TYPE_LENGTH (sym->type ());
/* Compute address of next argument by adding the size of
@ -2554,7 +2554,7 @@ print_frame_arg_vars (struct frame_info *frame,
cb_data.stream = stream;
cb_data.values_printed = 0;
iterate_over_block_arg_vars (SYMBOL_BLOCK_VALUE (func), cb_data);
iterate_over_block_arg_vars (func->value_block (), cb_data);
/* do_print_variable_and_value invalidates FRAME. */
frame = NULL;