diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/remote.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 475d952..71e9df5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-06-09 Doug Evans <dje@google.com> + + * remote.c (remote_wait): Include beginning of malformed packet + in error output. + 2008-06-09 Tom Tromey <tromey@redhat.com> * completer.c (complete_line): Don't special-case diff --git a/gdb/remote.c b/gdb/remote.c index e2e63ce..3f7d07b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3487,10 +3487,11 @@ Packet: '%s'\n"), struct packet_reg *reg = packet_reg_from_pnum (rsa, pnum); p = p1; - if (*p++ != ':') + if (*p != ':') error (_("Malformed packet(b) (missing colon): %s\n\ Packet: '%s'\n"), p, buf); + ++p; if (reg == NULL) error (_("Remote sent bad register number %s: %s\n\ @@ -3508,9 +3509,10 @@ Packet: '%s'\n"), reg->regnum, regs); } - if (*p++ != ';') + if (*p != ';') error (_("Remote register badly formatted: %s\nhere: %s"), buf, p); + ++p; } } /* fall through */ |