This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Thread exit & create events
On Fri, Aug 24, 2007 at 12:46:24PM +0200, Mark Kettenis wrote:
> > 2. GDB thread identifier is not speicified when a thread is created or
> > exited. Only system identifier is used.
> > Again thread-list-ids uses only gdb thread identifier. Hence, the
> > mismatch and the problem.
> > Since on HP-UX systems gdb thread identifier is shown, I'm guessing it
> > shouldn't be hard to do the same for Linux.
> > Is there a reason for not to have gdb identifier on linux or it's just
> > that it's not done yet.
>
> HP-UX has a rather well thought out debugging interface for threads.
> That interface includes the possibility to store a thread identifier
> in the kernel whenever a thread is created, and the debugger can ask
> for that identifier. That makes it possible for GDB to always know
> the thread identifier.
I think that's not the same question we were asked. The GDB thread
identifier is just the small integer associated with the thread in
GDB's list. We say [New thread Thread BIG-OS-THREAD-ID] instead of
[New thread 2] but you have to say "thread 2" at the GDB prompt to
select it.
There's no good reason for it that I know of. I am not sure why this
would be any different on HP-UX unless they're looking at WDB instead
of GDB.
--
Daniel Jacobowitz
CodeSourcery