This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
print_backtrace compile error
- From: chenyu <yu dot chen dot surf at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Fri, 27 May 2016 21:47:14 +0800
- Subject: print_backtrace compile error
- Authentication-results: sourceware.org; auth=none
Hi all,
Currently I'm trying to use systemtap
from git://sourceware.org/git/systemtap.git
on top of linux 4.6.
It looks like I can not get print_backtrace work,
maybe due to missing some structure definition
in stacktrace.h, other function such as execname()
and cpu() work as expected:
$ cat read_test.stp
$ ! /usr/bin/env stap
probe kernel.function("vfs_read"){
print("----------------START-------------------------\n")
printf("In process [%s]\n", execname())
printf("on CPU [%d]\n", cpu())
print_backtrace()
print("----------------END-------------------------\n")
exit()
}
# ./read_test.stp
In file included from
/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.c:227:0:
/usr/local/share/systemtap/runtime/stack.c:133:2: error:
initialization from incompatible pointer type [-Werror]
.address = print_stack_address,
^
/usr/local/share/systemtap/runtime/stack.c:133:2: error: (near
initialization for âprint_stack_ops.addressâ) [-Werror]
cc1: all warnings being treated as errors
scripts/Makefile.build:291: recipe for target
'/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.o'
failed
make[1]: *** [/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.o]
Error 1
Makefile:1428: recipe for target '_module_/tmp/stapPYCfpw' failed
make: *** [_module_/tmp/stapPYCfpw] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Would you please give some advice on how to deal with it? thanks.