[PATCH] Disable thread specific breakpoints when thread dies

Andrew STUBBS andrew.stubbs@st.com
Fri Jan 13 17:35:00 GMT 2006


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).

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?

I'll have a look for real problem next week probably.

Andrew Stubbs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thread-break-3.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060113/98cb8595/attachment.ksh>


More information about the Gdb-patches mailing list