Commit | Line | Data |
---|---|---|
4cc9117a IM |
1 | #include <execinfo.h> |
2 | #include <stdio.h> | |
3 | ||
4 | int main(void) | |
5 | { | |
1e3f30fa IM |
6 | void *backtrace_fns[10]; |
7 | size_t entries; | |
8 | ||
9 | entries = backtrace(backtrace_fns, 10); | |
10 | backtrace_symbols_fd(backtrace_fns, entries, 1); | |
4cc9117a IM |
11 | |
12 | return 0; | |
13 | } |