public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* _stp_kallsyms_lookup() broken?
@ 2007-05-12 17:28 Quentin Barnes
  0 siblings, 0 replies; only message in thread
From: Quentin Barnes @ 2007-05-12 17:28 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-12 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12 17:28 _stp_kallsyms_lookup() broken? Quentin Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).