aboutsummaryrefslogtreecommitdiff
path: root/gdb/z80-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-28 08:09:50 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-04-11 10:45:36 -0400
commit4aeddc50d7a06294cc124dfd8f43992ffa0b7382 (patch)
tree82c6a016c94112c6e5dc7cf763cc5641d91e6b6e /gdb/z80-tdep.c
parent96d368d10456f5a599db759aab20e84a61f361f9 (diff)
downloadgdb-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/z80-tdep.c')
-rw-r--r--gdb/z80-tdep.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c
index a252574..c2d906d 100644
--- a/gdb/z80-tdep.c
+++ b/gdb/z80-tdep.c
@@ -360,7 +360,7 @@ z80_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
msymbol = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
if (msymbol.minsym)
{
- value = BMSYMBOL_VALUE_ADDRESS (msymbol);
+ value = msymbol.value_address ();
if (value == extract_unsigned_integer (&prologue[pos+1], addr_len, byte_order))
{
pos += 1 + addr_len;
@@ -625,7 +625,7 @@ z80_frame_unwind_cache (struct frame_info *this_frame,
msymbol = lookup_minimal_symbol (names[i], NULL, NULL);
if (!msymbol.minsym)
continue;
- if (addr == BMSYMBOL_VALUE_ADDRESS (msymbol))
+ if (addr == msymbol.value_address ())
break;
}
if (i >= 0)
@@ -722,7 +722,7 @@ z80_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
struct bound_minimal_symbol bh;
bh = lookup_minimal_symbol ("_break_handler", NULL, NULL);
if (bh.minsym)
- addr = BMSYMBOL_VALUE_ADDRESS (bh);
+ addr = bh.value_address ();
else
{
warning(_("Unable to determine inferior's software breakpoint type: "
@@ -927,14 +927,13 @@ z80_read_overlay_region_table ()
word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
byte_order = gdbarch_byte_order (gdbarch);
- cache_novly_regions = read_memory_integer (
- BMSYMBOL_VALUE_ADDRESS (novly_regions_msym),
- 4, byte_order);
+ cache_novly_regions = read_memory_integer (novly_regions_msym.value_address (),
+ 4, byte_order);
cache_ovly_region_table
= (unsigned int (*)[3]) xmalloc (cache_novly_regions *
sizeof (*cache_ovly_region_table));
cache_ovly_region_table_base
- = BMSYMBOL_VALUE_ADDRESS (ovly_region_table_msym);
+ = ovly_region_table_msym.value_address ();
read_target_long_array (cache_ovly_region_table_base,
(unsigned int *) cache_ovly_region_table,
cache_novly_regions * 3, word_size, byte_order);