]> sourceware.org Git - systemtap.git/commitdiff
2006-01-10 Frank Ch. Eigler <fche@redhat.com>
authorfche <fche>
Tue, 10 Jan 2006 22:32:15 +0000 (22:32 +0000)
committerfche <fche>
Tue, 10 Jan 2006 22:32:15 +0000 (22:32 +0000)
PR 1972.
* tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol):
Produce error message for $var access within .return probes.
* testsuite/semko/thirtyfour.stp: New test.

ChangeLog
tapsets.cxx
testsuite/semko/thirtyfour.stp [new file with mode: 0755]

index 1178c45607a5bcb5508f52f8237c05905eb47ecc..4e2ca0a7cae3053cc25f2fdbe5d44c03e85c916c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-10  Frank Ch. Eigler  <fche@redhat.com>
+
+       PR 1972.
+       * tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol):
+       Produce error message for $var access within .return probes.
+       * testsuite/semko/thirtyfour.stp: New test.
+
 2006-01-10  Frank Ch. Eigler  <fche@redhat.com>
 
        PR 2060.
index 57429cbd51774d217814dc3419f2ac677907e126..0ad6d5cff53a733c048c1c52e92f2c5c1d9a2591 100644 (file)
@@ -2616,12 +2616,15 @@ var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
   bool lvalue = is_active_lvalue(e);
 
   if (lvalue && !q.sess.guru_mode)
-    throw semantic_error("Illegal target variable access", e->tok);
+    throw semantic_error("write to target variable not permitted", e->tok);
 
   string fname = (string(lvalue ? "set" : "get")
                  + "_" + e->base_name.substr(1)
                  + "_" + lex_cast<string>(tick++));
 
+  if (q.has_return)
+    throw semantic_error ("target variables not available to .return probes");
+
   try
     {
       ec->code = q.dw.literal_stmt_for_local (scope_die,
diff --git a/testsuite/semko/thirtyfour.stp b/testsuite/semko/thirtyfour.stp
new file mode 100755 (executable)
index 0000000..6d9a67d
--- /dev/null
@@ -0,0 +1,3 @@
+#! stap -p2
+
+probe kernel.function("sys_open").return { $filename }
This page took 0.043953 seconds and 5 git commands to generate.