testsuite/buildok/oldlocals01.stp
raw| 1 | #! /bin/sh |
| 2 | |
| 3 | stap $@ -g -p4 --compatible=1.7.9 -e ' |
| 4 | # test accessing locals using THIS->foo in legacy mode |
| 5 | function baz:long(foo:long, bar:string) |
| 6 | %{ |
| 7 | _stp_printf("%s\n", THIS->bar); |
| 8 | THIS->__retvalue = 600 + THIS->foo; |
| 9 | %} |
| 10 | |
| 11 | probe begin { |
| 12 | q = baz(9001, "I am in your dmesg making stupid jokes") |
| 13 | printf("%d\n", q) |
| 14 | exit() |
| 15 | } |
| 16 | ' |