test-backtrace.c 208 B

12345678910111213
  1. #include <execinfo.h>
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. void *backtrace_fns[10];
  6. size_t entries;
  7. entries = backtrace(backtrace_fns, 10);
  8. backtrace_symbols_fd(backtrace_fns, entries, 1);
  9. return 0;
  10. }