From: Andrew Cagney Date: Thu, 11 Nov 2004 18:59:39 +0000 (+0000) Subject: 2004-11-05 Jon Beniston X-Git-Tag: gdb-pre-i18n-errorwarning-20050211~932 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6f7abdf98f98f21d0c3724f6897ebecf55ec9aa;p=external%2Fbinutils.git 2004-11-05 Jon Beniston * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f294ea8..82ccc9f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,7 +1,13 @@ +2004-11-05 Jon Beniston + + * 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. + 2004-11-10 Randolph Chung * frame.c (get_prev_frame): Use get_frame_type to retrieve the - frame's type. + frame's type. 2004-11-10 Randolph Chung 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: