What use is the kernel-debuginfo package?
Roland McGrath
roland at redhat.com
Wed Mar 21 23:02:39 UTC 2007
> Well, addr2line works because you point it directly to the .ko.debug file:
>
> $ eu-addr2line -e ahci.ko.debug 0x0
> drivers/ata/ahci.c:479
That does not necessarily work, because it may not be able to do enough
relocation. -e /installed/stripped/file, -k, -K, -p PID work, and they
find the debuginfo file for you. (For ET_REL files you need to add 0x10000
to the address you use if using elfutils < 0.126.)
> But how could gdb put the two separate files together when there is no
> connection between them? How could it possibly know to go from:
>
> /lib/modules/2.6.20-1.2925.fc6/kernel/drivers/ata/ahci.ko
>
> to
>
> /usr/lib/debug/lib/modules/2.6.20-1.2925.fc6/kernel/drivers/ata/ahci.ko.debug
Lo and behold, it does work. Really, truly. Embedding directory names is
Not The Way. (Try "help set debug-file-directory" in gdb. The elfutils
tools and their --debuginfo-path option are similar.)
More information about the Fedora-kernel-list
mailing list