aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 02:32:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 02:32:05 +0000
commitb0f61d04f617f32c4ee1e8b7fb35b6b79a854c98 (patch)
treec028d09274548739bc91574049743fbcf29ab7b0 /gdb/valprint.c
parent8357834fbec086011dbb4b445f63c03c9f4c6c1e (diff)
downloadgdb-b0f61d04f617f32c4ee1e8b7fb35b6b79a854c98.zip
gdb-b0f61d04f617f32c4ee1e8b7fb35b6b79a854c98.tar.gz
gdb-b0f61d04f617f32c4ee1e8b7fb35b6b79a854c98.tar.bz2
* valprint.c (print_hex_chars): Use local_hex_format_{pre,suf}fix.
* printcmd.c (print_scalar_formatted): Use val_print_type_code_int.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index b09474d..b3b1f71 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -304,7 +304,7 @@ val_print_type_code_int (type, valaddr, stream)
unpack_long (type, valaddr));
#endif
}
-}
+}
/* Print a number according to FORMAT which is one of d,u,x,o,b,h,w,g.
The raison d'etre of this function is to consolidate printing of LONG_LONG's
@@ -517,8 +517,10 @@ print_hex_chars (stream, valaddr, len)
unsigned len;
{
unsigned char *p;
-
- fprintf_filtered (stream, "0x");
+
+ /* FIXME: We should be not printing leading zeroes in most cases. */
+
+ fprintf_filtered (stream, local_hex_format_prefix ());
#if TARGET_BYTE_ORDER == BIG_ENDIAN
for (p = valaddr;
p < valaddr + len;
@@ -531,6 +533,7 @@ print_hex_chars (stream, valaddr, len)
{
fprintf_filtered (stream, "%02x", *p);
}
+ fprintf_filtered (stream, local_hex_format_suffix ());
}
/* Called by various <lang>_val_print routines to print elements of an