From b4f62b573f59be9698ed645063b4299f128278fb Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 9 Jun 2008 20:43:48 +0000 Subject: [PATCH] * remote.c (remote_wait): Include beginning of malformed packet in error output. --- gdb/ChangeLog | 5 +++++ gdb/remote.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 475d952349b..71e9df5f9e1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-06-09 Doug Evans + + * remote.c (remote_wait): Include beginning of malformed packet + in error output. + 2008-06-09 Tom Tromey * completer.c (complete_line): Don't special-case diff --git a/gdb/remote.c b/gdb/remote.c index e2e63ce2b0f..3f7d07b831d 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 */ -- 2.30.2