summaryrefslogtreecommitdiffstats
path: root/staptree.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-07-31 17:24:13 -0700
committerJosh Stone <jistone@redhat.com>2009-07-31 17:34:42 -0700
commitdc5a09fc9a61c8b33078164b6855dea54a33627c (patch)
treea1877ba1c9b69a0cb189ce97092888c84ca6e0ab /staptree.h
parentc67847a0d05f8c7207513e79378fc8d84563e109 (diff)
downloadsystemtap-steved-dc5a09fc9a61c8b33078164b6855dea54a33627c.tar.gz
systemtap-steved-dc5a09fc9a61c8b33078164b6855dea54a33627c.tar.xz
systemtap-steved-dc5a09fc9a61c8b33078164b6855dea54a33627c.zip
Unify no-component assertions on target variables
There are several tapsets that can't deal with component dereferences on their target variables, and they all check-and-throw in the same way. This refactors the checks into a target_symbol member. * staptree.cxx (target_symbol::assert_no_components): New. * tapsets.cxx (tracepoint_var_expanding_visitor::visit_target_symbol_arg, tracepoint_var_expanding_visitor::visit_target_symbol_context): Use the new assertion function to check for no components. * tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_arg, mark_var_expanding_visitor::visit_target_symbol_context): Ditto. * tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg, utrace_var_expanding_visitor::visit_target_symbol_context): Ditto.
Diffstat (limited to 'staptree.h')
-rw-r--r--staptree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/staptree.h b/staptree.h
index 70746f31..9ade2a42 100644
--- a/staptree.h
+++ b/staptree.h
@@ -252,6 +252,7 @@ struct target_symbol: public symbol
target_symbol(): addressof(false), saved_conversion_error (0) {}
void print (std::ostream& o) const;
void visit (visitor* u);
+ void assert_no_components(const std::string& tapset);
};
std::ostream& operator << (std::ostream& o, const target_symbol::component& c);