From b80e42444a0add45a63ad0f83a2bdfc3afad1ed9 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 1 Feb 2006 22:15:59 +0000 Subject: 2006-02-01 Martin Hunt * stapfuncs.5.in: Document is_return(), returnval() and probefunc(). * testsuite/buildok/syscall.stp: Basic syscall test. --- ChangeLog | 6 ++++++ stapfuncs.5.in | 12 ++++++++++++ testsuite/buildok/syscall.stp | 8 ++++++++ 3 files changed, 26 insertions(+) create mode 100755 testsuite/buildok/syscall.stp diff --git a/ChangeLog b/ChangeLog index 78de7a31..a0dbe4c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-01 Martin Hunt + + * stapfuncs.5.in: Document is_return(), returnval() and + probefunc(). + * testsuite/buildok/syscall.stp: Basic syscall test. + 2006-02-01 Frank Ch. Eigler * configure.ac, systemtap.spec.in: Version 0.5.4. diff --git a/stapfuncs.5.in b/stapfuncs.5.in index f68f462d..0e74438d 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -169,10 +169,22 @@ pp:string () Return the probe point associated with the currently running probe handler, including alias and wildcard expansion effects. +.TP +probefunc:string () +Return the probe point's function name. + .TP target:long () Returns the pid of the target process. +.TP +is_return:long () +Returns 1 if the probe point is a return probe. + +.TP +returnval:long () +Gets the return value of a probed function. Must be a return probe. + .SS ERRNO .TP diff --git a/testsuite/buildok/syscall.stp b/testsuite/buildok/syscall.stp new file mode 100755 index 00000000..f4f23c62 --- /dev/null +++ b/testsuite/buildok/syscall.stp @@ -0,0 +1,8 @@ +#! stap -p4 + +probe syscall.*, syscall.*.return { + if (returnp) + printf("%d\n", returnval()) + else + printf("%s (%s) = ", name, argstr) +} -- cgit