diff options
author | graydon <graydon> | 2005-07-23 02:50:14 +0000 |
---|---|---|
committer | graydon <graydon> | 2005-07-23 02:50:14 +0000 |
commit | 67c0a57949358f8e708361ce93ef3ccc0ea8ef93 (patch) | |
tree | 1268285cc9ef661824c565aee3503b30667bd4b5 /testsuite/semko/thirteen.stp | |
parent | beb816a08698ceaf39910ab40f08beba6c8edb6e (diff) | |
download | systemtap-steved-67c0a57949358f8e708361ce93ef3ccc0ea8ef93.tar.gz systemtap-steved-67c0a57949358f8e708361ce93ef3ccc0ea8ef93.tar.xz systemtap-steved-67c0a57949358f8e708361ce93ef3ccc0ea8ef93.zip |
2005-07-22 Graydon Hoare <graydon@redhat.com>
* translate.cxx (itervar): New class.
(*::visit_foreach_loop): Implement.
Various bug fixes.
* staptree.cxx (deep_copy_visitor::*): Copy tok fields.
* elaborate.cxx (lvalue_aware_traversing_visitor):
(mutated_map_collector):
(no_map_mutation_during_iteration_check): New classes.
(semantic_pass_maps): New function to check map usage.
(semantic_pass): Call it.
* testsuite/transok/eight.stp: Test 'foreach' loop translation.
* testsuite/semko/{thirteen,fourteen,fifteen}.stp:
Test prohibited forms of foreach loops.
Diffstat (limited to 'testsuite/semko/thirteen.stp')
-rwxr-xr-x | testsuite/semko/thirteen.stp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/semko/thirteen.stp b/testsuite/semko/thirteen.stp new file mode 100755 index 00000000..88761ded --- /dev/null +++ b/testsuite/semko/thirteen.stp @@ -0,0 +1,20 @@ +#! stap -p2 + +global foo + +function bar() +{ + foo["hello"] = 10 + return 10 +} + +probe begin +{ + foreach (a in foo) + { + bar() + } + printk("hello from systemtap") +} + + |