diff options
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -147,6 +147,8 @@ printscript(systemtap_session& s, ostream& o) for (unsigned i=0; i<s.probes.size(); i++) { + if (pending_interrupts) return; + derived_probe* p = s.probes[i]; // NB: p->basest() is not so interesting; // p->almost_basest() doesn't quite work, so ... @@ -180,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; j<p->locals.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; j<p->locals.size(); j++) + { + o << " "; + vardecl* v = p->locals[j]; + v->printsig (o); + } + o << endl; seen.insert (pp); } } @@ -198,6 +201,7 @@ printscript(systemtap_session& s, ostream& o) o << "# global embedded code" << endl; for (unsigned i=0; i<s.embeds.size(); i++) { + if (pending_interrupts) return; embeddedcode* ec = s.embeds[i]; ec->print (o); o << endl; @@ -207,6 +211,7 @@ printscript(systemtap_session& s, ostream& o) o << "# globals" << endl; for (unsigned i=0; i<s.globals.size(); i++) { + if (pending_interrupts) return; vardecl* v = s.globals[i]; v->printsig (o); if (s.verbose && v->init) @@ -219,9 +224,10 @@ printscript(systemtap_session& s, ostream& o) if (s.functions.size() > 0) o << "# functions" << endl; - for (unsigned i=0; i<s.functions.size(); i++) + for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) { - functiondecl* f = s.functions[i]; + if (pending_interrupts) return; + functiondecl* f = it->second; f->printsig (o); o << endl; if (f->locals.size() > 0) @@ -244,6 +250,7 @@ printscript(systemtap_session& s, ostream& o) o << "# probes" << endl; for (unsigned i=0; i<s.probes.size(); i++) { + if (pending_interrupts) return; derived_probe* p = s.probes[i]; p->printsig (o); o << endl; |