Kernel debugging – why there are different approaches to it
When the kernel has an error, a bug, no matter how trivial or non-trivial, the entire system is considered to be in a bad, unrecoverable state and a kernel panic typically ensues – a fatal condition wherein the system generates a brief diagnostic and then simply halts (or, it can be configured to reboot after a timeout). Debugging these scenarios is inherently hard, as, at least on the surface, it appears as though there is no diagnostic information to work with, and even if there were, the system is unresponsive, essentially dead. So how do you retrieve diagnostic information in order to analyze it?
What you will soon realize is that even though there are several techniques, tools, and approaches to kernel debugging, not all of them are suitable for any and all scenarios – the tools or techniques you use are often dictated by the particular scenario you find yourself in.
So what are these scenarios...