From b4ceace28084125ffbac795974319eaffa758147 Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 18 Oct 2005 02:28:00 +0000 Subject: 2005-10-17 Frank Ch. Eigler PR 1338. * parse.cx (parse_probe): Unconditionally visit parse_probe_point. (parse_probe_point): Accept "*" as component name. * stapprobes.5.in: Document this. * elaborate.cxx (derive_probes): Rewrite. Make top-level function. (match_node::find_and_build): New function to replace (find_builder): Removed. (match_key operator <): Correct one nasty typo. (match_node::bind): Refuse to bind "*" component names. (derived_probe_builder::build): Remove recursion output param. (alias_expandion_builder::build): Recurse to derive_probes instead. * elaborate.h: Corresponding changes. * tapsets.cxx: Ditto. (query_cu): Elide prologue finding for uninteresting CUs. * testsuite/semok/nineteen.stp: New test. * testsuite/semko/twentythree.stp: New test. * testsuite/semko/twentyone/two.stp: Fix -p2. --- elaborate.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'elaborate.h') diff --git a/elaborate.h b/elaborate.h index e3683a27..b2eec8a2 100644 --- a/elaborate.h +++ b/elaborate.h @@ -33,9 +33,6 @@ public: derived_probe* current_probe; symresolution_info (systemtap_session& s); - // XXX: instead in systemtap_session? - void derive_probes (match_node * root, probe *p, std::vector& dps); - vardecl* find_var (const std::string& name, int arity); functiondecl* find_function (const std::string& name, unsigned arity); @@ -143,7 +140,6 @@ struct derived_probe_builder probe* base, probe_point* location, std::map const & parameters, - std::vector & results_to_expand_further, std::vector & finished_results) = 0; virtual ~derived_probe_builder() {} @@ -174,15 +170,18 @@ match_key class match_node { - std::map sub; + typedef std::map sub_map_t; + typedef std::map::iterator sub_map_iterator_t; + sub_map_t sub; derived_probe_builder* end; public: match_node(); - derived_probe_builder* find_builder(std::vector const & components, - unsigned pos, - std::vector< std::pair > & parameters); - + + void find_and_build (systemtap_session& s, + probe* p, probe_point *loc, unsigned pos, + std::vector& results); + match_node* bind(match_key const & k); match_node* bind(std::string const & k); match_node* bind_str(std::string const & k); @@ -250,6 +249,9 @@ struct systemtap_session int semantic_pass (systemtap_session& s); +void derive_probes (systemtap_session& s, + probe *p, std::vector& dps, + bool exc_outermost = true); #endif // ELABORATE_H -- cgit