summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2001-05-21 18:48:26 +0000
committerMichael Snyder <msnyder@specifix.com>2001-05-21 18:48:26 +0000
commit04bd8320ba38d5923749be408314142ad2dfbf00 (patch)
tree09f6255bff8dd6283633f6f4e0c79d02e2dc35d9 /gdb/remote.c
parentcb1060da7d73632dd5655535153bd5552352348f (diff)
downloadgdb-04bd8320ba38d5923749be408314142ad2dfbf00.tar.gz
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index a9dd2df974c..d91fac2689d 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);
}