From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9142 invoked by alias); 4 Apr 2011 20:00:22 -0000 Received: (qmail 9131 invoked by uid 22791); 4 Apr 2011 20:00:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.serverraum.org (HELO mail.serverraum.org) (78.47.150.89) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 20:00:17 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.serverraum.org (Postfix) with ESMTP id 630123EF11 for ; Mon, 4 Apr 2011 22:00:16 +0200 (CEST) Received: from mail.serverraum.org ([127.0.0.1]) by localhost (web.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OQw7R3pEXc9H for ; Mon, 4 Apr 2011 22:00:16 +0200 (CEST) Received: from thanatos.localnet (91-67-5-72-dynip.superkabel.de [91.67.5.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serverraum.org (Postfix) with ESMTPSA id 3C81C3EEB6 for ; Mon, 4 Apr 2011 22:00:16 +0200 (CEST) From: Michael Walle To: gdb-patches@sourceware.org Subject: [PATCH] remote target interrupt before ack Date: Mon, 04 Apr 2011 20:00:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201104042200.15473.michael@walle.cc> 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/msg00066.txt.bz2 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. */