summaryrefslogtreecommitdiffstats
path: root/elaborate.h
diff options
context:
space:
mode:
authorfche <fche>2005-10-18 02:28:00 +0000
committerfche <fche>2005-10-18 02:28:00 +0000
commitb4ceace28084125ffbac795974319eaffa758147 (patch)
tree2e7a2052f6e3d016860dce9f7d40b6824a295076 /elaborate.h
parent54efe513a4b01f433dba37f3106e4907028247f0 (diff)
downloadsystemtap-steved-b4ceace28084125ffbac795974319eaffa758147.tar.gz
systemtap-steved-b4ceace28084125ffbac795974319eaffa758147.tar.xz
systemtap-steved-b4ceace28084125ffbac795974319eaffa758147.zip
2005-10-17 Frank Ch. Eigler <fche@elastic.org>
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.
Diffstat (limited to 'elaborate.h')
-rw-r--r--elaborate.h20
1 files changed, 11 insertions, 9 deletions
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<derived_probe*>& 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<std::string, literal*> const & parameters,
- std::vector<probe*> & results_to_expand_further,
std::vector<derived_probe*> & finished_results) = 0;
virtual ~derived_probe_builder() {}
@@ -174,15 +170,18 @@ match_key
class
match_node
{
- std::map<match_key, match_node*> sub;
+ typedef std::map<match_key, match_node*> sub_map_t;
+ typedef std::map<match_key, match_node*>::iterator sub_map_iterator_t;
+ sub_map_t sub;
derived_probe_builder* end;
public:
match_node();
- derived_probe_builder* find_builder(std::vector<probe_point::component*> const & components,
- unsigned pos,
- std::vector< std::pair<std::string, literal*> > & parameters);
-
+
+ void find_and_build (systemtap_session& s,
+ probe* p, probe_point *loc, unsigned pos,
+ std::vector<derived_probe *>& 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<derived_probe*>& dps,
+ bool exc_outermost = true);
#endif // ELABORATE_H