diff options
author | Dave Brolley <brolley@redhat.com> | 2009-05-06 15:14:52 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-05-06 15:14:52 -0400 |
commit | 524c5a9dbab620f3812bab61ecfe01ba2a893d20 (patch) | |
tree | 5dc6ad11f0b4d3076305071ce2756f80deecdfe6 /elaborate.cxx | |
parent | 6855a305faa34df80944f105382d45230b7b82ac (diff) | |
parent | a6b4f9682a51062a18042f3feb6b80aa40412625 (diff) | |
download | systemtap-steved-524c5a9dbab620f3812bab61ecfe01ba2a893d20.tar.gz systemtap-steved-524c5a9dbab620f3812bab61ecfe01ba2a893d20.tar.xz systemtap-steved-524c5a9dbab620f3812bab61ecfe01ba2a893d20.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index f6e1bbbf..b9a67818 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -427,9 +427,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(); @@ -654,7 +651,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(); |