From 2fae2e30747d90e125f5cf9f901ba028b1a1a697 Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 10 Jan 2006 22:32:15 +0000 Subject: 2006-01-10 Frank Ch. Eigler 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. --- tapsets.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tapsets.cxx') 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(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, -- cgit