Compaq AA-RH99A-TE Remote Starter User Manual


 
3
Writing Extensions to the kdbx Debugger
To assist in debugging kernel code, you can write an extension to the kdbx
debugger. Extensions interact with kdbx and enable you to examine kernel
data relevant to debugging the source program. This chapter provides the
following:
A list of considerations before you begin writing extensions (Section 3.1)
A description of the kdbx library routines that you can use to write
extensions (Section 3.2)
Examples of kdbx extensions (Section 3.3)
Instructions for compiling extensions (Section 3.4)
Information to help you debug your kdbx extensions (Section 3.5)
The Tru64 UNIX Kernel Debugging Tools subset must be installed on your
system before you can create custom extensions to the kdbx debugger.
This subset contains header files and libraries needed for building kdbx
extensions. See Section 3.1 for more information.
3.1 Basic Considerations for Writing Extensions
Before writing an extension, consider the following:
The information that is needed
Identify the kernel variables and symbols that you need to examine.
The means for displaying the information
Display the information so that anyone who needs to use it can read
and understand it.
The need to provide useful error checking
As with any good program, it is important to provide informational error
messages in the extension.
Before you write an extension, become familiar with the library routines in
the libkdbx.a library. These library routines provide convenient methods
of extracting and displaying kernel data. The routines are declared in the
/usr/include/kdbx.h header file and described in Section 3.2.
You should also study the extensions that are provided on your system in
the /var/kdbx directory. These extensions and the example extensions
Writing Extensions to the kdbx Debugger 3–1