UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 67325

SDK 2016.1: Using OS Aware Debug to Debug Loadable Kernel Modules

Description

How can I debug Loadable Kernel Modules (*.ko) using SDK?

Solution

Kernel module debug has been simplified through the OS aware debug feature, available in Vivado 2016.1.

The steps below describe the procedure to debug kernel modules using System Debugger and the OS Aware Debug feature.

1) Set up the path mapping for the module as shown below:


 

2) Add the symbol file vmlinux to both the processors:


 

3) Enable the OS Aware Debug option for the CPU:


 

4) Add a break-point at the function mymodule_exit:


 

5) Load the module into kernel space using the insmod command: (in the debugger window make sure the processor is running)


 

6) Issue the rmmod command:


 

7) At this stage, the debugger should hit the break-point set in step 4, and as a result the rmmod command will not remove the module from kernel space.


 

AR# 67325
Date Created 06/03/2016
Last Updated 06/09/2016
Status Active
Type General Article
Devices
  • Zynq-7000
  • Zynq UltraScale+ MPSoC
  • Zynq-7000Q
Tools
  • Vivado Design Suite - 2016.1