From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 2574 invoked from network); 9 Jan 2003 19:16:05 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 9 Jan 2003 19:16:05 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18Wk2P-0002Xk-00; Thu, 09 Jan 2003 15:16:29 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18WiA1-0001v4-00; Thu, 09 Jan 2003 14:16:13 -0500 Date: Thu, 09 Jan 2003 19:16:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: Michael Snyder , kettenis@gnu.org Subject: Re: RFA[threads]: Fork event updates, part the thirteenth Message-ID: <20030109191613.GB32189@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, Michael Snyder , kettenis@gnu.org References: <20021215213952.GA3923@nevyn.them.org> <3E1A1710.7E0B931@redhat.com> <20030107005055.GA2981@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030107005055.GA2981@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00379.txt.bz2 On Mon, Jan 06, 2003 at 07:50:55PM -0500, Daniel Jacobowitz wrote: > On Mon, Jan 06, 2003 at 03:53:52PM -0800, Michael Snyder wrote: > > Daniel Jacobowitz wrote: > > > > > > Now is where it starts to get interesting. Michael, I mentioned this patch > > > to you at lunch last week. If you take a short-lived program, run it, and > > > detach it, and run it again, you'll see the exit of the _previous_ copy. > > > Then GDB gets hopelessly confused. I have a testcase for this which I'll > > > post in a moment. > > > > > > The reason it's included here is that that's essentially what happens if you > > > are using "set follow-fork-mode child". We detach from the parent, which > > > exits, confusing GDB. > > > > > > Is this OK? > > > > Hi Dan, > > > > Please excuse the delay. This seems OK. In child_wait, > > would it be possible to add a check to see if the exiting > > process is in our lwp list? > > I _think_ that child_wait will never be called if there is anything in > the LWP list; if we have LWPs, we'll have pushed thread_db onto the > stack, and we'll go to lin_lwp_wait instead if thre are any LWPs. But > I'm sleepy, so I may be missing something; I'll sit on this and look at > it again tomorrow :) > > Thanks. Having convinced myself of this, I've checked in the patch as-is. Thanks. Now for the testcase it fixes. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer