summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-04-10 15:38:18 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-04-10 15:38:18 -0400
commit16442b904ea51eedfbef36edc9791f5904d81099 (patch)
tree9cd4caff6a5f1d95421780fe052b79c7d8f1d6ca /elaborate.cxx
parent2881ab63dced89cf57ccf5036eca0a2e6da8a00f (diff)
downloadsystemtap-steved-16442b904ea51eedfbef36edc9791f5904d81099.tar.gz
systemtap-steved-16442b904ea51eedfbef36edc9791f5904d81099.tar.xz
systemtap-steved-16442b904ea51eedfbef36edc9791f5904d81099.zip
PR2949: listings mode (stap -l PROBE)
2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949. * session.h (listing_mode): New field. * main.cxx (main): Test it. Enjoy it. (usage): Document it. * stap.1.in, stapex.5.in: Ditto. * elaborate.cxx (print_error): Disable error messages in listing mode. 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949 * systemtap.base/cmd_parse.exp: Add "-l" listing test.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 2d9fa7bc..1c41df64 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1214,6 +1214,9 @@ systemtap_session::print_error (const semantic_error& e)
string message_str;
stringstream message;
+ // NB: we don't print error messages during listing mode.
+ if (listing_mode) return;
+
message << "semantic error: " << e.what ();
if (e.tok1 || e.tok2)
message << ": ";