diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-05-16 20:10:52 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-05-16 20:10:52 +0000 |
commit | 97345198259b9cfe6ae2f64e02563041cd7fab97 (patch) | |
tree | 702ec435946b3d1721125eb0bf7a75547afe3b67 /gdb/remote.c | |
parent | b8adfa9f55a9629eb28ddbfc8b06c25a25c41444 (diff) | |
download | gdb-97345198259b9cfe6ae2f64e02563041cd7fab97.zip gdb-97345198259b9cfe6ae2f64e02563041cd7fab97.tar.gz gdb-97345198259b9cfe6ae2f64e02563041cd7fab97.tar.bz2 |
2001-05-15 John S Kallal <jskallal@home.com>
* remote.c (remote_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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 1f7a763..a9dd2df 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2841,6 +2841,7 @@ remote_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); @@ -2874,8 +2875,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); } |