Multithreaded Programming Guide

Using adb(1)

When you bind all threads in a multithreaded program, a thread and an LWP are synonymous. Then you can access each thread with the following adb commands that support multithreaded programming.

Table 7-3 MT adb 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 adb 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