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
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to