We will highlight some of the most common methods employed by kernel developers to debug kernel issues.
Above all, debugging the Linux kernel remains a manual process, and the most important developer tool is the ability to print debug messages.
The kernel uses the
printk function, which is very similar syntactically to the
printf function call from standard C libraries, with the addition of an optional log level. The allowed formats are documented in the kernel source under
printk functionality needs to be compiled into the kernel with the
CONFIG_PRINTK configuration variable. You can also configure the Linux kernel to prepend a precise timestamp to every ...