LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel debugging (https://www.linuxquestions.org/questions/linux-general-1/kernel-debugging-430412/)

wood@addanc 03-31-2006 02:38 PM

Kernel debugging
 
Couple of questions viz:

#1 Working on an embedded system using a vanilla kernel 2.6.15. I trying to derive debug information so that I can track a kernel panic probably caused by a driver module. The O'Reilly Linux Device Drivers suggests that in the sysfs pseudo file system under /sys/module/drivername/ there should be a "sections" folder with files containing the .text, .bss and .data sections. It isn't there. The kernel has been pruned down to the bone, is there a kernel config option controlling the presence or otherwise of the "sections" folder. Going through the kernel config nothing jumps out and slaps me in the face.

#2 I've built the kernel with debug info enabled (CONFIG_DEBUG_INFO). What tools could be used to generate a text map file of symbols and line numbers for a module built against this kernel? Just looking for offsets into the .text, .bss and .data sections.

Any help much appreciated.

wood@addanc 04-01-2006 09:01 AM

For anyone interested:
#1 CONFIG_KALLSYMS controls generation of section folders.
#2 readelf and objdump appear to be the required tools.


All times are GMT -5. The time now is 08:22 AM.