Merged to the kernel all the way back in Linux 2.6.26 in 2008 was KGDB for improving the kernel debugging experience. KGDB works in conjunction with the GNU Debugger (GDB) to debug the kernel in a similar fashion to user-space debugging. KGDB requires the use of a second computer connected via serial or network cable. KGDB isn't widely used in recent years and a patch was floated today to remove it from the Linux kernel. Longtime Intel Linux developer Peter Zijlstra posted the patch for removing KGDB from the kernel. Peter argued in the patch message: "KGDB does some horrible things, and with everybody having access to virtualization these days, there is really no reason to use it over Qemu's gdb-server." Indeed debugging via VMs with the QEMU gdb-server is a cleaner approach than grabbing a null model cable and a second computer. The patch would remove KGDB support in its entirety from the kernel. In a response over the proposed removal, Peter elaborated on the issues with the KGDB code: "(In response to a prior comment: What if the debugging depends on specific hardware?) Use device pass-through, emulate it, or printk() debug it. Using KGDB can cause a ton of problems, it more or less stays stuck in NMI context, which can terminally screw up the timekeeping code, it can also cause the watchdogs to fire and there's endless annoyance with code patching and breakpoints. People have been trying to 'fix' the breakpoint code to be less broken in the face of KGBD, but its all terrible and really not worth it. By fat the sanest option is to just delete KGDB as proposed here. Also, when was the last time you used KGDB? I think I've tried it once, some 20 years ago, and haven't bothered since -- it was *that* good :-)" A suggestion was raised to potentially just disable KGDB initially via the Kconfig options and to remove it a few kernel releases later. We'll see what happens but there is movement for disabling and/or removing the KGDB support from the Linux kernel.
Linux Kernel Developers Considering Removal Of KGDB Debugging Functionality
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.