system/stacktrace.cpp: add backtrace function for debugging, define HAVE_BACKTRACE to enable code

This commit is contained in:
[CST] Focus
2015-03-06 13:20:59 +03:00
parent 476b6d0850
commit 09e1399a11
4 changed files with 189 additions and 1 deletions

7
src/system/stacktrace.h Normal file
View File

@@ -0,0 +1,7 @@
#ifndef _STACKTRACE_H_
#define _STACKTRACE_H_
void print_stacktrace(FILE *out = stderr, unsigned int max_frames = 63);
void install_crash_handler();
#endif