summaryrefslogtreecommitdiff
path: root/src/debug/ee
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-11 07:20:12 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-11 07:20:12 -0800
commit56d4ba8a9338c3ff7378d18378f38ad847f130f2 (patch)
tree40b9463880286b1bc0b4c3f858680f1ff210c933 /src/debug/ee
parent8be2f9bb0039e2c49f59c4fb66cebf5467485ba2 (diff)
downloadcoreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.tar.gz
coreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.tar.bz2
coreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.zip
Revert "Remove always defined FEATURE_CORESYSTEM"
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
Diffstat (limited to 'src/debug/ee')
-rw-r--r--src/debug/ee/rcthread.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/debug/ee/rcthread.cpp b/src/debug/ee/rcthread.cpp
index 2244766c32..d4e707dd06 100644
--- a/src/debug/ee/rcthread.cpp
+++ b/src/debug/ee/rcthread.cpp
@@ -734,7 +734,18 @@ HRESULT DebuggerRCThread::SetupRuntimeOffsets(DebuggerIPCControlBlock * pDebugge
pDebuggerRuntimeOffsets->m_excepNotForRuntimeBPAddr = (void*) ExceptionNotForRuntimeFlare;
pDebuggerRuntimeOffsets->m_notifyRSOfSyncCompleteBPAddr = (void*) NotifyRightSideOfSyncCompleteFlare;
+#if !defined(FEATURE_CORESYSTEM)
+ // Grab the address of RaiseException in kernel32 because we have to play some games with exceptions
+ // that are generated there (just another reason why mixed mode debugging is shady). See bug 476768.
+ HMODULE hModule = WszGetModuleHandle(W("kernel32.dll"));
+ _ASSERTE(hModule != NULL);
+ PREFAST_ASSUME(hModule != NULL);
+ pDebuggerRuntimeOffsets->m_raiseExceptionAddr = GetProcAddress(hModule, "RaiseException");
+ _ASSERTE(pDebuggerRuntimeOffsets->m_raiseExceptionAddr != NULL);
+ hModule = NULL;
+#else
pDebuggerRuntimeOffsets->m_raiseExceptionAddr = NULL;
+#endif
#endif // FEATURE_INTEROP_DEBUGGING
pDebuggerRuntimeOffsets->m_pPatches = DebuggerController::GetPatchTable();
@@ -790,7 +801,7 @@ static LONG _debugFilter(LPEXCEPTION_POINTERS ep, PVOID pv)
SUPPRESS_ALLOCATION_ASSERTS_IN_THIS_SCOPE;
-#if defined(_DEBUG)
+#if defined(_DEBUG) || !defined(FEATURE_CORESYSTEM)
DebuggerIPCEvent *event = ((DebugFilterParam *)pv)->event;
DWORD pid = GetCurrentProcessId();
@@ -829,6 +840,16 @@ static LONG _debugFilter(LPEXCEPTION_POINTERS ep, PVOID pv)
#endif
// this message box doesn't work well on coresystem... we actually get in a recursive exception handling loop
+#ifndef FEATURE_CORESYSTEM
+ // We took an AV on the helper thread. This is a catastrophic situation so we can
+ // simply call the EE's catastrophic message box to display the error.
+ EEMessageBoxCatastrophic(
+ IDS_DEBUG_UNHANDLEDEXCEPTION_IPC, IDS_DEBUG_SERVICE_CAPTION,
+ type,
+ ep->ExceptionRecord->ExceptionCode,
+ GetIP(ep->ContextRecord),
+ pid, pid, tid, tid);
+#endif
// For debugging, we can change the behavior by manually setting eax.
// EXCEPTION_EXECUTE_HANDLER=1, EXCEPTION_CONTINUE_SEARCH=0, EXCEPTION_CONTINUE_EXECUTION=-1