Chapter 14: Linux Kernel Debugging Tips and Best Practices
Most of the time, as part of development, writing code is not the hardest part. Things are rendered difficult by the fact that the Linux kernel is a standalone software that is at the lowest layer of the operating system. This makes it challenging to debug the Linux kernel. However, this is compensated by the fact that the majority of the time, we don't need additional tools to debug kernel code because most of the kernel debugging tools are part of the kernel itself. We will begin by familiarizing ourselves with the Linux kernel release model and you will learn the Linux kernel release process and steps. Then, we will look at the Linux kernel debugging-related development tips (especially debugging by printing) and finally, we will focus on tracing the Linux kernel, ending with off-target debugging and learning to leverage kernel oops.
This chapter will cover the following topics:
- Understanding the Linux kernel...