1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Improved hot swap error handling

This commit is contained in:
Brian Fiete 2020-06-30 14:35:20 -07:00
parent 6e5b6694a1
commit ca37d1d8af
3 changed files with 19 additions and 6 deletions

View file

@ -1061,6 +1061,18 @@ void WinDebugger::HotLoad(const Array<String>& objectFiles, int hotIdx)
{
AutoCrit autoCrit(mDebugManager->mCritSect);
if (mDebugTarget->mTargetBinary == NULL)
{
Fail("Hot swapping failed because the hot target binary has not yet been loaded.");
return;
}
if (mDebugTarget->mHotHeap == NULL)
{
Fail("There is no hot heap space available for hot swapping.");
return;
}
BfLogDbg("WinDebugger::HotLoad Start %d\n", hotIdx);
SetAndRestoreValue<int> prevHotIdx(mActiveHotIdx, hotIdx);