This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
pthread_t ids of threads not showed by "thread info"
- From: Stefano Sabatini <stefano dot sabatini-lala at poste dot it>
- To: gdb Mailing List <gdb at sources dot redhat dot com>
- Date: Thu, 22 Apr 2010 17:18:55 +0200
- Subject: pthread_t ids of threads not showed by "thread info"
Hi all,
$ gdb --version
GNU gdb (GDB) 7.1
(gdb) info threads
* 9 Thread 25919 0x0040cc7d in PSafeObject::LockReadOnly (this=0xb6d3d1d8)
at ../common/safecoll.cxx:144
8 Thread 25920 0x00885402 in __kernel_vsyscall ()
7 Thread 25921 0x00885402 in __kernel_vsyscall ()
6 Thread 25922 0x00885402 in __kernel_vsyscall ()
5 Thread 25927 0x00885402 in __kernel_vsyscall ()
4 Thread 25928 0x00885402 in __kernel_vsyscall ()
3 Thread 16215 0x00885402 in __kernel_vsyscall ()
2 Thread 16216 0x00885402 in __kernel_vsyscall ()
1 Thread 25917 0x00885402 in __kernel_vsyscall ()
(gdb) help info thread
IDs of currently known threads.
This shows the gdb thread number, the process ID and I don't know
what's contained in the fourth column, but that's for sure cannot be
the same as the pthread_t id as it is the same for all the threads.
On another machine I get this output:
3 Thread 0xb7642b70 (LWP 3334) (running)
2 Thread 0xb7e43b70 (LWP 3333) (running)
* 1 Thread 0xb7e446c0 (LWP 3327) 0xb7fe1424 in __kernel_vsyscall ()
Can you explain the differences, and why are there in the first place?
Also in the first scenario I cannot get the pthread_t information, which
is shown in the third column of the second scenario.
To me this sounds like a real puzzle, I'll be grateful to whom will
help me to figure it out, also a pointer to the location in the gdb
sources where the "info thread" command is executed would be welcome.
TIA, regards.