The following commands enable you to view extended information
on threads, mutexes, read-write locks and conditional variables in
multi-threaded applications:
info thread [thread-id]
The info thread [thread-id] command displays
a list of known threads. If you provide a thread-id, the command displays extended information on the specified thread.
Consider the following example:
(gdb) info thread
system thread 4189 0x7f666da8
in __pthread_create_system+0x3d8 () from /usr/lib/libpthread.1
2 system thread 4188 worker (wptr=0x40004640 ") at quicksort.c:135
1 system thread 4184 0x7f66f728 in _lwp_create+0x10 () from /usr/lib/libpthread.1
|
info mutex [mutex-id]
The info mutex [mutex-id] command displays
a list of known mutexes. If a mutex-id is provided,
the command displays extended information on the specified mutex.
info condvar [condvar-id]
The info condvar [condvar-id] command displays
a list of known condition variables. If condvar-id is provided, the command displays extended information on the specified
condition variable.
info rwlock [rwlock-id]
The info rwlock [rwlock-id] command displays
a list of known read-write locks. If rwlock-id is
provided, the command displays extended information on the specified
read-write lock.