Workaround for an ARM specific MS C++ compiler bug
authorEugene Zemtsov <Eugene.Zemtsov@microsoft.com>
Fri, 13 Feb 2015 01:12:40 +0000 (17:12 -0800)
committerEugene Zemtsov <Eugene.Zemtsov@microsoft.com>
Fri, 13 Feb 2015 01:12:40 +0000 (17:12 -0800)
Due to a bug #1123874 in arm codegen, critical code path in mscordbi.dll became unusable making any managed debugging impossible on ARM.

[tfs-changeset: 1414914]

src/debug/di/process.cpp

index 8d19dfd..7f243a8 100644 (file)
@@ -9742,6 +9742,11 @@ void CordbProcess::MarshalManagedEvent(DebuggerIPCEvent * pManagedEvent)
 //    The event still needs to be Marshaled before being used. (see code:CordbProcess::MarshalManagedEvent)
 //
 //---------------------------------------------------------------------------------------
+#ifdef _TARGET_ARM_
+// This is a temporary workaround for an ARM specific C++ compiler bug.
+// It should be removed once the bug is fixed.
+#pragma optimize("", off)
+#endif
 bool CordbProcess::CopyManagedEventFromTarget(
     const EXCEPTION_RECORD * pRecord, 
     DebuggerIPCEvent * pLocalManagedEvent)
@@ -9788,6 +9793,9 @@ bool CordbProcess::CopyManagedEventFromTarget(
 
     return true;
 }
+#ifdef _TARGET_ARM_
+#pragma optimize("", on)
+#endif
 
 //---------------------------------------------------------------------------------------
 // EnsureClrInstanceIdSet - Ensure we have a CLR Instance ID to debug