Debugger: Fixed forbid breakpoints not working properly with "break on" options

This commit is contained in:
Sour 2024-10-15 09:29:42 +09:00
parent 3dee924218
commit ef302de461
2 changed files with 12 additions and 0 deletions

View file

@ -457,6 +457,7 @@ void Debugger::SleepUntilResume(CpuType sourceCpu, BreakSource source, MemoryOpe
//If SleepUntilResume was called outside of ProcessInstruction, keep running
return;
} else if(IsBreakpointForbidden(source, sourceCpu, operation)) {
ClearPendingBreakRequests();
return;
}
@ -655,6 +656,15 @@ void Debugger::Run()
_waitForBreakResume = false;
}
void Debugger::ClearPendingBreakRequests()
{
for(int i = 0; i <= (int)DebugUtilities::GetLastCpuType(); i++) {
if(_debuggers[i].Debugger) {
_debuggers[i].Debugger->Run();
}
}
}
void Debugger::PauseOnNextFrame()
{
//Use BreakSource::PpuStep to prevent "Run single frame" from triggering the "bring to front on pause" feature

View file

@ -99,6 +99,8 @@ private:
bool IsBreakOptionEnabled(BreakSource src);
template<CpuType type> void SleepOnBreakRequest();
void ClearPendingBreakRequests();
bool IsBreakpointForbidden(BreakSource source, CpuType sourceCpu, MemoryOperationInfo* operation);
public: