From: Michael Snyder Date: Wed, 16 May 2001 20:10:52 +0000 (+0000) Subject: 2001-05-15 John S Kallal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=97345198259b9cfe6ae2f64e02563041cd7fab97;p=binutils-gdb.git 2001-05-15 John S Kallal * remote.c (remote_wait): Added new variable fieldsize. Add fieldsize (return value of hex2bin) to string pointer p. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 52ebee9e82b..461998e4dfe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,11 @@ * infcmd.c (do_registers_info): Move alloca outside of loop. +2001-05-15 John S Kallal + + * remote.c (remote_wait): Added new variable fieldsize. + Add fieldsize (return value of hex2bin) to string pointer p. + 2001-05-15 Mark Kettenis * sparc-tdep.c (sparc_gdbarch_init): Get the architecture from diff --git a/gdb/remote.c b/gdb/remote.c index 1f7a763e568..a9dd2df974c 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); }