Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Modular Debugger Guide Oracle Solaris 11.1 Information Library |
4. Using MDB Commands Interactively
9. Debugging With the Kernel Memory Allocator
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 a first-class 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 if you are already familiar with the legacy debugging tools adb and crash. MDB provides backward compatibility with these existing debugging solutions. 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. MDB also provides commands that surpass the functionality available from the crash utility.
Benefit from enhanced usability features.
MDB provides many usability features, including the following:
Command-line editing
Command history
Built-in output pager
Syntax error checking and handling
Online help
Interactive session logging