From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9704 invoked by alias); 17 Nov 2005 18:51:01 -0000 Received: (qmail 9694 invoked by uid 22791); 17 Nov 2005 18:50:58 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 17 Nov 2005 18:50:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EcoqW-0004tY-Lr; Thu, 17 Nov 2005 13:50:56 -0500 Date: Thu, 17 Nov 2005 18:51:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: gdb@sources.redhat.com Subject: Re: Interrupting remote targets from GDB Message-ID: <20051117185056.GA18702@nevyn.them.org> Mail-Followup-To: Kevin Buettner , gdb@sources.redhat.com References: <20051117112043.4d9f587e@ironwood.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051117112043.4d9f587e@ironwood.lan> User-Agent: Mutt/1.5.8i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00349.txt.bz2 On Thu, Nov 17, 2005 at 11:20:43AM -0700, Kevin Buettner wrote: > set remotebreak > If set to on, GDB sends a BREAK signal to the remote when you > press the Ctrl-C key to interrupt the program running on the > remote. If set to off, GDB sends the `Strl-C' character > instead. The default is off, since most remote systems expect > to see `Ctrl-C' as the interrupt signal. Mind fixing the Strl-C ? ;-) > I think this documentation is fine, but would also like to see some > suitable documentation added to the section describing the GDB remote > protocol. I suggest that a section called "Interrupts" be added in > between the sections "Register Packet Format" and "Examples". I propose > that it contain the following text: > > When a program on the remote target is running, GDB may attempt > to interrupt it by sending a `Ctrl-C' or a BREAK, control of which > is specified via GDB's `remotebreak' setting. The precise meaning > of BREAK is defined by the transport mechanism and may, in fact, > be undefined. `Ctrl-C', on the other hand, is defined for all > transport mechanisms and is represented by sending the single byte > 0x03. `Ctrl-C' must not be sent as part of a packet as defined in > the "Overview". > > Stubs are not required to recognize these interrupt mechanisms and > the precise meaning associated with receipt of the interrupt is > implementation defined. If the stub is successful at interrupting > the running program, it is expected that it will send one of the > `Stop Reply Packets' to GDB as a result of successfully stopping > the program. > > Comments? Fine by me; can we also add a word about what to do with interrupts when the target is stopped? I believe they should be dropped rather than responded to, per conversation on gdb@ earlier this month. -- Daniel Jacobowitz CodeSourcery, LLC