summaryrefslogtreecommitdiffstats
path: root/tapset-utrace.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-07-15 18:21:56 -0700
committerJosh Stone <jistone@redhat.com>2009-07-15 18:35:48 -0700
commit03c75a4a21ef3dba8abbc7e596d2a102427a3d96 (patch)
tree82e48a6a13454b9d0967b6d7e029aaf137ae47b9 /tapset-utrace.cxx
parentaf4d5a48f2b0fed8b5a1bddda9bd1ffa81e7bd46 (diff)
downloadsystemtap-steved-03c75a4a21ef3dba8abbc7e596d2a102427a3d96.tar.gz
systemtap-steved-03c75a4a21ef3dba8abbc7e596d2a102427a3d96.tar.xz
systemtap-steved-03c75a4a21ef3dba8abbc7e596d2a102427a3d96.zip
PR5930: Address-op for $target and @cast members
This allows the '&' operator to get the address of @cast and $target variable expressions. * staptree.h (target_symbol): add addressof field * staptree.cxx (target_symbol::print): print '&' for addressof (cast_op::print): ditto * parse.cxx (parser::parse_value): allow '&' prefix on $target/@cast * dwflpp.cxx (dwflpp::translate_final_fetch_or_store): allow taking the computed address without actually doing a final fetch. * tapset* (*::visit_target_symbol): throw errors for $vars w/o addresses * testsuite/systemtap.base/cast.stp: add &@cast test * testsuite/semok/target_addr.stp: test '&' on different member types * testsuite/semko/target_addr?.stp: test failure on bitfields/registers
Diffstat (limited to 'tapset-utrace.cxx')
-rw-r--r--tapset-utrace.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx
index 64f546e6..ec20282a 100644
--- a/tapset-utrace.cxx
+++ b/tapset-utrace.cxx
@@ -539,6 +539,9 @@ utrace_var_expanding_visitor::visit_target_symbol (target_symbol* e)
throw semantic_error ("only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall.return\" probes support target symbols",
e->tok);
+ if (e->addressof)
+ throw semantic_error("cannot take address of utrace variable", e->tok);
+
if (e->base_name.substr(0,4) == "$arg")
visit_target_symbol_arg(e);
else if (e->base_name == "$syscall" || e->base_name == "$return")