OpenCloudOS-Kernel/tools/build/feature/test-backtrace.c

14 lines
208 B
C
Raw Normal View History

#include <execinfo.h>
#include <stdio.h>
int main(void)
{
void *backtrace_fns[10];
size_t entries;
entries = backtrace(backtrace_fns, 10);
backtrace_symbols_fd(backtrace_fns, entries, 1);
return 0;
}