From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10873 invoked by alias); 26 Oct 2006 21:11:30 -0000 Received: (qmail 10863 invoked by uid 22791); 26 Oct 2006 21:11:29 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Oct 2006 21:11:23 +0000 Received: (qmail 6152 invoked from network); 26 Oct 2006 21:11:21 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Oct 2006 21:11:21 -0000 To: gdb@sourceware.org Subject: Re: [rfc/remote] Tell remote stubs which signals are boring References: <20061025212441.GA622@nevyn.them.org> From: Jim Blandy Date: Thu, 26 Oct 2006 21:11:00 -0000 In-Reply-To: <20061025212441.GA622@nevyn.them.org> (Daniel Jacobowitz's message of "Wed, 25 Oct 2006 17:24:41 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2006-10/txt/msg00271.txt.bz2 Daniel Jacobowitz writes: > Some time ago, I got a bug report that gdbserver couldn't be used to > debug a program. You'd tell it to "continue", and it wouldn't - it > would just spin in place. > > We realized eventually that the problem was SIGALRM. There was a tiny > signal handler running every timer tick (at about 100Hz, if I remember > right). That's plenty of time for native GDB to notice, resume, and > let the code run. But if you have to stop the program, including any > threads, and send a packet over a socket to another machine, only to > have GDB tell you that you're not interested in it anyway, then you > never make any progress. By the time the program returns from its > signal handler, SIGALRM is pending again. > > This is the solution I came up with for that problem, adjusted to HEAD > and given a more sensible packet name. I have a tested implementation > of this patch for HEAD, if my remote protocol choices are acceptable. > The new mechanism is completely transparent to the user. > > All comments welcome! > > `QPassSignals SIGNAL [;SIGNAL]...' (Thanks, Mark, for asking about this!) Please don't use a space to mark the end of the packet name. At the moment, the remote protocol documentation uses spaces just for clarity; if they become meaningful, then we're going to have to revamp our manual notation --- again. The text in "Overview" suggests using ',', ';', or ':'. > Each listed SIGNAL, using the same signal numbering used in I'd like to see "and syntax" added here --- I assume that's so?