summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-01-10 22:32:15 +0000
committerfche <fche>2006-01-10 22:32:15 +0000
commit2fae2e30747d90e125f5cf9f901ba028b1a1a697 (patch)
treefd8f3b72e9a6d5dbfaf2ca02444bae8cbfa4d750 /tapsets.cxx
parent829fea24e7e2d66d9737f682390a88d6d383a19b (diff)
downloadsystemtap-steved-2fae2e30747d90e125f5cf9f901ba028b1a1a697.tar.gz
systemtap-steved-2fae2e30747d90e125f5cf9f901ba028b1a1a697.tar.xz
systemtap-steved-2fae2e30747d90e125f5cf9f901ba028b1a1a697.zip
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.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 57429cbd..0ad6d5cf 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -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,