diff options
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 6da10aa..b03c65e 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -346,9 +346,9 @@ print_scalar_formatted (const void *valaddr, struct type *type, /* If the value is a pointer, and pointers and addresses are not the same, then at this point, the value's length (in target bytes) is - TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type). */ + gdbarch_addr_bit/TARGET_CHAR_BIT, not TYPE_LENGTH (type). */ if (TYPE_CODE (type) == TYPE_CODE_PTR) - len = TARGET_ADDR_BIT / TARGET_CHAR_BIT; + len = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT; /* If we are printing it as unsigned, truncate it in case it is actually a negative signed value (e.g. "print/u (short)-1" should print 65535 @@ -669,7 +669,7 @@ deprecated_print_address_numeric (CORE_ADDR addr, int use_local, fputs_filtered (paddress (addr), stream); else { - int addr_bit = TARGET_ADDR_BIT; + int addr_bit = gdbarch_addr_bit (current_gdbarch); if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT)) addr &= ((CORE_ADDR) 1 << addr_bit) - 1; |