summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorddomingo <ddomingo@redhat.com>2008-09-11 12:07:38 +1000
committerddomingo <ddomingo@redhat.com>2008-09-11 12:07:38 +1000
commit936eeb672167eaec2e5d8e9d7cf7fe9e962efe58 (patch)
treef340b3f78479294491e76e6533c28160b3cc2ee1 /main.cxx
parent6f57b072898d1858e0af448169c759dd44efddca (diff)
parent223f5b6b6e2c945c442a5dde7e63e637237f575b (diff)
downloadsystemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.tar.gz
systemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.tar.xz
systemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/main.cxx b/main.cxx
index 5d0739eb..563e4b01 100644
--- a/main.cxx
+++ b/main.cxx
@@ -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;