In the following commands, a missing tid implies the current thread.
Print everything known about the given thread:
thread -info tid
Hide or unhide the given (or current) thread. It will or will not show up in the generic threads listing:
thread [-hide | -unhide] tid
thread -unhide all
Keep the given thread from ever running. A suspended thread shows up with an S in the threads list:
thread -suspend tid
thread -resume tid
threads -mode
Control whether threads prints all threads or filters them by default:
threads -mode [all | filter]
Thread and LWP States |
Description |
---|---|
suspended |
Thread has been explicitly suspended. |
runnable |
Thread is runnable and is waiting for an LWP as a computational resource. |
zombie |
When a detached thread exits (thr_exit)), it is in a zombie state until it has rendezvoused through the use of thr_join(). THR_DETACHED is a flag specified at thread creation time (thr_create()). A non-detached thread that exits is in a zombie state until it has been reaped. |
asleep on syncobj |
Thread is blocked on the given synchronization object. Depending on what level of support libthread and libthread_db provide, syncobj might be as simple as a hexadecimal address or something with more information content. |
active |
The thread is active on an LWP, but dbx cannot access the LWP. |
unknown |
dbx cannot determine the state. |
lwpstate |
A bound or active thread state is the state of the LWP associated with it. |
running |
LWP was running but was stopped in synchrony with some other LWP. |
syscall num |
LWP stopped on an entry into the given system call #. |
syscall return num |
LWP stopped on an exit from the given system call #. |
job control |
LWP stopped due to job control. |
LWP suspended |
LWP is blocked in the kernel. |
single stepped |
LWP has just completed a single step. |
breakpoint |
LWP has just hit a breakpoint. |
fault num |
LWP has incurred the given fault #. |
signal name |
LWP has incurred the given signal. |
process sync |
The process to which this LWP belongs has just started executing. |
LWP death |
LWP is in the process of exiting. |