When it detects a multithreaded program, dbx tries to dlopen libthread_db.so, a special system library for thread debugging located in /usr/lib.
dbx is a synchronous dbx; when any thread or lightweight process (LWP) stops, all other threads and LWPs sympathetically stop. This behavior is sometimes referred to as the "stop the world" model.
For information on multithreaded programming and LWPs, see the Solaris Multithreaded Programming Guide.
The following thread information is available:
(dbx) threads t@1 a |@1 ?() running in main() t@2 ?() asleep on 0xef751450 in_swtch() t@3 b |@2 ?() running in sigwait() t@4 consumer() asleep on 0x22bb0 in _lwp_sema_wait() *>t@5 b |@4 consumer() breakpoint in Queue_dequeue() t@6 b |@5 producer() running in _thread_start() (dbx)
The * (asterisk) indicates that an event requiring user attention has occurred in this thread.
An 'o' instead of an asterisk indicates that a dbx internal event has occurred.
The arrow denotes the current thread.
t@num, the thread id, refers to a particular thread. The number is the thread_t value passed back by thr_create.
b l@num or a l@num means the thread is bound to or active on the designated LWP, meaning the thread is actually running.
Start function of the thread as passed to thr_create. A ?() means the start function is not known.
Thread state.
The function that the thread is currently executing.
To switch the viewing context to another thread, use the thread command. The syntax is:
thread [-info] [-hide] [-unhide] [-suspend] [-resume] tid
To display the current thread:
thread
thread tid
The following are commands for viewing the threads list. The syntax is:
threads [-all} [-mode [all|filter] [auto|manual]]
To print the list of all known threads:
threads
To print threads normally not printed (zombies):
threads -all
Use the cont command to resume program execution. Currently, threads use synchronous breakpoints so all threads resume execution.