From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30675 invoked by alias); 14 Jan 2006 15:46:02 -0000 Received: (qmail 30650 invoked by uid 22791); 14 Jan 2006 15:46:01 -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; Sat, 14 Jan 2006 15:46:00 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1ExnbF-00039S-Tz; Sat, 14 Jan 2006 10:45:53 -0500 Date: Sat, 14 Jan 2006 15:46:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: andrew.stubbs@st.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] Disable thread specific breakpoints when thread dies Message-ID: <20060114154553.GA12028@nevyn.them.org> Mail-Followup-To: Mark Kettenis , andrew.stubbs@st.com, gdb-patches@sources.redhat.com References: <20051113184515.GG3599@nevyn.them.org> <437875B0.4000007@st.com> <20051114155659.GA25717@nevyn.them.org> <437A19DE.6040905@st.com> <437B47A1.4040705@st.com> <20051117034811.GB3057@nevyn.them.org> <437CA66B.9060201@st.com> <20060112162659.GA16141@nevyn.them.org> <43C7E466.9080703@st.com> <200601132011.k0DKBZ8w006107@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601132011.k0DKBZ8w006107@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i 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-01/txt/msg00154.txt.bz2 On Fri, Jan 13, 2006 at 09:11:35PM +0100, Mark Kettenis wrote: > > Date: Fri, 13 Jan 2006 17:33:26 +0000 > > From: Andrew STUBBS > > > > Daniel Jacobowitz wrote: > > >>> You shouldn't need to use the target method here. Does valid_thread_id > > >>> work? > > >>> > > >>> Also, please remember the space before opening parentheses. > > >> The thread still seems to have a valid ID after it has died. You can > > >> even do 'b 8 t 4' after the program has exited. It does give an error > > >> for threads which never existed though. > > > > > > Why does that happen? It is presumably a bug. > > > > > > > I have looked into this. The problem is that the threads are only > > deleted from the table when 'info threads' is used. The target method > > works because that queries the target, not GDB's internal state, and > > always gets the right answer (at least in our target interface). At a guess, we should be calling whatever the appropriate function is to empty the threads list in the generic bits of GDB, around where we call the target mourn_inferior hook. Does that make sense? > > I am happy, therefore, that the attached patch, with valid_thread_id(), > > is correct, and will work once this other problem has been solved (or if > > the user types 'info threads'). > > > > OK to commit? > > Sorry, but I don't think we should commit a patch that's just papering > over some other more serious problem, perhaps perhaps if there's some > pressing need to do so. Sorry about the confusion here - Mark, the patch Andrew posted is not a workaround, but exactly the opposite. It's a correct patch that ought to work, but doesn't because of a different bug, that he has volunteered to track down next week. With that clarified, do you have any objection to the patch? -- Daniel Jacobowitz CodeSourcery