From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27587 invoked by alias); 18 Nov 2005 02:52:41 -0000 Received: (qmail 27566 invoked by uid 22791); 18 Nov 2005 02:52:38 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 02:52:38 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jAI2qU7b019027 for ; Thu, 17 Nov 2005 21:52:30 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jAI2qUV13082 for ; Thu, 17 Nov 2005 21:52:30 -0500 Received: from localhost.localdomain (vpn50-163.rdu.redhat.com [172.16.50.163]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id jAI2qTMf000472 for ; Thu, 17 Nov 2005 21:52:30 -0500 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with ESMTP id jAI2qOZa017156 for ; Thu, 17 Nov 2005 19:52:24 -0700 Date: Fri, 18 Nov 2005 05:59:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: [rfa/doc] Add section on interrupts to remote protocol documentation Message-ID: <20051117195224.32094bd5@ironwood.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00308.txt.bz2 The patch below adds a new section about interrupts to the remote protocol documentation. A discussion on gdb@ may be found starting here: http://sources.redhat.com/ml/gdb/2005-11/msg00347.html Okay? * gdb.texinfo (set remotebreak): Add anchor. (Remote Protocol): Add new section `Interrupts'. Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.293 diff -u -p -r1.293 gdb.texinfo --- gdb.texinfo 17 Nov 2005 19:08:38 -0000 1.293 +++ gdb.texinfo 18 Nov 2005 02:44:52 -0000 @@ -12147,6 +12147,7 @@ Show the current speed of the remote con @item set remotebreak @cindex interrupt remote programs @cindex BREAK signal instead of Ctrl-C +@anchor{set remotebreak} If set to on, @value{GDBN} sends a @code{BREAK} signal to the remote when you press the @key{Ctrl-C} key to interrupt the program running on the remote. If set to off, @value{GDBN} sends the @samp{Ctrl-C} @@ -22016,6 +22017,7 @@ Show the current setting of the target w * Stop Reply Packets:: * General Query Packets:: * Register Packet Format:: +* Interrupts:: * Examples:: * File-I/O remote protocol extension:: @end menu @@ -23063,6 +23065,27 @@ as @code{MIPS32}. @end table +@node Interrupts +@section Interrupts + +When a program on the remote target is running, @value{GDBN} may +attempt to interrupt it by sending a @samp{Ctrl-C} or a @code{BREAK}, +control of which is specified via @value{GDBN}'s @samp{remotebreak} +setting. @xref{set remotebreak}. The precise meaning of @code{BREAK} +is defined by the transport mechanism and may, in fact, be undefined. +@samp{Ctrl-C}, on the other hand, is defined and implemented for all +transport mechanisms and is represented by sending the single byte +@code{0x03}. @samp{Ctrl-C} must not be sent as part of a packet as +defined in the Overview section. @xref{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 (@xref{Stop Reply Packets}) to @value{GDBN} as a result +of successfully stopping the program. Interrupts received while the +program is stopped will be discarded. + @node Examples @section Examples