summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Signals.inc
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2015-01-26 17:05:02 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2015-01-26 17:05:02 +0000
commitf5215652d53a2e4b12a581631670180b003bb955 (patch)
tree533322fd0c89f1594684ec48f0a24253f10e7bd0 /llvm/lib/Support/Windows/Signals.inc
parent831fc5e87db2ea14eaaf964059b392be4463933e (diff)
downloadbcm5719-llvm-f5215652d53a2e4b12a581631670180b003bb955.tar.gz
bcm5719-llvm-f5215652d53a2e4b12a581631670180b003bb955.zip
[Support][Windows] Disable error dialog boxes when stack trace printing is enabled.
llvm-svn: 227094
Diffstat (limited to 'llvm/lib/Support/Windows/Signals.inc')
-rw-r--r--llvm/lib/Support/Windows/Signals.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index 35ba6f8e1bb..ad740c79a7a 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -279,6 +279,14 @@ void sys::DontRemoveFileOnSignal(StringRef Filename) {
/// 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);
}
OpenPOWER on IntegriCloud