systemtap 用户态调试3

[root@localhost ~]# cat test.c

#include <stdio.h>

int main( void) {

int a=0; a=fun(10,20); printf("%d\n",a);

}

int fun(int  a,int b)

{   return a+b; }

 

stap -e 'probe process("a.out").function("fun") { log($$parms) }'

a=0xa b=0x14

stap -e 'probe process("a.out").statement("fun") { log($$vars) }'
a=0x34 b=0x6861cbc0

posted @ 2015-09-16 21:46  zengkefu  阅读(384)  评论(0编辑  收藏  举报