DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Driver testing and debugging

Using crash and the kernel debuggers

The crash and crash(ADM) command and the kernel debuggers are invaluable tools for analyzing problems with your driver. They can help you identify driver errors such as corrupted data structures and pointers to the wrong address.

You need a thorough knowledge of assembler, of reading core dumps, and of systems programming concepts to effectively use these facilities. The need to know assembler cannot be overemphasized. Much of the output is displayed in assembler mnemonics and as strings of hex numbers that must be translated into address locations, stack frames, and memory offsets.

These facilities can be summarized as:


crash
displays the contents of various kernel structures and allows you to analyze how your driver interacts with the core image of the operating system. It is most frequently used in postmortem analysis of a system panic, but can also be run on an active system.

kernel debuggers
can set breakpoints, display kernel stack traces and various kernel structures, and modify the contents of memory, I/O, and registers. The debuggers support basic arithmetic operations, conditional execution, variables, and macros. They can convert a symbol name to its virtual address, a virtual address to the value at that address, and a virtual address to the name of the nearest kernel symbol. You have a choice of different numeric bases, address spaces, and operand sizes.

SCO SVR5 2.0 and earlier systems support the kdb debugger, and SCO OpenServer 5 systems support the scodb debugger. SVR5 systems support both kdb and scodb. scodb on SCO OpenServer 5 has some features that are not supported for SVR5, such as support for emacs-style editing and a command-line interface.

For SVR5 systems, scodb requires that kdb also be linked into the kernel. When both debuggers are configured, you can switch between them using the newdebug line at a shell prompt.

Both kdb and scodb are assembly language debuggers, not source debuggers.


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005