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?


"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.

Mark


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