aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-05-21 18:48:26 +0000
committerMichael Snyder <msnyder@vmware.com>2001-05-21 18:48:26 +0000
commit6c3f2dbfeb9c822d261b00cd02e00e3febc20b85 (patch)
treed770da28cb193db14ad407b8955c550844f14a71
parentf5198f610d306ea682231bb054b431654b02612c (diff)
downloadgdb-6c3f2dbfeb9c822d261b00cd02e00e3febc20b85.zip
gdb-6c3f2dbfeb9c822d261b00cd02e00e3febc20b85.tar.gz
gdb-6c3f2dbfeb9c822d261b00cd02e00e3febc20b85.tar.bz2
2001-05-21 Michael Snyder <msnyder@redhat.com>
* remote.c (remote_async_wait): Added new variable fieldsize. Add fieldsize (return value of hex2bin) to string pointer p.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 19bde12..cf0216c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-21 Michael Snyder <msnyder@redhat.com>
+
+ * remote.c (remote_async_wait): Added new variable fieldsize.
+ Add fieldsize (return value of hex2bin) to string pointer p.
+
2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* m68hc11-tdep.c (m68hc11_pop_frame): Fix stack pointer computation.
diff --git a/gdb/remote.c b/gdb/remote.c
index a9dd2df..d91fac2 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3060,6 +3060,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
{
unsigned char *p1;
char *p_temp;
+ int fieldsize;
/* Read the register number */
regno = strtol ((const char *) p, &p_temp, 16);
@@ -3093,8 +3094,9 @@ Packet: '%s'\n",
Packet: '%s'\n",
regno, p, buf);
- if (hex2bin (p, regs, REGISTER_RAW_SIZE (regno))
- < REGISTER_RAW_SIZE (regno))
+ fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (regno));
+ p += 2 * fieldsize;
+ if (fieldsize < REGISTER_RAW_SIZE (regno))
warning ("Remote reply is too short: %s", buf);
supply_register (regno, regs);
}