aboutsummaryrefslogtreecommitdiff
path: root/gdb/ch-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ch-valprint.c')
-rw-r--r--gdb/ch-valprint.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c
index 5cb21d3..37ca0f4 100644
--- a/gdb/ch-valprint.c
+++ b/gdb/ch-valprint.c
@@ -158,7 +158,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
}
if (addressprint && format != 's')
{
- fprintf_filtered (stream, "H'%lx", (unsigned long) addr);
+ print_address_numeric (addr, stream);
}
/* For a pointer to char or unsigned char, also print the string
@@ -265,9 +265,11 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
case TYPE_CODE_REF:
if (addressprint)
{
- fprintf_filtered (stream, "LOC(H'%lx)",
- extract_unsigned_integer (valaddr,
- TARGET_PTR_BIT / HOST_CHAR_BIT));
+ fprintf_filtered (stream, "LOC(");
+ print_address_numeric
+ (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
+ stream);
+ fprintf_filtered (stream, ")");
if (deref_ref)
fputs_filtered (": ", stream);
}