RFC: Re: [patch] Fix for 'info threads' crashes if zombie threads exist
Daniel Jacobowitz
drow@false.org
Tue Jun 20 17:11:00 GMT 2006
On Tue, Jun 20, 2006 at 07:04:51PM +0200, Jan Kratochvil wrote:
> Hi Christoph,
>
> On Tue, 20 Jun 2006 18:21:41 +0200, Christoph Bartoschek wrote:
> ...
> > I applied your patch to gdb 6.4 and do not see the error again.
>
> sincerely thanks for the test.
>
> Is there any objection regarding the patch import? What was the original
> TD_DEATH notification reason? Not sure if the patch is compatible with
> non-Linux platforms.
A little patience, please. It takes a while to review GDB patches,
especially non-obvious ones - and thread-db support seems to be quite
complicated.
TD_DEATH events were supported because there are all sorts of things
which can go wrong when you ask libthread_db about a thread that it
considers dead. At that point, as far as the library is concerned, the
thread is gone. A new thread can be created with the same thread ID -
even before this one exits. If you ask it to map that thread ID to an
LWP, it will refuse. After your patch, I strongly suspect there are
places where you could hit control-c and get mysterious errors from
GDB.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb-patches
mailing list