1 // SPDX-License-Identifier: GPL-2.0
4 #include <elfutils/libdw.h>
5 #include <elfutils/libdwfl.h>
6 #include <elfutils/version.h>
10 Dwarf
*dbg
= dwarf_begin(0, DWARF_C_READ
);
15 int test_libdw_unwind(void)
18 * This function is guarded via: __nonnull_attribute__ (1, 2).
19 * Passing '1' as arguments value. This code is never executed,
22 dwfl_thread_getframes((void *) 1, (void *) 1, NULL
);
26 int test_libdw_getlocations(void)
28 Dwarf_Addr base
, start
, end
;
34 return (int)dwarf_getlocations(&attr
, offset
, &base
, &start
, &end
, &op
, &nops
);
37 int test_libdw_getcfi(void)
41 return dwarf_getcfi(dwarf
) == NULL
;
44 int test_elfutils(void)
46 Dwarf_CFI
*cfi
= NULL
;
54 return test_libdw() + test_libdw_unwind() + test_libdw_getlocations() +
55 test_libdw_getcfi() + test_elfutils();