Go to main content

Oracle® Solaris Modular Debugger Guide

Exit Print View

Updated: February 2021

MDB Features

MDB provides an extensive collection of features for analyzing the Oracle Solaris kernel and other target programs.

    The following examples show some of the tasks you can do with MDB:

  • Perform post-mortem analysis of kernel crash dumps and user process core dumps. MDB includes a collection of debugger modules that facilitate sophisticated analysis of kernel and process state, in addition to standard data display and formatting capabilities.

      These debugger modules enable you to formulate complex queries to investigate kernel and process state in the following ways:

    • Locate all the memory allocated by a particular thread

    • Print a visual picture of a kernel STREAM

    • Determine what type of structure a particular address refers to

    • Locate leaked memory blocks in the kernel

    • Analyze memory to locate stack traces

  • Use the MDB module programming API to implement your own debugger commands and analysis tools without having to recompile or modify MDB. In MDB, debugging support is implemented as a set of loadable modules (shared libraries that the debugger can open with the dlopen(3C) function), each of which provides a set of commands that extends the capabilities of MDB. MDB provides an API of core services, such as the ability to read and write memory and access symbol table information. MDB provides a framework for you to implement debugging support for your own drivers and modules. Your command and tools can then be made available for everyone to use.

  • Learn to use MDB. MDB provides backward compatibility with the legacy debugging tools adb and crash.

    The MDB language is a superset of the adb language. All existing adb macros and commands work within MDB. Thus, developers who use adb can immediately use MDB without knowing any MDB-specific commands. For more information, see Transition From adb and kadb to MDB.

    MDB commands surpass the functionality available from the crash utility. For more information, see Transition From crash to MDB.

  • Benefit from enhanced usability features, including the following:

    • Command-line editing

    • Command history

    • Built-in output pager

    • Syntax error checking and handling

    • Online help

    • Interactive session logging