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/ax-gdb.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/ax-gdb.c')
-rw-r--r-- | gdb/ax-gdb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index be2063f..e2e311f 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -499,7 +499,7 @@ gen_offset (struct agent_expr *ax, int offset) static void gen_sym_offset (struct agent_expr *ax, struct symbol *var) { - gen_offset (ax, SYMBOL_VALUE (var)); + gen_offset (ax, var->value_longest ()); } @@ -523,12 +523,12 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var) switch (var->aclass ()) { case LOC_CONST: /* A constant, like an enum value. */ - ax_const_l (ax, (LONGEST) SYMBOL_VALUE (var)); + ax_const_l (ax, (LONGEST) var->value_longest ()); value->kind = axs_rvalue; break; case LOC_LABEL: /* A goto label, being used as a value. */ - ax_const_l (ax, (LONGEST) SYMBOL_VALUE_ADDRESS (var)); + ax_const_l (ax, (LONGEST) var->value_address ()); value->kind = axs_rvalue; break; @@ -540,7 +540,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var) /* Variable at a fixed location in memory. Easy. */ case LOC_STATIC: /* Push the address of the variable. */ - ax_const_l (ax, SYMBOL_VALUE_ADDRESS (var)); + ax_const_l (ax, var->value_address ()); value->kind = axs_lvalue_memory; break; @@ -571,7 +571,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var) break; case LOC_BLOCK: - ax_const_l (ax, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (var))); + ax_const_l (ax, BLOCK_ENTRY_PC (var->value_block ())); value->kind = axs_rvalue; break; @@ -603,7 +603,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var) error (_("Couldn't resolve symbol `%s'."), var->print_name ()); /* Push the address of the variable. */ - ax_const_l (ax, BMSYMBOL_VALUE_ADDRESS (msym)); + ax_const_l (ax, msym.value_address ()); value->kind = axs_lvalue_memory; } break; |