The following mdb commands can be used to access the LWPs of a multithreaded program.
Table 7–3 MT mdb Commands
pid:A |
Attaches to process # pid. This stops the process and all its LWPs. |
:R |
Detaches from process. This resumes the process and all its LWPs. |
$L |
Lists all active LWPs in the (stopped) process. |
n:l |
Switches focus to LWP # n. |
$l |
Shows the LWP currently focused. |
num:i |
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 |