required debug info for non-RHEL kernels

Frank Ch. Eigler fche@redhat.com
Wed Aug 31 11:20:00 GMT 2005


kevinrs wrote:

> [...]
> probe kernel.statement("filp_open@fs/open.c")
> {
>   log($filename);
> }

Choose carefully between ".statement()" and ".function()".  Use
"statement" if you want the breakpoint at a specific address within
some function.  Use "function" if you want a point near the entry/exit
of the function.  Given the limitations of dwarf data in function
prologues, if you want access to function parameters, you should
either use "function()" (which skips the prologue) or "statement()"
with a manually offset location.


> [...]  This leads me to suspect [kernel 2.6.13] is a debug-info
> problem. I compiled the kernel with 'make menuconfig' and from the
> main menu selected Kernel Hacking -> Compile the kernel with debug
> info [y]. I then placed vmlinux-2.6.13-rc5 in /boot.  [...]

A brief strace of stap will show you where it tries to look for
debugging information for the kernel.  In my case, /boot/vmlinux* was
indeed checked, before elfutils found the data in the place where the
-debuginfo RPM normally puts it.

% strace stap -e 'probe kernel.function ... '' |& grep vmlinux
open("/boot/vmlinux-2.6.12-1.1372_FC3.rootsmp", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/boot/vmlinux-2.6.12-1.1372_FC3.rootsmp", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/boot/.debug/vmlinux-2.6.12-1.1372_FC3.rootsmp", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/boot/vmlinux-2.6.12-1.1372_FC3.rootsmp", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/lib/modules/2.6.12-1.1372_FC3.rootsmp/vmlinux", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/lib/modules/2.6.12-1.1372_FC3.rootsmp/vmlinux", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/lib/modules/2.6.12-1.1372_FC3.rootsmp/.debug/vmlinux", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/lib/modules/2.6.12-1.1372_FC3.rootsmp/vmlinux", O_RDONLY|O_LARGEFILE) = 3


- FChE



More information about the Systemtap mailing list