From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16385 invoked by alias); 4 Apr 2011 20:21:33 -0000 Received: (qmail 16376 invoked by uid 22791); 4 Apr 2011 20:21:31 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 20:21:27 +0000 Received: (qmail 1327 invoked from network); 4 Apr 2011 20:21:26 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Apr 2011 20:21:26 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH] remote target interrupt before ack Date: Mon, 04 Apr 2011 20:21:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.1; x86_64; ; ) Cc: Michael Walle References: <201104042200.15473.michael@walle.cc> In-Reply-To: <201104042200.15473.michael@walle.cc> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104042121.22036.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00067.txt.bz2 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. */ >