From 3f99432cc11977a4345c881bed3aa60a1a614238 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 8 Aug 2007 03:36:25 +0000 Subject: 2007-08-07 Frank Ch. Eigler PR 4846 * parse.cxx (input_put): New function, sort of like stdio ungetc. (input_get): Skip cursor position changing for input_put strings. (scan): Rework $.../@... substitution into character pasting. * parse.h: Corresponding changes. * util.h (lex_cast_qstring): Octal-quote unprintable characters. * stap.1.in, NEWS: Document new behaviour. 2007-08-07 Frank Ch. Eigler PR 4846 * parseko/preprocess13.stp, parseok/nineteen.stp, semok/twentyfive.stp: New tests. --- NEWS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 6762901f..77597c9b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,21 @@ * What's new since version 0.5.14? +- The way in which command line arguments for scripts are substituted has + changed. Previously, $1 etc. would interpret the corresponding command + line argument as an numeric literal, and @1 as a string literal. Now, + the command line arguments are pasted uninterpreted wherever $1 etc. + appears at the beginning of a token. @1 is similar, but is quoted as + a string. This change does not modify old scripts, but has the effect + of permitting substitution of arbitrary token sequences. + + # This worked before, and still does: + % stap -e 'probe timer.s($1) {}' 5 + # Now this also works: + % stap -e 'probe syscall.$1 {log(@1)}' open + # This won't crash, just signal a recursion error: + % stap -e '$1' '$1' + # As before, $1... is recognized only at the beginning of a token + % stap -e 'probe begin {foo$1=5}' * What's new since version 0.5.13? -- cgit