This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/11360] Bad interaction between -L and @defined


------- Additional Comments From jistone at redhat dot com  2010-03-09 02:34 -------
I think it may work to re-enable optimization, but skip the
dead_assignment_remover for listing_mode_vars.  Here is the short patch, but I'm
still testing to see if any vars disappear accidentally with other optimizations.

diff --git a/elaborate.cxx b/elaborate.cxx
index 59110c7..f918264 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -2293,6 +2293,9 @@ dead_assignment_remover::visit_try_block (try_block *s)
 // removed as a side-effect-free statement expression.  Wahoo!
 void semantic_pass_opt3 (systemtap_session& s, bool& relaxed_p)
 {
+  if (s.listing_mode_vars)
+    return;
+
   // Recompute the varuse data, which will probably match the opt2
   // copy of the computation, except for those totally unused
   // variables that opt2 removed.
diff --git a/main.cxx b/main.cxx
index 9cc0370..a00aeb8 100644
--- a/main.cxx
+++ b/main.cxx
@@ -868,9 +868,8 @@ 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
-
+          s.listing_mode_vars = true; // This causes retention of variables for
display
+          // Fall through to pick up -l's behavior too...
         case 'l':
          s.suppress_warnings = true;
           s.listing_mode = true;


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |jistone at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=11360

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]