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 - Solaris: Analizando ficheros Core Dump (II)

May 13, 9:31 AM

En el post "Solaris: Analizando ficheros Core Dump" vimos en un sencillo ejemplo como podemos analizar los ficheros core generados por alguna de nuestras aplicaciones y cómo podemos intentar ...

JJMora.es - OpenSolaris: easyDTrace

May 12, 6:32 AM

Una de las primeras impresiones que obtuve cuando comencé a trabajar con DTrace fue la cantidad de sondas que existen en el sistema y cómo este número irà aumentando poco a poco, para ayudar a ...

JJMora.es - OpenSolaris: Charla de la Comunidad en la UPM

Apr 22, 3:31 AM

Mañana, miércoles 23 de abril, en la facultad de informàtica de la Universidad Politécnica de Madrid, la comunidad hispana de OpenSolaris darà varias charlas sobre ZFS, DTrace, Virtualización y ...

JJMora.es - ¿Sabías que... la variable LD_PRELOAD ... ?

Apr 15, 10:45 AM

Nos permite construir librerías para la interposición de nuestras propias funciones en el sistema. La interposición de librerías es un método empleado, para que de forma totalmente transparente para ...

JJMora.es - OpenSolaris: Viernes Técnicos Almacenamiento

Apr 14, 8:31 AM

El próximo viernes 25 de Abril, tendremos otra sesión de los viernes técnicos de la Comunidad Hispana de OpenSolaris, esta vez el evento tratarà sobre Almacenamiento. Si queres asistir debes ...