summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-05-06 11:19:32 -0400
committerDave Brolley <brolley@redhat.com>2009-05-06 11:19:32 -0400
commit07e1c7c9f0c0244530d4cb1f4a876355df1a2aec (patch)
tree5743d35c33a0fb9615b0c560c57229d1ace7eade /elaborate.cxx
parentaa4d7d17299550b06c33f386d2c5715f8250879f (diff)
parentccf8bc85c08ba5602288caeb5062b3bf049a6960 (diff)
downloadsystemtap-steved-07e1c7c9f0c0244530d4cb1f4a876355df1a2aec.tar.gz
systemtap-steved-07e1c7c9f0c0244530d4cb1f4a876355df1a2aec.tar.xz
systemtap-steved-07e1c7c9f0c0244530d4cb1f4a876355df1a2aec.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 53f2a8f6..6fb3f197 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -406,9 +406,6 @@ match_node::find_and_build (systemtap_session& s,
sub_map_iterator_t i = sub.find (match);
if (i == sub.end()) // no match
{
- if (loc->optional) /* PR10102: to tolerate mismatched optional probe */
- return;
-
string alternatives;
for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++)
alternatives += string(" ") + i->first.str();
@@ -633,7 +630,18 @@ derive_probes (systemtap_session& s,
// and set a flag on the copy permanently.
bool old_loc_opt = loc->optional;
loc->optional = loc->optional || optional;
- s.pattern_root->find_and_build (s, p, loc, 0, dps); // <-- actual derivation!
+ try
+ {
+ s.pattern_root->find_and_build (s, p, loc, 0, dps); // <-- actual derivation!
+ }
+ catch (const semantic_error& e)
+ {
+ if (!loc->optional)
+ throw semantic_error(e);
+ else /* tolerate failure for optional probe */
+ continue;
+ }
+
loc->optional = old_loc_opt;
unsigned num_atend = dps.size();