Debugging Runtime Loaded Linux* OS Kernel Modules

The Linux* OS awareness feature enables you to debug a kernel module and loading its symbolic information on runtime. You can stop the target and commence debugging a kernel module on module load, initialization or cleanup/exit. You can then set your breakpoints at the function entry points of the kernel module you want to debug, release the target using the RUN command, and trigger an event that will hit the breakpoint to start your actual debug session.

A dedicated view, the Linux Kernel Modules window displays all currently active kernel threads and all currently loaded kernel modules with status information and memory location of initialization methods and cleanup methods. For kernel modules that are not already loaded, you can add their names to the module list. You can then debug them as if they were loaded during the Linux* OS boot process.

To debug a kernel object module, the debugger uses the module xdbntf.ko as a target agent that provides specific (module related) kernel data. It uses the kernel's notification mechanism to trigger a JTAG event to the host debugger whenever a new module is loaded, unloaded or changes its state on the target system.

The debugger then takes control over the target system and uploads information about to the module that was loaded and updates the list of modules that are currently loaded and running on the target system. The debugger displays the uploaded data in the Linux Kernel Modules window and enables source level debugging within the loaded modules’ code including breakpoints on module initialization and cleanup procedures.

For more complete information about compiler optimizations, see our Optimization Notice.