diff options
author | fche <fche> | 2005-08-01 17:40:26 +0000 |
---|---|---|
committer | fche <fche> | 2005-08-01 17:40:26 +0000 |
commit | d8067b24c81ff89a28ece9c52ba35fe6136d35f2 (patch) | |
tree | ec264e0422a39daf7a99a67823dc33f94786fbb6 /stap.1 | |
parent | a85c5829d137b452d1fa5839e8450e08ec61e406 (diff) | |
download | systemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.tar.gz systemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.tar.xz systemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.zip |
2005-08-01 Frank Ch. Eigler <fche@elastic.org>
* elaborate.cxx (derive_probes): Print error if results empty.
* tapsets.cxx (dwflpp_assert): Handle positive RCs, which likely
came from errno.
(dwflpp::setup): Improve missing debug-info messages.
* testsuite/semko/sixteen,seventeen.stp: New tests.
* runtest.sh: Save stdout/stderr of FAIL/XPASS test cases.
* Makefile.am (clean-local): Clean up testsuite/.
* Makefile.in, aclocal.m4: Regenerated.
Diffstat (limited to 'stap.1')
-rw-r--r-- | stap.1 | 38 |
1 files changed, 32 insertions, 6 deletions
@@ -91,9 +91,22 @@ key. .\" XXX add statistics type here once it's supported .SS STATEMENTS -Statements enable procedural control flow. +Statements enable procedural control flow. They may occur within +functions and probe handlers. .TP +EXP +Execute the string- or integer-valued expression and throw away +the value. +.TP +.BR { " STMT1 STMT2 ... " } +Execute each statement in sequence in this block. Note that no +separators or terminators are necessary between statements. +.TP +.BR ; +Null statement, do nothing. It is useful as an optional separator between +statements, in order to improve syntax error reporting. +.TP .BR if " (EXP) STMT1 [ " else " STMT2 ]" Compare integer-valued EXP to zero. Execute the first (non-zero) or second STMT (zero). @@ -105,16 +118,29 @@ While integer-valued EXP evaluates to non-zero, execute STMT. Execute EXP2 as initialization. While EXP1 is non-zero, execute STMT, then the iteration expression EXP1. .TP +.BR foreach " (VAR " in " ARRAY) STMT" +Loop over each element of the named global array, assigning current +key to VAR. The array may not be modified within the statement. +.TP +.BR foreach " ((VAR1, VAR2, ...) " in " ARRAY) STMT" +Same as above, used when the array is indexed with a tuple of keys. +.TP .BR break ", " continue -Exit or iterate nesting -.BR while " or " for +Exit or iterate the innermost nesting loop +.RB ( while " or " for " or " foreach ) statement. .TP -EXP -Execute the string- or integer-valued expression and throw away -the value. +.BR return " EXP" +Return EXP value from enclosing function. A return value is mandatory, +since void functions are not supported. +.TP +.BR next +Return from enclosing probe handler. .SS EXPRESSIONS +Systemtap supports a number of operators, with the same general syntax, +semantics and precedence as in C and awk. + .SS PROBES The main construct in the scripting language identifies probes. |