From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22552 invoked by alias); 7 Jul 2008 17:55:36 -0000 Received: (qmail 22540 invoked by uid 22791); 7 Jul 2008 17:55:35 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Jul 2008 17:55:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1D72B98415; Mon, 7 Jul 2008 17:55:12 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 07BFB9805C; Mon, 7 Jul 2008 17:55:11 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KFuve-0001zp-Tr; Mon, 07 Jul 2008 13:55:10 -0400 Date: Mon, 07 Jul 2008 17:55:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [gdbserver] Fix attaching notices Message-ID: <20080707175510.GB1778@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org References: <200806280011.12868.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806280011.12868.pedro@codesourcery.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-07/txt/msg00083.txt.bz2 On Sat, Jun 28, 2008 at 12:11:12AM +0100, Pedro Alves wrote: > Hi, > > This patch fixes several issues I noticed with attaching > to processes with gdbserver's --multi support, on several > host/target combinations: > > Linux host -> Linux gdbserver > > There's code in gdbserver to pretend the initial SIGSTOP > was a SIGTRAP, that's been put there so > "gdbserver --attach PID"; "target remote", doesn't see > the SIGSTOP. This smudging should not be done when > handling a vAttach, otherwise, the user is presented > with: > > (gdb) tar extended-remote :9999 > Remote debugging using :9999 > (gdb) attach 32762 > Attached to Thread 32762 > [New Thread 32762] > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x00007fc30f5d0b30 in ?? () > > ... a bogus SIGTRAP. Did you reproduce this with an unmodified GDB or a patched one? I can't reproduce it - I was curious since I did test vAttach and I don't remember seeing these SIGTRAPs. Actually, wait... trying another GDB I see that this problem has appeared on the GDB side between 6.8 and HEAD. 6.8 doesn't print out the message about a SIGTRAP. > [Switching to Thread 2232] > Stopped due to shared library event > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This part looks fine. -- Daniel Jacobowitz CodeSourcery