[PATCH] D33260: [CrashRecovery] Don't treat OutputDebugString as a crash

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 14:48:41 PDT 2017


zturner updated this revision to Diff 99209.
zturner added a comment.

Also add the exception codes for printing a wide debugger string and setting a thread name.


https://reviews.llvm.org/D33260

Files:
  llvm/lib/Support/CrashRecoveryContext.cpp


Index: llvm/lib/Support/CrashRecoveryContext.cpp
===================================================================
--- llvm/lib/Support/CrashRecoveryContext.cpp
+++ llvm/lib/Support/CrashRecoveryContext.cpp
@@ -164,6 +164,14 @@
 
 static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)
 {
+  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
+  {
+  case DBG_PRINTEXCEPTION_C:
+  case DBG_PRINTEXCEPTION_WIDE_C:
+  case 0x406D1388:  // set debugger thread name
+    return EXCEPTION_CONTINUE_EXECUTION;
+  }
+
   // Lookup the current thread local recovery object.
   const CrashRecoveryContextImpl *CRCI = CurrentContext->get();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33260.99209.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170516/d46aa148/attachment.bin>


More information about the llvm-commits mailing list