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

Vinay Sridhar
2009-02-20T04:01:35Z

On Tue, 2009-02-17 at 08:29 -0500, Daniel Jacobowitz wrote:
> On Tue, Feb 17, 2009 at 11:21:47AM +0530, Vinay Sridhar wrote:
> > On Mon, 2009-02-16 at 10:04 -0500, Daniel Jacobowitz wrote:
> > > On Mon, Feb 16, 2009 at 03:54:28PM +0530, Vinay Sridhar wrote:
> > > > I was able to recreate this against a gcc compiled binary, so I guess
> > > > the omp implementation isnt an issue here.
> > >
> > > OK, then we're back to my earlier question:
> > >
> > > > 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.
> > >
> >
> > Same response. add_thread_with_info () is not called for parent thread.
>
> That doesn't answer the question, sorry. At some point, add_thread
> (not add_thread_with_info) must have been called. Where did that
> happen?
>
> > Could this be related? :
> > http://sourceware.org/ml/gdb-patches/2008-03/msg00266.html
>
> I don't think so.
>

I placed a break on "add_thread" as you suggested. It doesn't seem to be
hit at all, for any of the threads.
BTW, I'm using GNU gdb (GDB) 6.8.50.20090216.