Other debuggers


Other debuggers

Throughout this book, with a few exceptions, we will be working with adb . However, since you will run into other debuggers, let's talk about some of them now before we continue our discussion about adb .

dbx, dbxtool , & debugger

On Sun systems, you'll find at least five other debuggers. Three of these, dbx, dbxtool, and debugger , are excellent tools for debugging user-level programs and applications. They are rather sophisticated in nature, they work with the program source code, and they are designed to be more user -friendly. However, all three require special compiler options to be used to create debuggable object files that include the symbol table.

The kernel is not built with the special options, so there is no advantage to be gained by using these debuggers. Also, adb is the only debugger that understands how to work with kernel address mappings, and it has macro files (more about these later) to help dump out kernel data structures.

The kernel resident absolute debugger, kadb

A bootable sibling of adb exists on many UNIX systems. Known as the k ernel a bsolute d e b ugger, kadb is booted up instead of a UNIX kernel. kadb then loads in and executes a kernel, allowing for setting of breakpoints and live modifications and examinations of the kernel. kadb also has a macro facility; however, it differs from the adb macros feature in that the available macros must be prebuilt into the kadb executable.

You'll find that if you can use adb , you'll feel pretty comfortable using kadb . However, having said that, your first couple of experiences using kadb may surprise you a bit. When the system " drops " into kadb , in other words, when kadb takes over and you see the kadb prompt, everything else stops! You will no longer have a window system, you won't be able to run background processes, and the system will be inaccessible to anyone but the person looking at the kadb prompt on the console. Keeping this in mind, you would be wise to have another system handy for access to source code and any other tools you might need while working within kadb . Failing that, you might want to keep handy some printouts of the routines you plan to examine.

The crash program

Another debugging tool you'll find on some UNIX systems is the crash program. We've already seen an example of when we might want to use crash ; however, in general we still prefer to use the tool and the macros that the UNIX kernel developers use. That, of course, means adb . We hope that, by the end of this book, you too will be convinced that adb is your kernel debugger of choice!



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net