summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSasha Semennikov <alsemenn@sashas-mbp.guest.corp.microsoft.com>2016-08-02 16:45:21 -0700
committerSasha Semennikov <alsemenn@sashas-mbp.guest.corp.microsoft.com>2016-08-05 13:23:14 -0700
commit0414d77f4796baf246bce548d8e4bfd9b9daa482 (patch)
tree63256bcb5f4ac8250b05362442c933caa2175250 /src
parent3de3ad5792922657efb9438ebdb87a501b5c457b (diff)
downloadcoreclr-0414d77f4796baf246bce548d8e4bfd9b9daa482.tar.gz
coreclr-0414d77f4796baf246bce548d8e4bfd9b9daa482.tar.bz2
coreclr-0414d77f4796baf246bce548d8e4bfd9b9daa482.zip
For helper method frame DAC doesn't read register pointers. So set them to NULL to not user "wrong" data.
Moved context pointers NULL assignment to gmsamd64.cpp Squash commits
Diffstat (limited to 'src')
-rw-r--r--src/debug/di/divalue.cpp7
-rw-r--r--src/vm/amd64/cgenamd64.cpp6
-rw-r--r--src/vm/amd64/gmsamd64.cpp5
3 files changed, 16 insertions, 2 deletions
diff --git a/src/debug/di/divalue.cpp b/src/debug/di/divalue.cpp
index b5ec8ac3f5..50ecd68aa9 100644
--- a/src/debug/di/divalue.cpp
+++ b/src/debug/di/divalue.cpp
@@ -1324,8 +1324,11 @@ HRESULT CordbReferenceValue::BuildFromGCHandle(
NULL, // EnregisteredValueHome * pRemoteRegAddr,
&pRefValue);
- pRefValue->QueryInterface(__uuidof(ICorDebugReferenceValue), (void**)pOutRef);
-
+ if (SUCCEEDED(hr))
+ {
+ pRefValue->QueryInterface(__uuidof(ICorDebugReferenceValue), (void**)pOutRef);
+ }
+
return hr;
}
diff --git a/src/vm/amd64/cgenamd64.cpp b/src/vm/amd64/cgenamd64.cpp
index d5698005be..91af0864f8 100644
--- a/src/vm/amd64/cgenamd64.cpp
+++ b/src/vm/amd64/cgenamd64.cpp
@@ -193,6 +193,12 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
+#define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContextPointers->regname = pUnwoundState->m_Ptrs.p##regname;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
+
+ ClearRegDisplayArgumentAndScratchRegisters(pRD);
+
return;
}
#endif // DACCESS_COMPILE
diff --git a/src/vm/amd64/gmsamd64.cpp b/src/vm/amd64/gmsamd64.cpp
index b6e596e7cf..222ee7381c 100644
--- a/src/vm/amd64/gmsamd64.cpp
+++ b/src/vm/amd64/gmsamd64.cpp
@@ -124,6 +124,11 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
+ // Since we don't have context pointers in this case, just assing them to NULL.
+#define CALLEE_SAVED_REGISTER(regname) unwoundState->m_Ptrs.p##regname = NULL;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
+
#else // !DACCESS_COMPILE
#define CALLEE_SAVED_REGISTER(regname) unwoundState->m_Ptrs.p##regname = PTR_ULONG64(nonVolRegPtrs.regname);