]> sourceware.org Git - systemtap.git/commitdiff
PR6731: improve listing mode to list variables
authorWenji Huang <wenji.huang@oracle.com>
Fri, 29 Aug 2008 02:49:01 +0000 (22:49 -0400)
committerWenji Huang <wenji.huang@oracle.com>
Fri, 29 Aug 2008 02:49:01 +0000 (22:49 -0400)
ChangeLog
main.cxx

index 77484a8dfca72bcdc62b0aee695dbcc03c6cfb0a..2a8b62c5a1bac28bfffa1dba32357e75fc41971f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-29  Wenji Huang <wenji.huang@oracle.com>
+
+       * main.cxx (printscript): Print variable name and type for listing mode.
+
 2008-08-28  Frank Ch. Eigler  <fche@elastic.org>
 
        * elaborate.cxx (add_global_var_display): Render array indexes
index 279264471f07151014a5fe2a916884f18c3defad..51252e61b71f5dddf555e57167965b504871c1df 100644 (file)
--- a/main.cxx
+++ b/main.cxx
@@ -179,6 +179,18 @@ printscript(systemtap_session& s, ostream& o)
           if (seen.find (pp) == seen.end())
             {
               o << pp << endl;
+              if (s.verbose) {
+                     for (unsigned j=0; j<p->locals.size(); j++)
+                           {
+                             vardecl* v = p->locals[j];
+                             if (j>0)
+                               o << ", ";
+                             else
+                               o << "  ";
+                             v->printsig (o);
+                           }
+                     o << endl;
+              }
               seen.insert (pp);
             }
         }
@@ -581,6 +593,7 @@ main (int argc, char * const argv [])
         case 'l':
          s.suppress_warnings = true;
           s.listing_mode = true;
+          s.unoptimized = true;
           s.last_pass = 2;
           if (have_script)
             {
This page took 0.044096 seconds and 5 git commands to generate.