X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=tools%2Fperf%2Fconfig%2Ffeature-checks%2Ftest-libunwind.c;fp=tools%2Fperf%2Fconfig%2Ffeature-checks%2Ftest-libunwind.c;h=43b9369bcab7d03125e19d6f4001080a6b92987f;hb=111173b30a49a6d341ed66a2f7b607ee2d6a64a9;hp=0000000000000000000000000000000000000000;hpb=239ee4a6ab0f82436bfad0ae1aed5ac98f1026e8;p=karo-tx-linux.git diff --git a/tools/perf/config/feature-checks/test-libunwind.c b/tools/perf/config/feature-checks/test-libunwind.c new file mode 100644 index 000000000000..43b9369bcab7 --- /dev/null +++ b/tools/perf/config/feature-checks/test-libunwind.c @@ -0,0 +1,27 @@ +#include +#include + +extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, + unw_word_t ip, + unw_dyn_info_t *di, + unw_proc_info_t *pi, + int need_unwind_info, void *arg); + + +#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table) + +static unw_accessors_t accessors; + +int main(void) +{ + unw_addr_space_t addr_space; + + addr_space = unw_create_addr_space(&accessors, 0); + if (addr_space) + return 0; + + unw_init_remote(NULL, addr_space, NULL); + dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL); + + return 0; +}