summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2010-01-28 14:16:43 +0800
committerWenji Huang <wenji.huang@oracle.com>2010-01-28 14:16:43 +0800
commit982b88bd950381434a8325e550eff9df59f59dcd (patch)
tree5aed232c2d90c962fa64b35830901e332ea31f2b /staptree.cxx
parent2addc662c2d3d29f6a6cd1fa6ef224b67fce21b8 (diff)
downloadsystemtap-steved-982b88bd950381434a8325e550eff9df59f59dcd.tar.gz
systemtap-steved-982b88bd950381434a8325e550eff9df59f59dcd.tar.xz
systemtap-steved-982b88bd950381434a8325e550eff9df59f59dcd.zip
PR6954: make ++/-- operation trigger automatic global printing
* staptree.cxx (varuse_collecting_visitor::visit_arrayindex): Regard operations as pure writes. * testsuite/systemtap.base/global_end.exp: Add test case. * testsuite/systemtap.base/global_end.stp: Ditto.
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 4c3b3090..7a335fc3 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -1897,19 +1897,21 @@ varuse_collecting_visitor::visit_arrayindex (arrayindex *e)
void
varuse_collecting_visitor::visit_pre_crement (pre_crement *e)
{
- expression* last_lrvalue = current_lrvalue;
- current_lrvalue = e->operand; // leave a mark for ::visit_symbol
+ // PR6954: regard as pure writes
+ expression* last_lvalue = current_lvalue;
+ current_lvalue = e->operand; // leave a mark for ::visit_symbol
functioncall_traversing_visitor::visit_pre_crement (e);
- current_lrvalue = last_lrvalue;
+ current_lvalue = last_lvalue;
}
void
varuse_collecting_visitor::visit_post_crement (post_crement *e)
{
- expression* last_lrvalue = current_lrvalue;
- current_lrvalue = e->operand; // leave a mark for ::visit_symbol
+ // PR6954: regard as pure writes
+ expression* last_lvalue = current_lvalue;
+ current_lvalue = e->operand; // leave a mark for ::visit_symbol
functioncall_traversing_visitor::visit_post_crement (e);
- current_lrvalue = last_lrvalue;
+ current_lvalue = last_lvalue;
}
void