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: Suggestions for localizing problems with identifiers in SystemTap.


Roland McGrath wrote:
The place I would start is with the "loc2c-test" program.  This is a simple
test program built during the systemtap build, but not installed.  It uses
exactly the same infrastructure for finding and interpreting the debug
information to identify variables at requested source locations.

loc2c-test takes some standard options (see --help), which are the same as
you can use with e.g. eu-addr2line.  Use the -k option to look at the
current kernel and modules, the same way the systemtap translator does.
(The other options make it easy to look at info for different kernels.)
The required argument is an address constant, giving the PC location of the
probe.  The -v output from stap should tell you this.

./loc2c-test -k 0xc012c9b1

Hi Roland,


Thanks. for the explanation on how to use loc2c-test. It is pretty easy to get the address of the "function of interest" in the kernel with something like the following:

 nm /usr/lib/debug/lib/modules/`uname -r`/vmlinux \
 |grep " detach_pid$" |awk '{print "0x" $1}'

How would one get the addresses for inlined functions and functions in modules?

-Will


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