aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>1999-02-02 21:26:56 +0000
committerMartin Hunt <hunt@redhat.com>1999-02-02 21:26:56 +0000
commit8c8fff63215d60d879ef750f7772f0ec28243f0a (patch)
treea838c3f5360c1e045ef4f72907bee01397103b4c /gdb
parent71003ca13f6086e0c54077b031a52a4689299594 (diff)
downloadgdb-8c8fff63215d60d879ef750f7772f0ec28243f0a.zip
gdb-8c8fff63215d60d879ef750f7772f0ec28243f0a.tar.gz
gdb-8c8fff63215d60d879ef750f7772f0ec28243f0a.tar.bz2
1999-02-02 Martin Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (get_register): For RAW display, concat all the pieces together before calling fputs.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog-gdbtk5
-rw-r--r--gdb/gdbtk-cmds.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk
index 30e3cfc..04d0ca8 100644
--- a/gdb/ChangeLog-gdbtk
+++ b/gdb/ChangeLog-gdbtk
@@ -1,3 +1,8 @@
+1999-02-02 Martin Hunt <hunt@cygnus.com>
+
+ * gdbtk-cmds.c (get_register): For RAW display, concat all the
+ pieces together before calling fputs.
+
1999-02-01 Martin Hunt <hunt@cygnus.com>
* gdbtk-cmds.c: (gdb_set_bp): Change the "type" argument
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,