DS-5 supports source level debugging of a Linux kernel. The Linux kernel (and associated device drivers) can be debugged in the same way as a standard ELF format executable. For example, you can set breakpoints in the kernel code, step through the source, inspect the call stack, and watch variables.
To debug the kernel:
Compile the kernel source using the following options:
Other options might be required depending on the type of debugging you want to perform.
Compiling the kernel source generates a Linux kernel image and symbol files containing debug information.
Be aware that a Linux kernel is always compiled with full optimizations and inlining enabled, therefore:
stepping through code might not work as expected due to the possible reordering of some instructions
some variables might be optimized out by the compiler and therefore not be available for the debugger.
Load the Linux kernel on to the target
Load kernel debug information into the debugger
Debug the kernel as required.
ARM® DS-5™ Getting Started with DS-5: