This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] remote target interrupt before ack
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Walle <michael at walle dot cc>
- Date: Mon, 4 Apr 2011 21:21:21 +0100
- Subject: Re: [PATCH] remote target interrupt before ack
- References: <201104042200.15473.michael@walle.cc>
On Monday 04 April 2011 21:00:15, Michael Walle wrote:
> 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.
Can you explain what the latter sentence means a bit better?
--
Pedro Alves
>
>
> --- 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. */
>