mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
Debugger: Fixed forbid breakpoints not working properly with "break on" options
This commit is contained in:
parent
3dee924218
commit
ef302de461
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue