...
Page Contents
Table of Contents
Note: It is assumed that OpenOCD is built, patched and installed as per instructions on this page.
It is possible to use OpenOCD and Eclipse to source level debug the Linux kernel. This means kernel space (device drivers), not application space (at least not easily and maybe not very useful). For application space, you need to use traditional gdb, not JTAG. The reason is that Linux applications run in virtual address space, so the settings of the MMU must be considered. However, while the Linux kernel also runs at a virtual address, the address space is fixed so it is possible to use openOCD and JTAG.
...
You must build the kernel with the following configuration options. Not that =y means they must be enabled, and =n
means they just be disabled. Please use menuconfig to confirm each one.
...
CONFIG_DEBUG_INFO_REDUCED=n
CONFIG_DEBUG_INFO_SPLIT=n
CONFIG_RANDOMIZE_BASE=n
CONFIG_EXPERT=y
CONFIG_UNMAP_KERNEL_AT_EL0=n
...
Then by launching the debug session (click on the "bug" icon) you should see something like this.
Note: Remove All Breakpoints if something unexpected happens during the launch.
...