From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25114 invoked by alias); 18 Sep 2006 13:16:29 -0000 Received: (qmail 25105 invoked by uid 22791); 18 Sep 2006 13:16:28 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 18 Sep 2006 13:16:19 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GPIyv-0005vz-9y; Mon, 18 Sep 2006 09:16:17 -0400 Date: Mon, 18 Sep 2006 13:16:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix attaching to Linux stopped processes Message-ID: <20060918131616.GA22307@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20060917221228.GA17263@host0.dyn.jankratochvil.net> <20060917222622.GA2150@nevyn.them.org> <20060918095331.GA9299@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060918095331.GA9299@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2006-09/txt/msg00098.txt.bz2 On Mon, Sep 18, 2006 at 11:53:31AM +0200, Jan Kratochvil wrote: > > Is this new in kernel.org? Or is it a Red Hat kernel patch? Where > > did it come from? > > Thanks for checking it. > OK, the patch was originally for GDB on Red Hat "kernel-2.6.17-1.2647.fc6". > > Still it is reproducible even on both linux-2.6.17.13 and linux-2.6.18-rc4, you > just need to "kill -CONT $pid" the inferior as gdb(1) will hang during > attaching to it. Screenshot (sorry for graphics): > http://www.jankratochvil.net/priv/gdb.png Oh right - I've seen this crash before. > Also the patch looks right to me - after `PT_ATTACH' it is appropriate that > `WSTOPSIG (status)' will report the original signal that stopped process, > (WSTOPSIG (status) == SIGSTOP) <=> (process was in running/sleeping mode). The part I was dubious about was the zero if already stopped by sigstop. In any case, I agree. The patch to linux-nat.c is OK to apply. I'm not sure about the testcase though :-( I don't think it'll work without the RH patched kernel, will it? -- Daniel Jacobowitz CodeSourcery