aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-07-11 09:07:41 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-07-11 09:07:41 +0000
commitcf0063592da7c1a86749c717a32d6ba2880e4bab (patch)
tree64f9f07f57f741a6bfb2cf3212003d21322d2e7c
parent99e17d38400f5bb88e60ea7780c20b5fe67772b2 (diff)
downloadgdb-cf0063592da7c1a86749c717a32d6ba2880e4bab.zip
gdb-cf0063592da7c1a86749c717a32d6ba2880e4bab.tar.gz
gdb-cf0063592da7c1a86749c717a32d6ba2880e4bab.tar.bz2
Reuse print_hex_chars function.
http://sourceware.org/ml/gdb-patches/2013-07/msg00234.html * infcmd.c (default_print_one_register_info): Reuse code in print_hex_chars.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infcmd.c13
2 files changed, 7 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 37e16e7..383e20f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * infcmd.c (default_print_one_register_info): Reuse function
+ print_hex_chars.
+
2013-07-10 Tom Tromey <tromey@redhat.com>
* Makefile.in (GDB_WARN_CFLAGS_NO_DEFS, ADA_EXP_C): New macros.
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 10a589e..154cde2 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2052,17 +2052,8 @@ default_print_one_register_info (struct ui_file *file,
value_embedded_offset (val), 0,
file, 0, val, &opts, current_language);
- fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < TYPE_LENGTH (regtype); j++)
- {
- int idx;
-
- if (byte_order == BFD_ENDIAN_BIG)
- idx = j;
- else
- idx = TYPE_LENGTH (regtype) - 1 - j;
- fprintf_filtered (file, "%02x", (unsigned char) valaddr[idx]);
- }
+ fprintf_filtered (file, "\t(raw ");
+ print_hex_chars (file, valaddr, TYPE_LENGTH (regtype), byte_order);
fprintf_filtered (file, ")");
}
else