KGDB
Original author(s) | Dave Grothe |
---|---|
Developer(s) | LinSysSoft Technologies |
Operating system | Linux |
Type | Debugger |
License | GNU General Public License |
Website | http://kgdb.linsyssoft.com/ |
KGDB is a debugger for the Linux kernel. It requires two machines that are connected via a serial connection. The serial connection may either be an RS-232 interface using a null modem cable, or via the UDP/IP networking protocol (KGDB over Ethernet, KGDBoE).
KGDB was originally implemented as a patch to Linux kernel, but it has been included in the official kernel in 2.6.26. The target machine (the one being debugged) runs the patched kernel and the other (host) machine runs gdb. The GDB remote protocol is used between the two machines.
KGDB is available for the following architectures: x86, x86-64, PowerPC, ARM, MIPS, and S390.
It is free software released under the terms of the GNU General Public License.
Ingo Molnar and Jason Wessel created a slimmed-down and cleaned up version of KGDB which was called "kgdb light" (without ethernet support and many other hacks). This was the one merged into the 2.6.26 kernel.[1] The version of kgdb in the 2.6.26 kernel supports only rs232 using a driver which can split debugger inputs and console inputs such that only a single rs232 port is required.
Jason Wessel created a kgdb test suite which was merged into the 2.6.26 kernel in order to regression test the kgdb core as well as to aid in the validation of future architecture support for kgdb.
While "kgdb light" has _obviously_ zero impact on the kernel, it has lack of 2 functions, 1) symbolic debug and 2) remote debug. "kgdb light" does not read symbols in .ko file. So, you can't debug your module driver with its symbols. When a target which is under test locates out of reach, there is no way to break-in because it assumes to use SysRq. See x86_64 RPM for 2.6.18-92.el5 for binary rpm of kgdb.
FreeBSD
A program named kgdb is also used by FreeBSD. It is a gdb based utility for debugging kernel core files[2].
External links
- Linux Kernel Source Level Debugger
- Linux Kernel Source code
- FreeBSD kgdb manual
- KGDB Debugging screenshots
- kgdb at SourceForge.net
- x86_64 RPM for 2.6.18-92.el5