aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbtk-cmds.c')
-rw-r--r--gdb/gdbtk-cmds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/gdbtk-cmds.c b/gdb/gdbtk-cmds.c
index 9a4040a..2bdcddf 100644
--- a/gdb/gdbtk-cmds.c
+++ b/gdb/gdbtk-cmds.c
@@ -1711,13 +1711,18 @@ get_register (regnum, fp)
if (format == 'r')
{
int j;
- printf_filtered ("0x");
+ char *ptr, buf[1024];
+
+ strcpy (buf, "0x");
+ ptr = buf + 2;
for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
{
register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
: REGISTER_RAW_SIZE (regnum) - 1 - j;
- printf_filtered ("%02x", (unsigned char)raw_buffer[idx]);
+ sprintf(ptr, "%02x", (unsigned char)raw_buffer[idx]);
+ ptr += 2;
}
+ fputs_filtered (buf, gdb_stdout);
}
else
val_print (REGISTER_VIRTUAL_TYPE (regnum), virtual_buffer, 0, 0,