diff options
author | Josh Stone <jistone@redhat.com> | 2009-07-29 12:35:29 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-07-29 12:35:29 -0700 |
commit | 8c39844b59f49526240c65b81a79eef311fe4177 (patch) | |
tree | c77e279c297fdc11c94ad8343e6f394d15992acc | |
parent | a7999c82a3355eb5a68a14a57ffebe5e688d8413 (diff) | |
download | systemtap-steved-8c39844b59f49526240c65b81a79eef311fe4177.tar.gz systemtap-steved-8c39844b59f49526240c65b81a79eef311fe4177.tar.xz systemtap-steved-8c39844b59f49526240c65b81a79eef311fe4177.zip |
Use a real session flag for -L
Rather than relying on 'unoptimized' to tell us that the listing mode
should print the variables too, this adds an explicit listing_mode_vars.
* session.h (systemtap_session): Add listing_mode_vars
* main.cxx (main): Set s.listing_mode_vars appropriately.
(printscript): Use the new flag for deciding whether to print locals
-rw-r--r-- | main.cxx | 23 | ||||
-rw-r--r-- | session.h | 1 |
2 files changed, 14 insertions, 10 deletions
@@ -193,16 +193,17 @@ printscript(systemtap_session& s, ostream& o) { o << pp; // Print the locals for -L mode only - if (s.unoptimized) { - for (unsigned j=0; j<p->locals.size(); j++) - { - o << " "; - vardecl* v = p->locals[j]; - v->printsig (o); - } - // Print arguments of probe if there - p->printargs(o); - } + if (s.listing_mode_vars) + { + for (unsigned j=0; j<p->locals.size(); j++) + { + o << " "; + vardecl* v = p->locals[j]; + v->printsig (o); + } + // Print arguments of probe if there + p->printargs(o); + } o << endl; seen.insert (pp); } @@ -377,6 +378,7 @@ main (int argc, char * const argv []) s.unoptimized = false; s.suppress_warnings = false; s.listing_mode = false; + s.listing_mode_vars = false; #ifdef ENABLE_PROLOGUES s.prologue_searching = true; @@ -665,6 +667,7 @@ main (int argc, char * const argv []) break; case 'L': + s.listing_mode_vars = true; s.unoptimized = true; // This causes retention of variables for listing_mode case 'l': @@ -103,6 +103,7 @@ struct systemtap_session bool keep_tmpdir; bool guru_mode; bool listing_mode; + bool listing_mode_vars; bool bulk_mode; bool unoptimized; bool merge; |