Interleaving assembler & C code for kernel modules ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I used to write kernel modules for the 2.4 series kernel.

When my driver Oops'ed it would print out the eip line 
e.g.
    EIP is at my_func+0xf9/0x3ee [mod_abc] 

I could then use objdump to output the assembler interleaved with the C
src code. e.g.
$ objdump -DS mod_abc.o > mod_abc.txt

I could then search through mod_abc.txt to find the start address of
my_func() and add on the offset (0xf9) to find the address of the fault.

Because the C source was interleaved with the assembler then I could
easily pinpoint the offending line of C code.  
This made 80% of my kernel debugging much simpler !  :)


PROBLEM:
When I try this with modules built for the 2.6 kernel, objdump doesn't
interleave the C source with the assembler.  

$ objdump -DS mod_abc.ko > mod_abc.txt

This makes it MUCH more difficult to relate the offending assembler line
back to C code.  ><

Is there anyway to get an interleaved output of assembler and C code for
a 2.6 kernel module ?

I have the DEBUG_INFO flag switched on in my .config.  Is there another
flag that I need ?

Thanks
dom


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux