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: Problema de lentitud en Solaris 10

Jun 5, 5:01 AM

Normalmente no suelo contar demasiado sobre el día a día de mi trabajo, pero aveces ocurren cosas curiosas que creo que son interesantes contarlas, sobre todo, por si pueden ser de ayuda para otros ...

eschrock - Sun Storage 7210 Expansion

Jun 1, 10:36 PM

Last week, we announced the Sun Storage 7310 system. At the same time, a less significant but still notable change was made to the Sun Storage product line. The Sun Storage 7310 system is now ...

JJMora.es - SPARC: Rendimiento del SPARC64 VI

Mar 17, 5:39 AM

En un post anterior, hemos hablado cómo podemos medir el rendimiento del procesador UltraSPARC T2+. Siguiendo con esta serie de posts, ahora vamos a ver como podemos analizar el comportamiento del ...

JJMora.es - Solaris: Memory Leak o ZFS usando cache ARC.

Mar 13, 8:59 AM

Si estas apuntado a la lista perf dash discuss at opensolaris dot org, habràs podido ver el revuelo que se ha generado durante esta semana debido a un posible problema de fuga de memoria en el Kernel de Solaris ...

JJMora.es - SPARC: Rendimiento del T2+

Mar 11, 11:42 AM

Hace algún tiempo que Sun ha puesto en escena el procesador UltraSPARC T2+, puedes leer una pequeña descripción de este procesador en el siguiente link. El procesador dispone de varios cores ...