aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-11-11 18:59:39 +0000
committerAndrew Cagney <cagney@redhat.com>2004-11-11 18:59:39 +0000
commitd6f7abdf98f98f21d0c3724f6897ebecf55ec9aa (patch)
tree8e3a3216884a65b2ee02ab5326786fe60bed08e9 /gdb/remote.c
parent6366ff1ead04d6d0f312b90ab270e95a9d078a10 (diff)
downloadgdb-d6f7abdf98f98f21d0c3724f6897ebecf55ec9aa.zip
gdb-d6f7abdf98f98f21d0c3724f6897ebecf55ec9aa.tar.gz
gdb-d6f7abdf98f98f21d0c3724f6897ebecf55ec9aa.tar.bz2
2004-11-05 Jon Beniston <jon@beniston.com>
* remote.c (putpkt_binary) Fix PR gdb/1806. Send an ACK when an unexpected packet is received, as the target stubs continually retransmit the same packet until ACKed.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 5d1ac7f..c88a13c 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3972,9 +3972,12 @@ putpkt_binary (char *buf, int cnt)
{
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. */
+ /* It's probably an old response sent because an ACK
+ was lost. Gobble up the packet and ack it so it
+ doesn't get retransmitted when we resend this
+ packet. */
read_frame (junkbuf, sizeof_junkbuf);
+ serial_write (remote_desc, "+", 1);
continue; /* Now, go look for + */
}
default: