summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CrashRecoveryContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r--llvm/lib/Support/CrashRecoveryContext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index a8e34e590fb..f49630411e5 100644
--- a/llvm/lib/Support/CrashRecoveryContext.cpp
+++ b/llvm/lib/Support/CrashRecoveryContext.cpp
@@ -164,10 +164,15 @@ CrashRecoveryContext::unregisterCleanup(CrashRecoveryContextCleanup *cleanup) {
static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)
{
+#ifdef DBG_PRINTEXCEPTION_WIDE_C
+ constexpr ULONG WideDbgPrintValue = DBG_PRINTEXCEPTION_WIDE_C;
+#else
+ constexpr ULONG WideDbgPrintValue = 0x4001000AL;
+#endif
switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case DBG_PRINTEXCEPTION_C:
- case DBG_PRINTEXCEPTION_WIDE_C:
+ case WideDbgPrintValue:
case 0x406D1388: // set debugger thread name
return EXCEPTION_CONTINUE_EXECUTION;
}
OpenPOWER on IntegriCloud