This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Disable thread specific breakpoints when thread dies
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 12 Jan 2006 11:26:59 -0500
- Subject: Re: [PATCH] Disable thread specific breakpoints when thread dies
- References: <43723446.7000903@st.com> <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>
On Thu, Nov 17, 2005 at 03:48:59PM +0000, Andrew STUBBS wrote:
> Daniel Jacobowitz wrote:
> >On Wed, Nov 16, 2005 at 02:52:17PM +0000, Andrew STUBBS wrote:
> >
> >>+ /* There is no point inserting thread-specific breakpoints if the
> >>+ thread no longer exists. */
> >>+ if (b->owner->thread != -1
> >>+ && !target_thread_alive(thread_id_to_pid(b->owner->thread)))
> >>+ continue;
> >
> >
> >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.
--
Daniel Jacobowitz
CodeSourcery