O'Reilly logo

A Bug Hunter's Diary by Tobias Klein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required