This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: required debug info for non-RHEL kernels


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]