forked from Imagelibrary/binutils-gdb
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:
@@ -2216,7 +2216,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||
error (_("The return value is stored in memory at 'mem0', "
|
||||
"but GDB cannot find\n"
|
||||
"its address."));
|
||||
read_memory (BMSYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
|
||||
read_memory (mem0.value_address (), readbuf, valtype_len);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2248,7 +2248,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||
error (_("The return value is stored in memory at 'mem0', "
|
||||
"but GDB cannot find\n"
|
||||
" its address."));
|
||||
write_memory (BMSYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
|
||||
write_memory (mem0.value_address (), writebuf, valtype_len);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2473,7 +2473,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
|
||||
else
|
||||
{
|
||||
/* The trampoline's address is our pointer. */
|
||||
addr = BMSYMBOL_VALUE_ADDRESS (tramp_msym);
|
||||
addr = tramp_msym.value_address ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2525,7 +2525,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
|
||||
/* If we do have such a symbol, return its value as the
|
||||
function's true address. */
|
||||
if (func_msym.minsym)
|
||||
ptr = BMSYMBOL_VALUE_ADDRESS (func_msym);
|
||||
ptr = func_msym.value_address ();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user