12 #include <elfutils/libdw.h>
13 #include <elfutils/version.h>
14 #ifndef _ELFUTILS_PREREQ
20 Dwarf
*dbg
= dwarf_begin
(0, DWARF_C_READ
);
31 Elf
*elf
= elf_begin
(0, ELF_C_READ
, 0);
37 #include <gnu/libc-version.h>
41 const char
*version
= gnu_get_libc_version
();
47 #include <android/api-level.h>
51 return __ANDROID_API__
;
55 define SOURCE_ELF_MMAP
59 Elf
*elf
= elf_begin
(0, ELF_C_READ_MMAP
, 0);
64 define SOURCE_ELF_GETPHDRNUM
69 return elf_getphdrnum
(0, &dst
);
79 return SLsmg_init_smg
();
86 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
88 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
90 int main
(int argc
, char
*argv
[])
92 gtk_init
(&argc
, &argv
);
98 define SOURCE_GTK2_INFOBAR
99 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
101 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
113 define SOURCE_PERL_EMBED
126 define SOURCE_PYTHON_VERSION
128 #if PY_VERSION_HEX >= 0x03000000
136 define SOURCE_PYTHON_EMBED
151 bfd_demangle
(0, 0, 0);
156 define SOURCE_CPLUS_DEMANGLE
157 extern char
*cplus_demangle
(const char
*, int
);
161 cplus_demangle
(0, 0);
166 define SOURCE_STRLCPY
168 extern size_t strlcpy
(char
*dest
, const char
*src
, size_t size
);
172 strlcpy
(NULL
, NULL
, 0);
178 define SOURCE_LIBUNWIND
179 #include <libunwind.h>
182 extern int UNW_OBJ
(dwarf_search_unwind_table
) (unw_addr_space_t
as,
186 int need_unwind_info
, void
*arg
);
189 #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
193 unw_addr_space_t addr_space
;
194 addr_space
= unw_create_addr_space
(NULL
, 0);
195 unw_init_remote
(NULL
, addr_space
, NULL
);
196 dwarf_search_unwind_table
(addr_space
, 0, NULL
, NULL
, 0, NULL
);
203 define SOURCE_BACKTRACE
204 #include <execinfo.h>
210 backtrace_symbols
(NULL
, 0);
217 define SOURCE_LIBAUDIT
218 #include <libaudit.h>
222 printf
(\"error message
: %s
\", audit_errno_to_name
(0));
228 define SOURCE_ON_EXIT
233 return on_exit
(NULL
, NULL
);
237 define SOURCE_LIBNUMA