[root@localhost ~]# cat user.stp
probe process(@1).function(@2){print_ubacktrace();exit();}
session 1 执行 stap user.stp "./a.out" "fun"
session 2 执行 [root@localhost ~]# ./a.out
session 1中打印显示结果
0x4004f9 : fun+0xb/0x12 [/root/a.out]
0x4004d7 : main+0x3f/0x56 [/root/a.out]
0x346881d9f4 [/lib64/libc-2.5.so+0x1d9f4/0x359000]
[root@localhost ~]# stap -e 'probe process("a.out").function("fun") { print_ubacktrace()}' -d /lib64/libc-2.5.so
0x4004d2 : fun+0x0/0x1e [/root/a.out]
0x4004bb : main+0x23/0x3a [/root/a.out]
0x346881d9f4 : __libc_start_main+0xf4/0x1b0 [/lib64/libc-2.5.so]
0x4003e9 : _start+0x29/0x2c [/root/a.out]