projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08f67f0
)
Suppress debug exceptions when running under native (lldb/gdb) debugger.
author
Mike McLaughlin
<mikem@microsoft.com>
Tue, 6 Oct 2015 23:44:07 +0000
(16:44 -0700)
committer
Mike McLaughlin
<mikem@microsoft.com>
Tue, 6 Oct 2015 23:51:57 +0000
(16:51 -0700)
src/pal/src/exception/machexception.cpp
patch
|
blob
|
history
diff --git
a/src/pal/src/exception/machexception.cpp
b/src/pal/src/exception/machexception.cpp
index
d51c692
..
6296ebd
100644
(file)
--- a/
src/pal/src/exception/machexception.cpp
+++ b/
src/pal/src/exception/machexception.cpp
@@
-133,9
+133,20
@@
static exception_mask_t GetExceptionMask()
if (exMode == MachException_Uninitialized)
{
+ exMode = MachException_Default;
+
const char * exceptionSettings = getenv(PAL_MACH_EXCEPTION_MODE);
- exMode = exceptionSettings
- ? (MachExceptionMode)atoi(exceptionSettings) : MachException_Default;
+ if (exceptionSettings)
+ {
+ exMode = (MachExceptionMode)atoi(exceptionSettings);
+ }
+ else
+ {
+ if (PAL_IsDebuggerPresent())
+ {
+ exMode = MachException_SuppressDebugging;
+ }
+ }
}
exception_mask_t machExceptionMask = 0;