From 223f5b6b6e2c945c442a5dde7e63e637237f575b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 10 Sep 2008 18:30:45 -0700 Subject: Ensure that "stap -l ..." only prints probe names, not variables. --- main.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 634feb03..563e4b01 100644 --- a/main.cxx +++ b/main.cxx @@ -182,14 +182,15 @@ printscript(systemtap_session& s, ostream& o) if (seen.find (pp) == seen.end()) { o << pp; - // This list will be empty unless s.unoptimized = true -- i.e., -L mode - for (unsigned j=0; jlocals.size(); j++) - { - o << " "; - vardecl* v = p->locals[j]; - v->printsig (o); - } - o << endl; + // Print the locals for -L mode only + if (s.unoptimized) + for (unsigned j=0; jlocals.size(); j++) + { + o << " "; + vardecl* v = p->locals[j]; + v->printsig (o); + } + o << endl; seen.insert (pp); } } -- cgit