<?Pub CX solbook(?><preface id="preface-1"><title>Preface</title><highlights><para>The Modular Debugger (MDB) is a highly extensible, general purpose debugging
tool for the <trademark>Solaris</trademark> Operating System (Solaris OS).
The <citetitle>Solaris Modular Debugger Guide</citetitle> describes how to
use MDB to debug complex software systems, with a particular emphasis on the
facilities available for debugging the Solaris kernel and associated device
drivers and modules. It also includes a complete reference for and discussion
of the MDB language syntax, debugger features, and MDB Module Programming
API.</para><note><para>This Solaris release supports systems that use the
<trademark class="registered">SPARC</trademark> and x86 families of processor
architectures: <trademark class="registered">UltraSPARC</trademark>, SPARC64,
AMD64, Pentium, and Xeon EM64T. In this document the term &ldquo;x86&rdquo;
refers to 64-bit and 32-bit systems manufactured using processors compatible
with the AMD64 or Intel Xeon/Pentium product families. For supported systems,
see the <citetitle>Solaris OS Hardware Compatibility Lists</citetitle> at
<ulink url="http://www.sun.com/bigadmin/hcl/" type="url">http://www.sun.com/bigadmin/hcl/</ulink>.
This document cites any
implementation differences between the platform types.</para>
</note>
</highlights><sect1 id="mdb-whatsnew"><title>What's New in MDB</title><para><emphasis role="strong">SXCE build 102:</emphasis> Added the
<command>::stackinfo</command> dcmd.</para><para><emphasis role="strong">SXCE build 88:</emphasis> Added the
<option>b</option> option to the <command>::dis</command> dcmd.</para>
</sect1><sect1 id="preface-9"><title>Who Should Use This Book</title><para>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 facilitates analysis of this second class of
problems.</para><para>MDB is most useful when you are programming a complex low-level software
system such as an operating system. The MDB debugging framework allows you
to construct your own custom analysis tools to aid in the diagnosis of these
low-level problems. MDB also provides a powerful set of built-in commands
that enable you to analyze the state of your program at the assembly language
level.</para>
</sect1><sect1 id="gexnh"><title>Before You Read This Book</title><para>If you are not familiar with assembly language programming and debugging, <olink targetptr="preface-5" remap="internal">Related Books and Papers</olink> provides references
to materials that you might find useful.</para><para>You should disassemble various functions of interest in the programs
you will be debugging in order to familiarize yourself with the relationship
between your program's source code and the corresponding assembly language
code.  If you are planning to use MDB for debugging Solaris kernel software,
read carefully <olink targetptr="modules-1" remap="internal">Chapter&nbsp;8, Kernel Debugging
Modules</olink> and <olink targetptr="kmem-1" remap="internal">Chapter&nbsp;9, Debugging With
the Kernel Memory Allocator</olink>. These chapters provide more detailed
information on the MDB commands and facilities provided for debugging Solaris
kernel software.</para>
</sect1><sect1 id="preface-4"><title>How This Book Is Organized</title><para><olink targetptr="intro-1" remap="internal">Chapter&nbsp;1, Modular Debugger Overview</olink> provides
an overview of the debugger.</para><para><olink targetptr="concepts-1" remap="internal">Chapter&nbsp;2, Debugger Concepts</olink> describes
the MDB architecture and explains the terminology for the debugger concepts
used throughout this book.</para><para><olink targetptr="syntax-7" remap="internal">Chapter&nbsp;3, MDB Language Syntax</olink> describes
the syntax, operators and evaluation rules for the MDB language.</para><para><olink targetptr="interaction-3" remap="internal">Chapter&nbsp;4, Using MDB Commands
Interactively</olink> describes the MDB interactive command-line editing facilities
and output pager.</para><para><olink targetptr="commands-1" remap="internal">Chapter&nbsp;5, Built-In Commands</olink> describes
the set of built-in debugger commands that are always available.</para><para><olink targetptr="chp-exec" remap="internal">Chapter&nbsp;6, Execution Control</olink> describes
the MDB facilities for controlling the execution of live running programs.
This chapter is intended for application developers and device driver developers.
Execution control features might also be useful for system administrators.</para><para><olink targetptr="chp-kmdb" remap="internal">Chapter&nbsp;7, Kernel Execution Control</olink> describes
the MDB facilities for controlling the execution of the live operating system
kernel that are specific to <command>kmdb</command>. This chapter is intended
for operating system kernel developers and device driver developers.</para><para><olink targetptr="modules-1" remap="internal">Chapter&nbsp;8, Kernel Debugging Modules</olink> describes
the set of loadable debugger commands that are provided for debugging the
Solaris kernel. This chapter is intended for users who intend to examine Solaris
kernel crash dumps and for kernel software developers.</para><para><olink targetptr="kmem-1" remap="internal">Chapter&nbsp;9, Debugging With the Kernel
Memory Allocator</olink> describes the debugging features of the Solaris kernel
memory allocator and the MDB commands provided to take advantage of these
features. This chapter is intended for advanced programmers and kernel software
developers.</para><para><olink targetptr="api-5" remap="internal">Chapter&nbsp;10, Module Programming API</olink> describes
the facilities for writing loadable debugger modules. This chapter is intended
for advanced programmers and software developers who intend to develop custom
debugging support for MDB.</para><para><olink targetptr="options-1" remap="internal">Appendix&nbsp;A, Options</olink> provides
a reference for MDB command-line options.</para><para><olink targetptr="notes-1" remap="internal">Appendix&nbsp;B, Notes</olink> provides warnings
and notes about using the debugger.</para><para><olink targetptr="adb-trans-1" remap="internal">Appendix&nbsp;C, Transition From adb
and kadb</olink> provides a reference for <command>adb</command> commands
and their MDB equivalents. The <command>adb</command> command is implemented
by <command>mdb</command>.</para><para><olink targetptr="crash-4" remap="internal">Appendix&nbsp;D, Transition From crash</olink> provides
a reference for <command>crash</command> commands and their MDB equivalents.
The <command>crash</command> command is no longer present in the Solaris OS.</para>
</sect1><sect1 id="preface-5"><title>Related Books and Papers</title><para>The following books and papers are recommended and related to the tasks
that you need to perform:</para><itemizedlist><listitem><para>Vahalia, Uresh. <citetitle>UNIX Internals: The New Frontiers</citetitle>.
Prentice Hall, 2007. ISBN 0-13-021034-0</para>
</listitem><listitem><para>Mauro, Jim and McDougall, Richard. <citetitle>Solaris Performance
and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris</citetitle>.
Prentice Hall PTR, 2006. ISBN 0-13-156819-8</para>
</listitem><listitem><para>Mauro, Jim and McDougall, Richard. <citetitle>Solaris Internals:
Core Kernel Architecture</citetitle>. Prentice Hall PTR, 2000. ISBN 0-13-022496-5</para>
</listitem><listitem><para><citetitle>The SPARC Architecture Manual, Version 9</citetitle>.
Prentice Hall, 2000. ISBN 0&ndash;13&ndash;825001&ndash;4</para>
</listitem><listitem><para><citetitle>AMD64 Architecture Programmer's Manual</citetitle>.
Advanced Micro Devices, 2006. Available at <ulink url="http://developer.amd.com/" type="url"></ulink>.</para>
</listitem><listitem><para><citetitle>Pentium Pro Family Developer's Manual, Volumes
1-3</citetitle>. Intel Corporation, 1996. ISBN 1-55512-259-0 (Volume 1) ,
ISBN 1-55512-260-4 (Volume 2) , ISBN 1-55512-261-2 (Volume 3) </para>
</listitem><listitem><para>Bonwick, Jeff, and Jonathan Adams. <citetitle>Magazines and
Vmem: Extending the Slab Allocator to Many CPUs and Arbitrary Resourceso</citetitle>.
Proceedings of the 2001 USENIX Annual Technical Conference, 2001. Available
at <ulink url="http://www.usenix.org/publications/library/proceedings/usenix01/full_papers/bonwick/bonwick.pdf" type="url"></ulink>.</para>
</listitem><listitem><para>Bonwick, Jeff. <citetitle>The Slab Allocator: An Object-Caching
Kernel Memory Allocator</citetitle>. Proceedings of the Summer 1994 Usenix
Conference, 1994. ISBN 9&ndash;99&ndash;452010&ndash;5. Available at <ulink url="http://www.usenix.org/publications/library/proceedings/bos94/bonwick.html" type="url"></ulink>.</para>
</listitem><listitem><para><olink targetdoc="sparc" remap="external"><citetitle remap="book">SPARC Assembly Language Reference Manual</citetitle></olink>. Sun Microsystems, 2002.</para>
</listitem><listitem><para><olink targetdoc="x86" remap="external"><citetitle remap="book">x86 Assembly Language Reference Manual</citetitle></olink>. Sun Microsystems, 2005.</para>
</listitem><listitem><para><olink targetdoc="driver" remap="external"><citetitle remap="book">Writing Device Drivers</citetitle></olink>. Sun Microsystems, 2008.</para>
</listitem><listitem><para><olink targetdoc="streams" remap="external"><citetitle remap="book">STREAMS Programming Guide</citetitle></olink>. Sun Microsystems, 2000.</para>
</listitem><listitem><para><olink targetdoc="sol64trans" remap="external"><citetitle remap="book">Solaris 64-bit Developer&rsquo;s Guide</citetitle></olink>. Sun Microsystems, 2000.</para>
</listitem><listitem><para><olink targetdoc="llm" remap="external"><citetitle remap="book">Linker and Libraries Guide</citetitle></olink>. Sun Microsystems, 2007.</para>
</listitem>
</itemizedlist><para>Third-party URLs are referenced in this document and provide additional,
related information.</para><note><para>Sun is not responsible for the availability of third-party web
sites mentioned in this document. Sun does not endorse and is not responsible
or liable for any content, advertising, products, or other materials that
are available on or through such sites or resources. Sun will not be responsible
or liable for any actual or alleged damage or loss caused or alleged to be
caused by or in connection with use of or reliance on any such content, goods,
or services that are available on or through such sites or resources.</para>
</note>
</sect1>&sundocs;&typeconv;
</preface><?Pub *0000010802 0?>