[llvm] r227094 - [Support][Windows] Disable error dialog boxes when stack trace printing is enabled.

Colin LeMahieu colinl at codeaurora.org
Tue Jan 27 14:02:40 PST 2015


This change seems to break building on mingw-w64 "undefined reference to
_imp__set_abort_behavior"

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Michael J. Spencer
Sent: Monday, January 26, 2015 11:05 AM
To: llvm-commits at cs.uiuc.edu
Subject: [llvm] r227094 - [Support][Windows] Disable error dialog boxes when
stack trace printing is enabled.

Author: mspencer
Date: Mon Jan 26 11:05:02 2015
New Revision: 227094

URL: http://llvm.org/viewvc/llvm-project?rev=227094&view=rev
Log:
[Support][Windows] Disable error dialog boxes when stack trace printing is
enabled.

Modified:
    llvm/trunk/lib/Support/Windows/Signals.inc

Modified: llvm/trunk/lib/Support/Windows/Signals.inc
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.i
nc?rev=227094&r1=227093&r2=227094&view=diff
============================================================================
==
--- llvm/trunk/lib/Support/Windows/Signals.inc (original)
+++ llvm/trunk/lib/Support/Windows/Signals.inc Mon Jan 26 11:05:02 2015
@@ -279,6 +279,14 @@ void sys::DontRemoveFileOnSignal(StringR
 /// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
 void sys::PrintStackTraceOnErrorSignal() {
+  // Don't pop up any dialog boxes.
+  // We're already handling writing a "something went wrong" message.
+  _set_abort_behavior(0, _WRITE_ABORT_MSG);  // Disable Dr. Watson.
+  _set_abort_behavior(0, _CALL_REPORTFAULT);  // Disable standard error 
+ dialog box.
+  SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
+
   RegisterHandler();
   LeaveCriticalSection(&CriticalSection);
 }


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list