From 277f2b79b02bf69a1d72d05b06086b07bcc6a113 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 17 May 2008 10:02:19 -0400 Subject: suppress "pass-2 failed" messages from "stap -l FOOBAR"; just produce empty output --- elaborate.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index 0e454937..9a817cba 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1159,6 +1159,9 @@ semantic_pass (systemtap_session& s) if (rc == 0 && ! s.unoptimized) rc = semantic_pass_optimize2 (s); if (rc == 0) rc = semantic_pass_vars (s); if (rc == 0) rc = semantic_pass_stats (s); + + if (s.probes.size() == 0 && !s.listing_mode) + throw semantic_error ("no probes found"); } catch (const semantic_error& e) { @@ -2139,9 +2142,6 @@ semantic_pass_optimize1 (systemtap_session& s) semantic_pass_opt4 (s, relaxed_p); } - if (s.probes.size() == 0) - throw semantic_error ("no probes found"); - return rc; } @@ -2164,9 +2164,6 @@ semantic_pass_optimize2 (systemtap_session& s) semantic_pass_opt5 (s, relaxed_p); } - if (s.probes.size() == 0) - throw semantic_error ("no probes found"); - return rc; } -- cgit