#! stap -p2 # can't write to target variables in .return probes probe kernel.function("sys_read").return { $fd = 0 printf("fd is %d\n", $fd) } probe kernel.function("sys_open").return { $filename }