diff options
author | Lukas Larsson <[email protected]> | 2014-12-04 11:09:06 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-12-19 10:39:52 +0100 |
commit | ffd0153e6dffcc29cf79d0191860047dba0438bb (patch) | |
tree | 31a0ced512b5b243caa5933c73aa4dc70d6c0c87 /erts/emulator/sys/win32/erl_win_sys.h | |
parent | e2a600341324d2ce3689119f8fd61b248702d79f (diff) | |
download | otp-ffd0153e6dffcc29cf79d0191860047dba0438bb.tar.gz otp-ffd0153e6dffcc29cf79d0191860047dba0438bb.tar.bz2 otp-ffd0153e6dffcc29cf79d0191860047dba0438bb.zip |
erts: Improve crash dumps
This commit improves crash dumps in several ways:
* Suspends schedulers to get a current snapshot
* Dumps information about scheduler
* Dumps stack trace of current running process
(including Garbing processes)
Diffstat (limited to 'erts/emulator/sys/win32/erl_win_sys.h')
-rw-r--r-- | erts/emulator/sys/win32/erl_win_sys.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/sys/win32/erl_win_sys.h b/erts/emulator/sys/win32/erl_win_sys.h index 838f0c61eb..fde32c8684 100644 --- a/erts/emulator/sys/win32/erl_win_sys.h +++ b/erts/emulator/sys/win32/erl_win_sys.h @@ -236,4 +236,16 @@ typedef long ssize_t; int init_async(int); int exit_async(void); #endif + +#define ERTS_HAVE_TRY_CATCH 1 + +#define ERTS_SYS_TRY_CATCH(EXPR,CATCH) \ + __try { \ + EXPR; \ + } \ + __except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) \ + { \ + CATCH; \ + } + #endif |