testsuite/buildok/oldlocals02.stp
raw| 1 | #! stap -gp4 |
| 2 | |
| 3 | # test accessing locals in old fashion using /* unmangled */ |
| 4 | function baz:long(foo:long, bar:string) |
| 5 | %{ /* unmangled */ |
| 6 | printk("%s\n", THIS->bar); |
| 7 | /* Notice that we can also use the new fashion: */ |
| 8 | THIS->__retvalue = 600 + THIS->foo + STAP_ARG_foo; |
| 9 | %} |
| 10 | |
| 11 | probe begin { |
| 12 | q = baz(9001, "O hai... I am in your dmesg, putting the Lolcats ^w^") |
| 13 | printf("%d\n", q) |
| 14 | exit() |
| 15 | } |