This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] remote target interrupt before ack
- From: Michael Walle <michael at walle dot cc>
- To: gdb-patches at sourceware dot org
- Date: Mon, 4 Apr 2011 22:00:15 +0200
- Subject: [PATCH] remote target interrupt before ack
Hi,
the following patch puts the sending of the interrupt/break sequence before
the proforma ACK. This guarantees the ACK won't be delivered to an application
on the remote side.
--- remote.c.orig 2011-04-03 22:01:56.000000000 +0200
+++ remote.c 2011-04-03 22:02:02.000000000 +0200
@@ -2948,12 +2948,12 @@
immediate_quit++; /* Allow user to interrupt it. */
- /* Ack any packet which the remote side has already sent. */
- serial_write (remote_desc, "+", 1);
-
if (interrupt_on_connect)
send_interrupt_sequence ();
+ /* Ack any packet which the remote side has already sent. */
+ serial_write (remote_desc, "+", 1);
+
/* The first packet we send to the target is the optional "supported
packets" request. If the target can answer this, it will tell us
which later probes to skip. */