1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed some profiler shutdown issues

This commit is contained in:
Brian Fiete 2020-04-16 10:46:58 -07:00
parent 6434676134
commit 9eb5280170
5 changed files with 30 additions and 3 deletions

View file

@ -924,6 +924,7 @@ void WinDebugger::DebugThreadProc()
{
DoUpdate();
}
mIsRunning = false;
for (int i = 0; i < (int) mBreakpoints.size(); i++)
@ -1314,6 +1315,11 @@ void WinDebugger::Detach()
Sleep(1);
}
for (auto profiler : mProfilerSet)
profiler->Stop();
BfLogDbg("Debugger Detach - thread finished\n");
mPendingProfilerMap.Clear();
for (auto profiler : mNewProfilerList)
delete profiler;
@ -1407,6 +1413,18 @@ Profiler* WinDebugger::PopProfiler()
return profiler;
}
void WinDebugger::AddProfiler(DbgProfiler * profiler)
{
AutoCrit autoCrit(mDebugManager->mCritSect);
mProfilerSet.Add(profiler);
}
void WinDebugger::RemoveProfiler(DbgProfiler * profiler)
{
AutoCrit autoCrit(mDebugManager->mCritSect);
mProfilerSet.Remove(profiler);
}
void WinDebugger::ReportMemory(MemReporter* memReporter)
{
mEmptyDebugTarget->ReportMemory(memReporter);