Linux Kernel Developer Proposes Removing KGDB Debugging Support
Longtime developer Peter Zijlstra has submitted a patch to remove KGDB from the Linux kernel, citing better alternatives like QEMU and ongoing technical issues.
A patch posted on October 28 proposes the complete removal of KGDB, the Linux kernel's built-in GDB debugging support that was originally merged in Linux 2.6.26 in 2008.
Longtime Intel Linux developer Peter Zijlstra submitted the patch and stated that KGDB "does some horrible things." He argued that widespread virtualization makes QEMU's gdb-server a simpler alternative than setting up a second machine with a serial or network cable.
According to Zijlstra, KGDB stays stuck in NMI context, disrupting timekeeping code and triggering watchdogs while causing ongoing trouble with code patching and breakpoints. For hardware-dependent debugging, he suggested device pass-through, emulation, or printk() debugging.
The patch removes KGDB entirely, though discussion participants have also suggested a slower route of disabling KGDB through Kconfig options before removing it in later kernel releases. No final decision has been made on the approach or timing.
