diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-10-13 21:41:21 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-10-13 21:41:21 +0000 |
commit | 3ef696933847c046adcc09a8c5bdbe62854f7e22 (patch) | |
tree | da7b572e530c96b7c636bcc215b9b88d00dfcba7 /gdb/remote.c | |
parent | b0a4161a2e5be9c65ba18b81528f9e4aa7657fb6 (diff) | |
download | gdb-3ef696933847c046adcc09a8c5bdbe62854f7e22.tar.gz |
2000-10-13 Fernando Nasser <fnasser@cygnus.com>
* remote.c (putpkt_binary): Call read_frame, not getpkt. Log message.
(read_frame): Do not call error() on communication error when
reading checksum, but return failure instead and log message.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index b58911ce58a..de993640b49 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3796,9 +3796,11 @@ putpkt_binary (char *buf, int cnt) break; /* Retransmit buffer */ case '$': { + if (remote_debug) + fprintf_unfiltered (gdb_stdlog, "Packet instead of Ack, ignoring it\n"); /* It's probably an old response, and we're out of sync. Just gobble up the packet and ignore it. */ - getpkt (junkbuf, sizeof_junkbuf, 0); + read_frame (junkbuf, sizeof_junkbuf); continue; /* Now, go look for + */ } default: @@ -3887,7 +3889,11 @@ read_frame (char *buf, return -1; } else if (check_0 < 0 || check_1 < 0) - error ("Communication error in checksum"); + { + if (remote_debug) + fputs_filtered ("Communication error in checksum\n", gdb_stdlog); + return -1; + } pktcsum = (fromhex (check_0) << 4) | fromhex (check_1); if (csum == pktcsum) |