KGDB
   HOME

TheInfoList



OR:

KGDB is a
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
for the Linux kernel and the kernels of NetBSD and FreeBSD. It requires two machines that are connected via a serial connection. The serial connection may either be an
RS-232 In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such ...
interface using a
null modem Null modem is a communication method to directly connect two DTEs (computer, terminal, printer, etc.) using an RS-232 serial cable. The name stems from the historical use of RS-232 cables to connect two teleprinter devices or two modems in orde ...
cable, or via the UDP/IP networking protocol (KGDB over Ethernet, KGDBoE). The target machine (the one being debugged) runs the patched kernel and the other (host) machine runs
gdb The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others. History GDB was first written by ...
. The GDB remote protocol is used between the two machines. KGDB was implemented as part of the NetBSD kernel in 1997, and FreeBSD in version 2.2. The concept and existing remote gdb protocol were later adapted as a patch to the Linux kernel. A scaled-down version of the Linux patch was integrated into the official Linux kernel in version 2.6.26. KGDB is available for the following architectures under Linux:
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was intr ...
,
x86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit version of the x86 instruction set, first released in 1999. It introduced two new modes of operation, 64-bit mode and compatibility mode, along with a new 4-level paging ...
, PowerPC,
ARM In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
, MIPS, and
S390 The IBM System/390 is a discontinued mainframe product family implementing the ESA/390, the fifth generation of the System/360 instruction set architecture. The first computers to use the ESA/390 were the Enterprise System/9000 (ES/9000) ...
. It is available on all supported architectures of NetBSD and FreeBSD using only RS-232 connectivity. Amit Kale maintained the Linux KGDB from 2000 to 2004. From 2004 to 2006, it was maintained by Linsyssoft Technologies, after which Jason Wessel at Wind River Systems, Inc. took over as the official maintainer. 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. This version of kgdb supports only RS-232 connectivity, using a special driver which can split debugger inputs and console inputs such that only a single serial port is required.


FreeBSD

A program named kgdb is also used by FreeBSD. It is a gdb based utility for debugging kernel core files. It can also be used for remote "live" kernel debugging, much in the same way as the Linux KGDB, over either a serial connection or a firewire link.FreeBSD handbook: remote KGDB
/ref>


References


External links




KGDB and KDB wiki, the official home of kgdb and kdb for kernel.org

2.5 & up to 2.6.15 Linux Kernel Source Level Debugger

FreeBSD kgdb manual

kgdb
at SourceForge.net Debuggers Third-party Linux kernel modules {{programming-software-stub