From 5d9306dfa4f177a7aa2e801fea6488c761de658c Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 15 May 2013 11:39:36 -0400 Subject: [PATCH] PR14297 cont'd: find wildcards more carefully for stap -l filtering * elaborate.cxx (derived_probe::script_location): Look for other glob characters too in to-be-skipped items in the derivation chain. --- elaborate.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elaborate.cxx b/elaborate.cxx index c74b1870a..efae1666e 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -165,8 +165,12 @@ derived_probe::script_location () const for (int i=chain.size()-1; i>=0; i--) { - string pp_printed = lex_cast(* chain[i]); - if (pp_printed.find('*') == string::npos) + probe_point pp_copy (* chain [i]); + // drop any ?/! denotations that would confuse a glob-char search + pp_copy.optional = false; + pp_copy.sufficient = false; + string pp_printed = lex_cast(pp_copy); + if (! contains_glob_chars(pp_printed)) return chain[i]; } -- 2.43.5