This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
$syscall -> _stp_arg(0)
- From: Jim Keniston <jkenisto at us dot ibm dot com>
- To: systemtap <systemtap at sources dot redhat dot com>
- Date: Thu, 26 Jun 2008 17:13:15 -0700
- Subject: $syscall -> _stp_arg(0)
I was doing something like this...
global tally
probe process("/usr/bin/foo").syscall {
tally[$syscall]++
}
...
... and I got a puzzling runtime error message:
ERROR: cannot access arg(0) near identifier '_stp_arg'
at /usr/local/share/systemtap/tapset/i686/registers.stp:83:10
I was hoping that $syscall would give me the system-call number.
It turns out that stap translates $syscall in this context to
_stp_arg(0) (see tapsets.cxx). The only _stp_arg() I know about is a
helper function in tapset/{i686,x86_64}/registers.stp. It's used by the
*_arg(n) functions that provide function-arg values for dwarfless
probing. Currently, 0 is an illegal arg number -- the first arg is 1.
Is this $syscall -> _stp_arg(0) thing just a placeholder in an
as-yet-incomplete implementation? What's intended?
Thanks.
Jim