Built-In Kernel Debugger

Written By
Web Webster
Web Webster
Apr 14, 1999

Scott Lurndal from
Silicon Graphics wrote on linux-kernel:

Greetings,

I have written a built-in kernel debugger for the Linux
operating system on Intel 32-bit Architecture platforms.

It is being made available for general use and abuse under the
standard linux licensing terms (see ./COPYING in the linux source
distribution).

The 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.

Advertisement

To use the kernel debugger, unzip the patch found at

http://reality.sgi.com/slurn_engr/

and apply the patch as normal to your linux 2.2.3 or 2.2.4
source tree (it hasn’t been tested yet with 2.2.5). Configure the
new kernel ensuring that the CONFIG_KDB and CONFIG_KDB_FRAMEPTR
configuration options are enabled (via xconfig, menuconfig,
oldconfig or config make options).

Version 0.1 of the built-in kernel debugger for Linux provides
the following features:

  • Instruction Breakpoints
  • Data Access Breakpoints
  • Single Instruction Execution
  • Stack tracebacks
  • Stack traceback for arbitrary processes
  • Ability to switch cpus in SMP system
  • Memory examination and modification
  • Instruction disassembly
  • Access to static and global symbols by name
  • Register access and modification

After applying the kernel debugger patch to a 2.2.3 or 2.2.4
source tree and recompiling, one can enter the debugger in the
following ways:

  • An ooops will cause the debugger to be invoked
    automatically
  • Likewise a data access fault in kernel mode
  • Using the ‘kdb’ flag on the lilo command line
  • Using the ‘pause’ key
Advertisement

—-

Let me know what you think at slurn@engr.sgi.com

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.