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]

$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


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