Multithreaded Programming Guide

Using mdb

For information about mdb, see the Solaris Modular Debugger Guide.

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

$l

Prints the LWP ID of the representative thread if the target is a user process.

$L

Prints the LWP IDs of each LWP in the target if the target is a user process.

pid::attach

Attaches to process # pid.

::release

Releases the previously attached process or core file. The process can subsequently be continued by prun(1) or it can be resumed by applying MDB or another debugger.

These commands to set conditional breakpoints are often useful.

[ addr ] ::bp [+/-dDestT] [-c cmd] [-n count] sym ...

Set a breakpoint at the specified locations.

addr ::delete [ id | all]

Delete the event specifiers with the given ID number.