treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / build / feature / test-libunwind-x86_64.c
blob62ae4db597dcaa5d7ac3187e1f63d219e388d8c2
1 // SPDX-License-Identifier: GPL-2.0
2 #include <libunwind-x86_64.h>
3 #include <stdlib.h>
5 extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
6 unw_word_t ip,
7 unw_dyn_info_t *di,
8 unw_proc_info_t *pi,
9 int need_unwind_info, void *arg);
12 #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
14 static unw_accessors_t accessors;
16 int main(void)
18 unw_addr_space_t addr_space;
20 addr_space = unw_create_addr_space(&accessors, 0);
21 if (addr_space)
22 return 0;
24 unw_init_remote(NULL, addr_space, NULL);
25 dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
27 return 0;