Linux Kernel Developers Considering Removal Of KGDB Debugging Functionality
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…
Linux kernel developers are contemplating the removal of the KGDB debugging functionality, citing numerous issues and complications associated with its use. KGDB can potentially cause significant problems such as getting stuck in NMI context, disrupting timekeeping, activating watchdogs, and requiring tedious code patching and breakpoint management.
Despite efforts to improve the breakpoint code, developers have deemed the situation too problematic and believe that deleting KGDB would be the most sensible course of action. In light of virtualization becoming more prevalent, there are alternative debugging solutions available, like Qemu's gdb-server, device pass-through, emulation, or printk() debugging.
Michael Larabel, the principal author of Phoronix.com, argues that KGDB is so outdated and problematic that it's not worth using it, even joking about his last use of the tool being over 20 years ago.
Written by urgent.news from Phoronix's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.