This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, 2009-02-24 at 17:16 +0000, Pedro Alves wrote:
> On Tuesday 24 February 2009 15:58:31, Pedro Alves wrote:
> > On Tuesday 24 February 2009 15:31:53, Daniel Jacobowitz wrote:
> > > 81            /* Verify that this thread's pid field matches the child PID.
> > > 82               If its pid field is negative, it's about to do a fork or it
> > > 83               is the sole thread in a fork child.  */
> > 
> > Boo, I'm on glibc 2.7, which doesn't have this check, but I see it
> > in glibc-2.9 sources...
> > 
> > > It's checking that the PID (not TID) matches proc_handle.pid.  We need
> > > to find another way to read from a stopped thread, since if we put any
> > > other PID there, we get no threads.  I would suggest expanding
> > > ps_prochandle to include a memory thread as ptid_t.  
> > 
> > Right, I'll take this.
> 
> Here it is, how does it look?  This works on glibc-2.7, but then again, that
> version isn't affected by this.  Could one of you please give it a shot and
> see if it fixes the reported issue?
> 

Tested this with the Feb snapshot. The patch fixes the issue. I'm using
glibc-2.9..

Thanks,
Vinay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]