aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-09-23 09:18:44 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-09-23 09:18:44 +0000
commit2cc762b50b0fe63c0de4cf1e00f4f85f7a8687e9 (patch)
treeba14bc6addf03176d84260eb403147e5ca469a59
parentbf3d9781ec049aef88547a9be711df2c1291c898 (diff)
downloadgdb-2cc762b50b0fe63c0de4cf1e00f4f85f7a8687e9.zip
gdb-2cc762b50b0fe63c0de4cf1e00f4f85f7a8687e9.tar.gz
gdb-2cc762b50b0fe63c0de4cf1e00f4f85f7a8687e9.tar.bz2
Reuse print_hex_chars.
https://sourceware.org/ml/gdb-patches/2013-09/msg00768.html gdb/ChangeLog * sh64-tdep.c (sh64_do_fp_register): Use print_hex_chars.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/sh64-tdep.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a71cc5c..b016136 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-23 Andrew Burgess <aburgess@broadcom.com>
+
+ * sh64-tdep.c (sh64_do_fp_register): Use print_hex_chars.
+
2013-09-19 Pedro Alves <palves@redhat.com>
* breakpoint.c (remove_threaded_breakpoints): Skip non-user
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index e9ce42b..9425e9f 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -1948,14 +1948,10 @@ sh64_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file,
fprintf_filtered (file, "%-10.9g", flt);
/* Print the fp register as hex. */
- fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < register_size (gdbarch, regnum); j++)
- {
- int idx = gdbarch_byte_order (gdbarch)
- == BFD_ENDIAN_BIG ? j : register_size
- (gdbarch, regnum) - 1 - j;
- fprintf_filtered (file, "%02x", raw_buffer[idx]);
- }
+ fprintf_filtered (file, "\t(raw ");
+ print_hex_chars (file, raw_buffer,
+ register_size (gdbarch, regnum),
+ gdbarch_byte_order (gdbarch));
fprintf_filtered (file, ")");
fprintf_filtered (file, "\n");
}