Open Source
KDB (Built-in Kernel Debugger)

This page describes the built-in kernel debugger for linux. This debugger is part of the linux kernel and provides a means of examining kernel memory and data structures while the system is operational. Additional commands may be easily added to format and display essential system data structures given an identifier or address of the data structure. Current command set allows complete control of kernel operations including single-stepping a processor, stopping upon execution of a specific instruction, stopping upon access (or modification) of a specific virtual memory location, stopping upon access to a register in the input-output address space, stack tracebacks for the current active task as well as for all other tasks (by process id), instruction disassembly, et. al.

To use the kernel debugger, download and unzip the patch and apply the patch as normal to your linux source tree.

$ cd linux
$ patch -p1 < kdb-xxx
$ make *config

Configure the new kernel ensuring that the CONFIG_KDB configuration option is enabled (via xconfig, menuconfig, oldconfig or config make options). We also recommend CONFIG_FRAME_POINTER for better debugging, although that option uses an extra register and generates slightly slower kernel code.

To use kdb v1.2 you must install modutils >= 2.3.11 from
Mirror at ftp://ftp.<country>
Mirror at
Master at (slow)

Currently there are separate versions of kdb for ix86 and IA64. We hope to merge them into a single version eventually.

NOTE: The 'bp' command is non-functional in v1.1. The 'bph' and 'bpha' commands should be used instead. 'bp' works in kdb v1.2.

For 2.2 series kernels, use the kdb_v0.6-2.2.13 patch available in the download directory. SGI is not upgrading kdb for 2.2 kernels at the moment. If anybody wants to backport kdb v1.3 to a 2.2 kernel, please send patches or URLs to the kdb mailing list.

Documentation for the kernel debugger and manual pages for the kernel debugger commands will be located in the kdb subdirectory of the Documentation directory in the patched source tree.

The various releases of the kernel debugger are available for download from:


Information on this project can be found at: