Appendix B. Debugging

This appendix contains information about debuggers and the debugging process.

B.1 The Solaris Modular Debugger (mdb)

The following tables list some useful commands of the Solaris Modular Debugger (mdb). For a complete list of available commands, see the Solaris Modular Debugger Guide.[91]

Starting and Stopping mdb

Command

Description

mdb program

Starts mdb with program to debug.

mdb unix.<n> vmcore.<n>

Runs mdb on a kernel crash dump (unix.<n> and vmcore.<n> can typically be found in the directory /var/crash/<hostname>).

$q

Exits the debugger.

General Commands

Command

Description

::run arguments

Runs the program with the given arguments. If the target is currently running or it is a corefile, mdb will restart the program if possible.

Breakpoints ...

Get A Bug Hunter's Diary now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.