This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
_stp_kallsyms_lookup() broken?
- From: Quentin Barnes <qbarnes at urbana dot css dot mot dot com>
- To: systemtap at sources dot redhat dot com
- Date: Sat, 12 May 2007 12:28:03 -0500
- Subject: _stp_kallsyms_lookup() broken?
In porting the Systemtap runtime to ARM, the got stack-arm.c working
except for one thing, symbolic addresses weren't coming out right.
I know my code is right because I can call print_symbol() on the
address and it returns the correct symbol, but _stp_symbol_print()
is out lost in the weeds.
For example, I have a stack traceback that turns up address 0xc01aa8b0
which in my kernel of the day corresponds to sys_socketcall. The
function print_symbol() outputs "sys_socketcall+0x0/0x1e8", but
_stp_symbol_print() prints 0xc01aa8b0 out as:
0xc01aa8b0 : $a+0x11a4f3c/0x0 [stap_9c636862fdbf9f35091984d2ee34d03b_4024]
Doing a little math, 0xc01aa8b0 - 0x11a4f3c = 0xbf005974.
Note that the brackets are present and not empty, but instead contain my
module's name "stap_9c636862fdbf9f35091984d2ee34d03b_4024". The
0xbf005974 is in the one and only loaded module:
stap_9c636862fdbf9f35091984d2ee34d03b_4024: systemtap: 0.5.14, base: bf000000, memory: 16028+22924+1320+164160+273469 data+text+ctx+io+glob, probes: 1
So it looks like _stp_symbol_print() is not finding any symbols in the
kernel proper, only loaded modules.
I don't fully understand the code in _stp_kallsyms_lookup(), but I
only see code for walking module symbol tables, not the kernel.
What's going on here? Has anyone else seen a problem like this, or
does _stp_symbol_print() work on other kernels?
I'm running on Linux 2.6.21.1 ARM build.
Quentin