diff options
| author | Shauren <shauren.trinity@gmail.com> | 2016-03-03 17:29:48 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-03-12 23:52:35 +0100 |
| commit | fd819b09194b182e1429536454f8a80a423aaf1b (patch) | |
| tree | f372fa8a9dc63237c661f1c8246a93e9a68aae4f /src/common/Debugging | |
| parent | 637f050b9edf42746207fe47ce58ce1b79ca5e82 (diff) | |
Core/Debugging: Make abort() less bad on windows by forcing crash log generation
(cherry picked from commit dea7d429abe5143672154784f93e4b19020062d5)
# Conflicts:
# src/server/bnetserver/Main.cpp
Diffstat (limited to 'src/common/Debugging')
| -rw-r--r-- | src/common/Debugging/Errors.cpp | 7 | ||||
| -rw-r--r-- | src/common/Debugging/Errors.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 1ec66ff6d59..749cdec2742 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -96,4 +96,11 @@ void Abort(char const* file, int line, char const* function) exit(1); } +void AbortHandler(int sigval) +{ + // nothing useful to log here, no way to pass args + *((volatile int*)NULL) = 0; + exit(1); +} + } // namespace Trinity diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 38e311a6b13..37d247ada82 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -34,6 +34,8 @@ namespace Trinity void Warning(char const* file, int line, char const* function, char const* message); + DECLSPEC_NORETURN void AbortHandler(int sigval) ATTR_NORETURN; + } // namespace Trinity #if COMPILER == COMPILER_MICROSOFT |
