threads: Thread display and control

If execution is stopped for any one thread, the entire process and all other threads in the process also stop. The dbx events such as breakpoints are not specific to any one thread. If one thread hits a breakpoint, all threads and the process stop. An automatic way to ensure that other threads do not hit breakpoints set by next(i) or step(i) is to set the variable $hold_next. dbx will then hold all threads except the current thread during those operations, then unhold all threads after the operation is complete. Holding all threads, or holding a thread that may release a mutex will cause the user program to deadlock. Conditional breakpoints can be used to specify breakpoints for any one particular thread by checking the execution state of the thread.

For example:
'stop at 42 if $t2==$current'
will set a breakpoint at line 42 only for thread two.

For thread display and control, see the condition, mutex, readwritelock, and thread commands. For manipulation of thread-oriented dbx variables ($c<n>, $t<n>, $l<n>, $current, $hold_next, $cv_events, $mv_events, $tv_events, and $lv_events), see the assign, print, set, and whatis commands.