2
Kernel Debugging Utilities
The Tru64 UNIX system provides several tools you can use to debug the
kernel and kernel programs. The Ladebug debugger (available as an option)
is also capable of debugging the kernel.
This chapter describes three debuggers and a utility for analyzing crash
dumps:
• The dbx debugger, which is described for kernel debugging in Section 2.1.
(For general dbx user information, see the Programmer’s Guide.)
You can use the dbx debugger to display the values of kernel variables
and kernel structures. However, you must understand the structures
and be prepared to follow the address links to find the information you
need. You cannot use dbx alone to control execution of the running
kernel, for example by setting breakpoints.
• The kdbx debugger, which is described in Section 2.2.
The kdbx debugger is an interface to dbx that is tailored specifically
to debugging kernel code. The kdbx debugger has knowledge of the
structure of kernel data and so displays kernel data in a readable format.
Also, kdbx is extensible, allowing you to create commands that are
tailored to your kernel-debugging needs. (Chapter 3 describes how to
tailor the kdbx debugger.) However, you cannot use dbx command line
editing features when you use the kdbx debugger.
• The kdebug debugger, which is described in Section 2.3.
The kdebug debugger is a kernel-debugging program that resides
inside the kernel. Working with a remote version of the dbx debugger,
the kdebug debugger allows you to set breakpoints in and control the
execution of kernel programs and the kernel.
• The crashdc utility, which is described in Section 2.4.
The crashdc utility is a crash dump analysis tool. This utility is useful
when you need to determine why the system is hanging or crashing.
The sections that follow describe how to use these tools to debug the kernel
and kernel programs.
Kernel Debugging Utilities 2–1