diff options
author | graydon <graydon> | 2005-07-20 23:51:17 +0000 |
---|---|---|
committer | graydon <graydon> | 2005-07-20 23:51:17 +0000 |
commit | 313b2f74ad5b3e54dc1b24d15f29e7bbe9548305 (patch) | |
tree | c5659410582623a36ee57001a9af4bc04623001d /testsuite | |
parent | bfb3d2d24be81e7506c754350612f2743ac280f7 (diff) | |
download | systemtap-steved-313b2f74ad5b3e54dc1b24d15f29e7bbe9548305.tar.gz systemtap-steved-313b2f74ad5b3e54dc1b24d15f29e7bbe9548305.tar.xz systemtap-steved-313b2f74ad5b3e54dc1b24d15f29e7bbe9548305.zip |
2005-07-20 Graydon Hoare <graydon@redhat.com>
* elaborate.{cxx,h} (find_array): Remove.
(find_scalar): Rename to find_var, add array support.
* staptree.{cxx,h} (vardecl::compatible_arity): New method.
* translate.cxx: Refactor, add array read/write support.
* testsuite/transok/three.stp: Uncomment array uses.
* testsuite/transok/seven.stp: New test of array r/w.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/transok/seven.stp | 19 | ||||
-rwxr-xr-x | testsuite/transok/three.stp | 4 |
2 files changed, 22 insertions, 1 deletions
diff --git a/testsuite/transok/seven.stp b/testsuite/transok/seven.stp new file mode 100755 index 00000000..0c0e00d7 --- /dev/null +++ b/testsuite/transok/seven.stp @@ -0,0 +1,19 @@ +#! stap -p3 +# +# run at -p4 if you want to test the array temporary +# subexpression variable assignment order is good + +global foo, bar + +probe begin +{ + x = 10 + foo["hello"] = 25 + foo["hello"]++ + ++foo["hello"] + x = foo["hello"] + foo["yo"] *= bar[x, foo["hello"], "goodbye"]++; + printk("hello from systemtap") +} + + diff --git a/testsuite/transok/three.stp b/testsuite/transok/three.stp index 475b832f..6e99b640 100755 --- a/testsuite/transok/three.stp +++ b/testsuite/transok/three.stp @@ -1,11 +1,13 @@ #! stap -p3 +global poo + function f1 (a, b) { c = 1; d = "hello"; # poo[c] = bab[d] = "hi" bab = "hi"; - # bab = poo[c]; + bab = poo[c]; return 0 } |