gdb doesn't load line number information from object (kgdb target)

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

 



I am trying to debug a kernel module that has been loaded after the start of a kgdb session.

Once I load the module, I do:
(gdb) add-symbol-file ~/ext2.ko 0xffffffffa01b1000

This works fine, and gdb knows the addresses of the symbols in the kernel module, to verify this:

At the KGDB target:
# cat /proc/kallsyms | grep ext2_ioctl
ffffffffa01b8210 t ext2_ioctl [ext2]

In GDB:
(gdb) p ext2_ioctl
$1 = {long int (struct file *, unsigned int, long unsigned int)} 0xffffffffa01b8210 <ext2_ioctl>

However when I try to list the code of a function in the module, it complaints that it does not have line number information:

(gdb) list ext2_ioctl
No line number known for ext2_ioctl.

The object file contains line number information as verified by:
# readelf -wL /root/ext2.ko

But why doesn't gdb load it when I do an 'add-symbol-file' ? What am I doing wrong here?

Thanks!
-Joel



[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