systemtap 用户态调试3

[root@localhost ~]# cat test.c

#include <stdio.h>

int main( void) {

int a=0; a=fun(10,20); printf("%d ",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

原文地址:https://www.cnblogs.com/zengkefu/p/4814692.html