Re: [RFC][Patch] Fix gdb failure to access tls data for parent thread

Vinay Sridhar
2009-02-11T08:33:18Z

On Wed, 2009-02-04 at 08:28 -0500, Daniel Jacobowitz wrote:
> On Fri, Jan 09, 2009 at 02:16:09PM +0530, Vinay Sridhar wrote:
> > The reason for this is gdb does not fill in the private field of the
> > thread_info structure of the parent thread. The below patch sets up
> > this private field before the child threads are added to gdb's list.
>
> The private info is set in attach_thread. That is supposed to be
> called for every thread; how did you get a thread on the thread list
> that did not have this routine called? A breakpoint on add_thread
> and add_thread_with_info will probably figure this out.
>

Daniel,

Sorry for the late response. I can confirm that attach_thread is not
called on the parent thread. The test case I had listed in my earlier
mail uses OMP for thread creation. Could that have something to do with
this?

Thanks,
Vinay