This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Thread exit & create events
>I am not sure why this would be any different on HP-UX unless they're
looking at WDB instead of GDB.
In GDB documentation it says
For example, on HP-UX, you see
[New thread 2 (system thread 26594)]
For example, on GNU/Linux, you might see
[New Thread 46912507313328 (LWP 25582)
Is it difficult to incorporate this small integer while reporting an
event in GDB ?
/ Veenu
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org]
Sent: Friday, August 24, 2007 2:01 PM
To: Mark Kettenis
Cc: Veenu Verma (AS/EAB); gdb@sourceware.org
Subject: 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