Remix.run Logo
m463 5 days ago

debuggers are hard to use outside of userland.

For really hairy bugs in programs that can't be stopped (kernel/drivers/realtime, etc) logging works.

And when it doesn't, like when you can't do I/O or switching of any kind, log non-blocking to a buffer that is dumped elsewhere.

also, related. It is harder than it should be to debug the linux kernel. Just getting a symboled stack trace is ridiculously hard.

ofrzeta 4 days ago | parent [-]

You can debug the kernel with kgdb https://linuxlink.timesys.com/docs/how_to_use_kgdb There is even KGDBoE to debug over the network.

m463 4 days ago | parent [-]

I wasn't saying you can't debug the kernel.

I was saying that for practical purposes, debugging the kernel is needlessly hard.

As one example, say you are running the current ubuntu. A kernel panic will give you a bunch of hex addresses. How do you get a symbol'd backtrace of the kernel panic?

(if you can't get that easily, running kgdb won't let you do symbolic debugging either)