This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
problem in User-Space Probing
- From: ch huang <justlooks at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Tue, 6 Mar 2012 11:17:28 +0800
- Subject: problem in User-Space Probing
- Authentication-results: mr.google.com; spf=pass (google.com: domain of justlooks@gmail.com designates 10.224.96.9 as permitted sender) smtp.mail=justlooks@gmail.com; dkim=pass header.i=justlooks@gmail.com
i write a test function ,
#include <stdio.h>
static void my_out(void)
{
printf("just a test\n");
}
main()
{
printf("befor function\n");
my_out();
printf("after function\n");
}
and compile it
gcc -g -gdwarf-2 -g3 test.c -o test
then write stap script
probe process("/root/test").function("my_out"){
printf("i in %s\n",pp())
}
probe process("/root/test").function("my_out").return{
printf("back from %s\n",probefunc())
}
when i run this script i find some warning information
# stap exec.stp
/usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
‘uprobe_report_exec’:
/usr/local/share/systemtap/runtime/uprobes/uprobes.c:2401: warning:
‘uproc’ may be used uninitialized in this function
/usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
‘uprobe_report_exit’:
/usr/local/share/systemtap/runtime/uprobes/uprobes.c:2101: warning:
‘uproc’ may be used uninitialized in this function
i in process("/root/test").function("my_out@/root/test.c:4")
back from my_out
it seems script works fine ,but i do not know the warning info,is
there something i missed?