#! /bin/sh

stap $@ -g -p4 --compatible=1.7.9 -e '
# test accessing locals using THIS->foo in legacy mode
function baz:long(foo:long, bar:string)
%{
        _stp_printf("%s\n", THIS->bar);
        THIS->__retvalue = 600 + THIS->foo;
%}

probe begin {
   q = baz(9001, "I am in your dmesg making stupid jokes")
   printf("%d\n", q)
   exit()
}
'
