How to debug modules using mainline Linux kernel?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to debug modules using mainline Linux kernel?

760 Views
mindchasers
Contributor III

Hi,

 

I'm using CW 10.4 for QorIQ on Ubuntu 14.04 with a t1040rdb.  All is good while debugging the QorIQ SDK1.7 kernel (3.12).  However, when I use a 4.0 kernel, CW no longer works properly when trying to debug kernel modules.   

 

It doesn't break during module loading (like it does when debugging the 3.12 kernel).  And if I manually set a break point after the module is loaded, the source code for the module doesn't map properly. 

 

Is there a way to correct this? 

 

My hunch is that CW is looking for some particular structure in the kernel that has changed between 3.12 and 4.0.  

Labels (1)
Tags (1)
0 Kudos
4 Replies

401 Views
addiyi
NXP Employee
NXP Employee

CodeWarrior 10.4 is not supporting kernel 4.0 debugging. And you are right, CW is looking for particular structure of kernel.

Adrian

0 Kudos

401 Views
mindchasers
Contributor III

Thank you for the reply Adrian-Mihai,

What does CW look at inside the kernel to determine how to load and link modules?  Can you please provide some guidance on how to deal with this? 

I would like to point out that I can debug the monolithic kernel with CW 10.4 and Linux 4.0.  It seems to be working fine for this task. 

And I can break on my module manually (after I figure out the bp address and set it).  However, CW doesn't show me the source.  This is the workaround I would like to find.  

Thank you again,

Bob

P.S. Is there a CW release for QorIQ that properly supports Linux 4.0? 

0 Kudos

401 Views
addiyi
NXP Employee
NXP Employee

Bob,

CodeWarrior is indented to support kernel version provided in Freescale SDK, So, unfortunately there is not CodeWarrior version that support kernel 4.0 and this will happened only when Freescale SDK will include kernel 4.0.

Adrian

0 Kudos

401 Views
lunminliang
NXP Employee
NXP Employee

Hello Robert Cochran,

For the question "P.S. Is there a CW release for QorIQ that properly supports Linux 4.0?  "

As I know, the CW10.4 works with Linux Kernel 3.12, this is described in release note for CW_PA_10.4:

Debugger Alignment SDK 1.6 (Linux Kernel 3.12)

The debugger was updated and verified for Linux Kernel Debug and Linux Application debug to work with latest version SDK 1.6.

The CW10.5, planned to be available in July will work with SDK1.8, which also use kernel 3.12.

Regards

Lunmin

0 Kudos