xref: /linux/tools/build/feature/test-backtrace.c (revision bb9707077b4ee5f77bc9939b057ff8a0d410296f)
1 #include <execinfo.h>
2 #include <stdio.h>
3 
4 int main(void)
5 {
6 	void *backtrace_fns[10];
7 	size_t entries;
8 
9 	entries = backtrace(backtrace_fns, 10);
10 	backtrace_symbols_fd(backtrace_fns, entries, 1);
11 
12 	return 0;
13 }
14