| 11 | #include <cstdlib> // std::exit |
| 12 | |
| 13 | void print_signal_handler_and_exit() { |
| 14 | typedef void(*function_t)(int); |
| 15 | |
| 16 | function_t old_signal_function = ::signal(SIGSEGV, SIG_DFL); |
| 17 | boost::stacktrace::frame f(old_signal_function); |
| 18 | std::cout << f << std::endl; |
| 19 | std::exit(0); |
| 20 | } |
| 21 | //] |
| 22 | |
| 23 |