KGDB
KGDB is a debugger for the Linux kernel and for the kernels of NetBSD and FreeBSD. It lets you debug a running or crashed kernel from another machine.
How it works
- You need two machines connected either by a serial link (RS-232 with a null modem cable) or over a network (KGDB over Ethernet, KGDBoE).
- The machine being debugged (the target) runs a patched kernel. The other machine (the host) runs GDB. They talk using the GDB remote protocol.
Origins and how it evolved
- KGDB began in NetBSD in 1997 and later appeared in FreeBSD (version 2.2).
- The concept and a remote GDB protocol patch were adapted for Linux, where a lighter version called “kgdb light” was merged into the 2.6.26 kernel.
- KGDB light is simplified: it uses RS-232 only and includes a driver to separate debugger input from console input, so only one serial port is needed.
- Linux KGDB supports several architectures: IA-32, x86-64, PowerPC, ARM, MIPS, and ESA/390. NetBSD and FreeBSD use RS-232 connectivity for KGDB on their supported architectures.
Maintainers and history
- Linux KGDB was maintained by Amit Kale (2000–2004), then Linsyssoft Technologies (2004–2006).
- Since 2006, Jason Wessel of Wind River Systems has been the official maintainer.
- The slimmed-down Linux version, kgdb light, was created by Ingo Molnar and Jason Wessel and merged into Linux 2.6.26.
Other uses
- FreeBSD also has a gdb-based program named kgdb for debugging kernel core dumps. It can be used for remote “live” kernel debugging over serial or FireWire, similar to the Linux KGDB setup.
This page was last edited on 3 February 2026, at 17:56 (CET).