OpenSolaris

You are not signed in. Sign in or register.

OpenSolaris Community: Modular Debugger (MDB)

View the leaders for this community
Community Observers

Endorsed projects

About MDB

If you were a detective and were investigating at the scene of a crime, you might interview the witnesses and ask them to describe what happened and who they saw. However, if there were no witnesses or these descriptions proved insufficient, you might consider collecting fingerprints and forensic evidence that could be examined for DNA to help solve the case. Often, software program failures divide into analogous categories: problems that can be solved with source-level debugging tools, and problems that require low-level debugging facilities, examination of core files, and knowledge of assembly language to diagnose and correct. MDB is a debugger designed to facilitate analysis of this second class of problems.

It might not be necessary to use MDB in every case, just as a detective doesn't need a microscope and DNA evidence to solve every crime. However, when programming a complex low-level software system such as an operating system, these situations can occur frequently. As a result, MDB is designed as a debugging framework that allows you to construct your own custom analysis tools to aid in the diagnosis of these problems. MDB also provides a powerful set of built-in commands that allow you to analyze the state of your program at the assembly language level.

Using MDB

MDB is available on Solaris systems as two commands that share common features: mdb and kmdb. You can use the mdb command interactively or in scripts to debug live user processes, user process core files, kernel crash dumps, the live operating system, object files, and other files. You can use the kmdb command to debug the live operating system kernel and device drivers when you also need to control and halt the execution of the kernel. To start mdb, execute the mdb(1) command. To start kmdb, boot the system as described in the kmdb(1) man page, or execute the mdb command with the -K option.

MDB Documentation

MDB is described in detail in the Solaris Modular Debugger Guide, and also in the mdb(1) and kmdb(1) manual pages. MDB is available on Solaris 8, Solaris 9, and Solaris 10, and kmdb is only available in Solaris 10.

For more information on the internal MDB architecture and where to find associated source code, refer to the Architecture section. Also check out the Tips and Tricks section, which covers a wide variety of useful topics outside the standard documentation. If you're interested in MDB devlopment, you should search for "mdb" in the bug database for an interesting starter bug. Or check out the Future Projects section for possible long-term enhancements.

MDB Discussion

If you want to discuss MDB features and bugs, learn more about how to use MDB, or share an interesting tale of a problem you debugged, join the MDB Forum.

Blogs

JJMora.es - ZFS : Aprendiendo ZFS en 12 pasos

Dec 11, 3:25 AM

Este post no pretende ser un manual de ZFS, solo una sencilla guía ràpida que permita a los neófitos en la materia, disponer de un punto de inicio que les sirva de trampolín, para poder profundizar ...

eschrock - ZFS, FMA, hotplug, and Fishworks

Nov 20, 11:14 PM

In the past, I've discussed the evolution of disk FMA . Much has been accomplished in the past year, but there are still several gaps when it comes to ZFS and disk faults. In Solaris today, a fault ...

eschrock - Fishworks Storage Configuration

Nov 12, 11:25 AM

Since our initial product was going to be a NAS appliance, we knew early on that storage configuration would be a critical part of the initial Fishworks experience. Thanks to the power of ZFS storage ...

eschrock - So how much work was it?

Nov 11, 9:29 AM

With any product, there is always some talk from the enthusiasts about how they could do it faster, cheaper, or simpler. Inevitably, there's a little bit of truth to both sides. Enthusiasts have been ...

eschrock - Fishworks Hardware Topology

Nov 10, 7:05 AM

It's hard to believe that this day has finally come. After more than two and a half years, our first Fishworks-based product has been released. You can keep up to date with the latest info at the ...