Multithreaded Programming Guide

Using mdb(1)

The following mdb commands can be used to access the LWPs of a multithreaded program.

Table 7–3 MT mdb Commands


Attaches to process # pid. This stops the process and all its LWPs.


Detaches from process. This resumes the process and all its LWPs. 


Lists all active LWPs in the (stopped) process. 


Switches focus to LWP # n.


Shows the LWP currently focused. 


Ignores signal number num.

These commands to set conditional breakpoints are often useful.

Table 7–4 Setting mdb Breakpoints

[label],[count]:b [expression]

Breakpoint is detected when expression equals zero

foo,ffff:b <g7-0xabcdef

Stop at foo when g7 = the hex value 0xABCDEF