12 memset(buffer, 0,
sizeof(buffer));
13 const int calls = backtrace(buffer,
sizeof(buffer) /
sizeof(
void*));
15 printf(
"Oooh I'm gonna die. Good luck!\n\n");
16 backtrace_symbols_fd(buffer, calls, 1);
void dump_trace()
Dump a backtrace if there is a segfault.
Define common buffer sizes.
#define BIG_BUF_SIZE
Bigger fixed-size buffers.