From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19994 invoked by alias); 10 Apr 2008 16:00:32 -0000 Received: (qmail 19984 invoked by uid 22791); 10 Apr 2008 16:00:32 -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; Thu, 10 Apr 2008 16:00:12 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 05F52980F7; Thu, 10 Apr 2008 16:00:11 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id E372E98060; Thu, 10 Apr 2008 16:00:10 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JjzC6-00080z-AP; Thu, 10 Apr 2008 12:00:10 -0400 Date: Thu, 10 Apr 2008 19:48:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Doug Evans , GDB Patches , mark.kettenis@xs4all.nl, Roland McGrath Subject: Re: [patch] Fix Linux attach to signalled/stopped processes Message-ID: <20080410160010.GA30392@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , Doug Evans , GDB Patches , mark.kettenis@xs4all.nl, Roland McGrath References: <20080401223012.GA14076@host0.dyn.jankratochvil.net> <20080410153735.GD21662@caradoc.them.org> <20080410154839.GA5375@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080410154839.GA5375@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.17 (2007-12-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-04/txt/msg00201.txt.bz2 On Thu, Apr 10, 2008 at 05:48:39PM +0200, Jan Kratochvil wrote: > > If I run attach-stopped from your testcase in a shell, then send it a > > stop signal using kill from another window, stock GDB fails to attach > > to it - just as I'd expect, that's the bug we're discussing. But if I > > run the attach-stopped.exp test script this part works fine. It turns > > out that if we spawn the program in expect (even at the expect1.1> > > prompt, by hand) instead of using a shell with job control, GDB can > > attach to it just fine. > > As the shell already did WAITPID on the process and ate the SIGSTOP > notification so there is no other notification left there for GDB. > A process already stopped does not generate another SIGSTOP during > PTRACE_ATTACH as signals never count. > > [ Sure from info from Roland before. ] Ah-hah. Thanks, that makes sense. exit_code doesn't show up in /proc anywhere. -- Daniel Jacobowitz CodeSourcery