if (!m_iCorProcess)
return E_FAIL;
+ // Deltas can be applied only on stopped debuggee process. For Hot Reload scenario we temporary stop it and continue after deltas applied.
HRESULT Status;
+ BOOL procRunning = FALSE;
+ IfFailRet(m_iCorProcess->IsRunning(&procRunning));
+ if (procRunning == TRUE)
+ IfFailRet(m_iCorProcess->Stop(0));
+
IfFailRet(ApplyMetadataAndILDeltas(m_sharedModules.get(), dllFileName, deltaMD, deltaIL));
+ IfFailRet(ApplyPdbDelta(dllFileName, deltaPDB));
+
+ if (procRunning == TRUE)
+ IfFailRet(m_iCorProcess->Continue(0));
- return ApplyPdbDelta(dllFileName, deltaPDB);
+ return S_OK;
}
} // namespace netcoredbg