aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-06-09 20:43:48 +0000
committerDoug Evans <dje@google.com>2008-06-09 20:43:48 +0000
commitb4f62b573f59be9698ed645063b4299f128278fb (patch)
tree14795bfbec5f01d4025e94313de3d359fad15695 /gdb
parent37cd5d19fecc44f28d9b1f32146e53cdb19b5553 (diff)
downloadgdb-b4f62b573f59be9698ed645063b4299f128278fb.zip
gdb-b4f62b573f59be9698ed645063b4299f128278fb.tar.gz
gdb-b4f62b573f59be9698ed645063b4299f128278fb.tar.bz2
* remote.c (remote_wait): Include beginning of malformed packet
in error output.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote.c6
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 */