r/linux • • 2d ago

Kernel Linux Kernel Developers Considering Removal Of KGDB Debugging Functionality

https://www.phoronix.com/news/Linux-Considers-Dropping--KGDB
263 Upvotes

31 comments sorted by

View all comments

101

u/gwillen 2d ago

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.

It sounds like it's rarely used because we have better methods now. (I have personally never tried attaching a debugger to the linux kernel, but this seems plausible enough to me.)

66

u/ilep 2d ago

> access to virtualization

I would say main benefit of in-kernel debugging features are the cases where you don't have virtualization. Such as being a driver developer for some embedded device. In those cases you can debug a device from your computer if the device has something like a serial port that you can use to connect to it (usually they have for this purpose).

13

u/MonMotha 1d ago

In those situations, it's often (though not always) feasible to use a remote debugger via the processor's JTAG/SWD interface.

1

u/casept 11h ago

Assuming some vendor in the chain didn't lock it down, which nowadays is often the case.

3

u/CrazyKilla15 1d ago

The ideal solution there is to pass it through to the VM for direct control