1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Improved hot compilation handling of DLLs

This commit is contained in:
Brian Fiete 2023-02-20 16:21:56 -05:00
parent 990b509111
commit c7ae0988dc
9 changed files with 84 additions and 9 deletions

View file

@ -1067,6 +1067,13 @@ void WinDebugger::Run()
CloseHandle(hThread);
}
bool WinDebugger::HasLoadedTargetBinary()
{
if (mDebugTarget == NULL)
return false;
return mDebugTarget->mTargetBinary != NULL;
}
void WinDebugger::HotLoad(const Array<String>& objectFiles, int hotIdx)
{
AutoCrit autoCrit(mDebugManager->mCritSect);
@ -1891,10 +1898,16 @@ bool WinDebugger::DoUpdate()
}
}
bool hadTarget = mDebugTarget->mTargetBinary != NULL;
mDebugTarget->UnloadDyn(dbgModule->mImageBase);
if (needsBreakpointRehup)
RehupBreakpoints(true);
if ((mDebugTarget->mTargetBinary == NULL) && (hadTarget))
{
mRunState = RunState_TargetUnloaded;
}
mPendingDebugInfoLoad.Remove(dbgModule);
mPendingDebugInfoRequests.Remove(dbgModule);
mDebugManager->mOutMessages.push_back("modulesChanged");
@ -2880,7 +2893,7 @@ void WinDebugger::ContinueDebugEvent()
}
}
if ((mRunState == RunState_Breakpoint) || (mRunState == RunState_Paused))
if ((mRunState == RunState_Breakpoint) || (mRunState == RunState_Paused) || (mRunState == RunState_TargetUnloaded))
{
ClearCallStack();
mRunState = RunState_Running;