There are many great tools that are useful for debugging the Linux kernel, including good old-fashioned printk
, ftrace, and kgdb
. In this post we’ll be exploring how to use the kernel debugger (kgdb
) to debug a QEMU VM, although some of the techniques below may be applied to debugging via hardware interfaces like JTAG. Using gdb
as a front-end for the kernel debugger allows us to debug the kernel in the familiar and powerful debugging interface of gdb
.