From 212a566e493f285d89ebcc08961f44485dc55db0 Mon Sep 17 00:00:00 2001 From: Rajan Arora Date: Sat, 25 Oct 2008 19:21:34 -0400 Subject: [PATCH] Unused global variables display in guru mode fix (rh bz 468139) --- ChangeLog | 4 ++++ elaborate.cxx | 3 ++- testsuite/ChangeLog | 7 ++++++- testsuite/systemtap.base/global_end.exp | 8 +++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 876886208..ab118e166 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-25 Rajan Arora + + * elaborate.cxx (add_global_var_display): Added check for guru mode. + 2008-10-24 Josh Stone * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): Support diff --git a/elaborate.cxx b/elaborate.cxx index e4251f2ae..38ce014e7 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1147,7 +1147,8 @@ semantic_pass_symbols (systemtap_session& s) // Keep unread global variables for probe end value display. void add_global_var_display (systemtap_session& s) { - if (s.listing_mode) return; // avoid end probe in listings_mode + if (s.listing_mode || s.guru_mode) return; // avoid end probe + //in listings_mode or guru_mode varuse_collecting_visitor vut; for (unsigned i=0; i +2008-10-25 Rajan Arora + + * systemtap.base/global_end.exp: Spawn test again + in guru mode. + +2008-10-20 Elliott Baron PR6851 * systemtap.printf/char1.exp: New test. diff --git a/testsuite/systemtap.base/global_end.exp b/testsuite/systemtap.base/global_end.exp index b6b9fd30f..9935629ef 100644 --- a/testsuite/systemtap.base/global_end.exp +++ b/testsuite/systemtap.base/global_end.exp @@ -23,4 +23,10 @@ expect { eof { } } wait -if {$ok == 11} { pass "$test ($ok)" } { fail "$test ($ok)" } +spawn stap -g $srcdir/$subdir/global_end.stp +# above should not do any global variable display so `ok' should only change by one +expect { + -timeout 180 + -re {one,0x1.*one,0x2.*two,0x1.*two,0x2} { incr ok; exp_continue } +} +if {$ok == 12} { pass "$test ($ok)" } { fail "$test ($ok)" } -- 2.43.5