This is the mail archive of the gdb@sources.redhat.com 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]

Re: Is the current gdb 5.1 broken for Linuxthreads?


On Wed, Sep 19, 2001 at 03:28:55PM +0200, Mark Kettenis wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > It looks like with gdb 5.1, I have to attach the very first thread. Is
> > that documented anywhere? Shouldn't gdb find the very first thread
> > and attach it for me?
> 
> Yep, you'll have to attach to the very first thread.  No it isn't
> documented anywhere.  Yes, GDB should at least try to find out what's
> the "very first thread", and indeed right now it doesn't.
> 
> Since the kernel treats the initial process differently from the
> "cloned" processes, GDB has to know about the initial process.
> There's no easy way to get this information from the kernel, so GDB
> must either get the information from the user, or from the threads
> library.  At the point that I wrote the code I didn't immediately see
> how to get the necessary info from the threads library, so the user
> must specify it.  I'll try to find the proper place to document this,
> and think again about getting the info from the threads library.
> 

The only problem I saw so far is gdb calls wait () on cloned processes
when we are not attaching the very first thread. What else could be
wrong if we are not attaching the very first thread.


H.J.


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