HRESULT status;
- status = g_dacImpl->m_pMutableTarget->
- WriteVirtual(addr, (PBYTE)buffer, size);
+ status = g_dacImpl->m_pMutableTarget->WriteVirtual(addr, (PBYTE)buffer, size);
if (status != S_OK)
{
if (throwEx)
}
#ifdef FEATURE_PAL
+
+static BOOL DacReadAllAdapter(PVOID address, PVOID buffer, SIZE_T size)
+{
+ HRESULT hr = DacReadAll((TADDR)address, (PVOID)buffer, size, false);
+ return SUCCEEDED(hr);
+}
+
HRESULT
DacVirtualUnwind(DWORD threadId, PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers)
{
memset(contextPointers, 0, sizeof(T_KNONVOLATILE_CONTEXT_POINTERS));
}
+ HRESULT hr = S_OK;
+
+#ifdef FEATURE_DATATARGET4
ReleaseHolder<ICorDebugDataTarget4> dt;
- HRESULT hr = g_dacImpl->m_pTarget->QueryInterface(IID_ICorDebugDataTarget4, (void **)&dt);
+ hr = g_dacImpl->m_pTarget->QueryInterface(IID_ICorDebugDataTarget4, (void **)&dt);
if (SUCCEEDED(hr))
{
hr = dt->VirtualUnwind(threadId, sizeof(CONTEXT), (BYTE*)context);
}
+ else
+#endif
+ {
+ SIZE_T baseAddress = DacGlobalBase();
+ if (baseAddress == 0 || !PAL_VirtualUnwindOutOfProc(context, contextPointers, baseAddress, DacReadAllAdapter))
+ {
+ hr = E_FAIL;
+ }
+ }
return hr;
}
+
#endif // FEATURE_PAL
// DacAllocVirtual - Allocate memory from the target process