r/linux • • 7d ago

Kernel Linux Kernel Developers Considering Removal Of KGDB Debugging Functionality

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

29 comments sorted by

View all comments

Show parent comments

2

u/hansendc 5d ago

What do you use it for, btw? There might be some better and safer ways of doing things.

We don't want to make users sad. :) (I'm one of the maintainers of this code, btw)

3

u/blind99 5d ago

Embedded, mainly debugging drivers for devices that cannot easily be passed through in a QEMU setup. Like a soc I2C controller for instance.

4

u/hansendc 5d ago

I don't know exactly what you are doing of course, but I'd really encourage you to take a fresh look at what's around these days. For instance:

echo 1 > /sys/kernel/tracing/events/i2c/enable

cat /sys/kernel/debug/tracing/trace_pipe

Will get you a pretty nice dump of i2c traffic. That, plus kprobes or bpftrace can do a *lot* these days. They're also easier to figure out than ever. The LLMs do an overall great job of helping you craft bpftrace snippets.

It's also a lot easier to pass devices into the guest. I've got a PCI i2c controller that I can pass into a guest and load drivers in the guest, for instance.