diff options
| author | Louis <35883445+louist103@users.noreply.github.com> | 2022-07-13 21:42:53 -0400 |
|---|---|---|
| committer | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2022-07-30 22:18:11 -0400 |
| commit | 497bf79892c9ad6166f247be0f14ced632523b79 (patch) | |
| tree | 9805c1b9a1f394a6df6a1a02e020b9e2ab7adefe /ZAPD/CrashHandler.h | |
| parent | f54f2fa96bfc476a15fcc3ebcd6124bc19164fcd (diff) | |
it works
Diffstat (limited to 'ZAPD/CrashHandler.h')
| -rw-r--r-- | ZAPD/CrashHandler.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ZAPD/CrashHandler.h b/ZAPD/CrashHandler.h new file mode 100644 index 0000000..9bb3f5b --- /dev/null +++ b/ZAPD/CrashHandler.h @@ -0,0 +1,21 @@ +#include <array> +#include <csignal> +#include <cstdio> +#include <cstdlib> +#include <ctime> + +#if defined(__linux__) +#include <cxxabi.h> // for __cxa_demangle +#include <dlfcn.h> // for dladdr +#include <execinfo.h> +#include <unistd.h> +void ErrorHandler(int sig); +#elif defined(_MSC_VER) +#include <Windows.h> +#include <DbgHelp.h> + +#include <inttypes.h> +LONG seh_filter(_EXCEPTION_POINTERS* ex); + +#pragma comment(lib, "Dbghelp.lib") +#endif |
