Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As previously mentioned, you can use plain gdb to gather some kernel debug information. However, you can’t step through kernel code, set breakpoints, or modify kernel variables. Let’s use gdb to debug the kernel panic caused by the buggy function in Listing 1.1, but assume this time that trojan_function() is compiled as part of the kernel and not as a module, because you can’t easily peek inside modules using gdb.
This is part of the “oops” message generated when trojan_function() is executed: