diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2007-11-30 18:55:43 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2007-11-30 18:55:43 -0500 |
commit | be01a078db770c236308d8375f96ebb6076a93a1 (patch) | |
tree | 658c53e02897b352cddd4c3a7ad9ab576fa8286e /elaborate.cxx | |
parent | 80237db77374679171ac68f22cab0aee8c9b3d12 (diff) | |
parent | 44386f7789fbbb0b144c84847f35da6b10215af0 (diff) | |
download | systemtap-steved-be01a078db770c236308d8375f96ebb6076a93a1.tar.gz systemtap-steved-be01a078db770c236308d8375f96ebb6076a93a1.tar.xz systemtap-steved-be01a078db770c236308d8375f96ebb6076a93a1.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index c277d8d5..0ac0f4da 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -357,16 +357,35 @@ match_node::find_and_build (systemtap_session& s, if (match.globmatch(subkey)) { - // recurse + if (s.verbose > 2) + clog << "wildcard '" << loc->components[pos]->functor + << "' matched '" << subkey.name << "'" << endl; + + // When we have a wildcard, we need to create a copy of + // the probe point. Then we'll create a copy of the + // wildcard component, and substitute the non-wildcard + // functor. + probe_point *non_wildcard_pp = new probe_point(*loc); + probe_point::component *non_wildcard_component + = new probe_point::component(*loc->components[pos]); + non_wildcard_component->functor = subkey.name; + non_wildcard_pp->components[pos] = non_wildcard_component; + + // recurse (with the non-wildcard probe point) try { - subnode->find_and_build (s, p, loc, pos+1, results); + subnode->find_and_build (s, p, non_wildcard_pp, pos+1, + results); } catch (const semantic_error& e) { // Ignore semantic_errors while expanding wildcards. // If we get done and nothing was expanded, the code // following the loop will complain. + + // If this wildcard didn't match, cleanup. + delete non_wildcard_pp; + delete non_wildcard_component; } } } |