mirror of https://github.com/PCSX2/pcsx2.git
Fix up debugger stepping
This commit is contained in:
parent
bb09753485
commit
6fc63116bf
|
@ -60,7 +60,7 @@ void intBreakpoint(bool memcheck)
|
|||
}
|
||||
|
||||
CBreakPoints::SetBreakpointTriggered(true);
|
||||
GetCoreThread().PauseSelf();
|
||||
GetCoreThread().PauseSelfDebug();
|
||||
throw Exception::ExitCpuExecute();
|
||||
}
|
||||
|
||||
|
|
|
@ -168,6 +168,21 @@ void SysThreadBase::PauseSelf()
|
|||
}
|
||||
}
|
||||
|
||||
void SysThreadBase::PauseSelfDebug()
|
||||
{
|
||||
if (!IsSelf() || !IsRunning()) return;
|
||||
|
||||
{
|
||||
ScopedLock locker(m_ExecModeMutex);
|
||||
|
||||
if (m_ExecMode == ExecMode_Opened)
|
||||
m_ExecMode = ExecMode_Pausing;
|
||||
|
||||
OnPauseDebug();
|
||||
m_sem_event.Post();
|
||||
}
|
||||
}
|
||||
|
||||
// Resumes the core execution state, or does nothing is the core is already running. If
|
||||
// settings were changed, resets will be performed as needed and emulation state resumed from
|
||||
// memory savestates.
|
||||
|
|
|
@ -114,6 +114,7 @@ public:
|
|||
virtual void Resume();
|
||||
virtual void Pause(bool debug = false);
|
||||
virtual void PauseSelf();
|
||||
virtual void PauseSelfDebug();
|
||||
|
||||
protected:
|
||||
virtual void OnStart();
|
||||
|
|
|
@ -611,10 +611,11 @@ void DisassemblyDialog::setDebugMode(bool debugMode, bool switchPC)
|
|||
|
||||
if (debugMode)
|
||||
{
|
||||
{
|
||||
wxBusyInfo wait("Please wait, Reading ELF functions");
|
||||
reset();
|
||||
}
|
||||
if (!CBreakPoints::GetBreakpointTriggered())
|
||||
{
|
||||
wxBusyInfo wait("Please wait, Reading ELF functions");
|
||||
reset();
|
||||
}
|
||||
CBreakPoints::ClearTemporaryBreakPoints();
|
||||
breakRunButton->SetLabel(L"Run");
|
||||
|
||||
|
|
|
@ -1148,7 +1148,7 @@ void dynarecCheckBreakpoint()
|
|||
return;
|
||||
|
||||
CBreakPoints::SetBreakpointTriggered(true);
|
||||
GetCoreThread().PauseSelf();
|
||||
GetCoreThread().PauseSelfDebug();
|
||||
recExitExecution();
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ void dynarecMemcheck()
|
|||
return;
|
||||
|
||||
CBreakPoints::SetBreakpointTriggered(true);
|
||||
GetCoreThread().PauseSelf();
|
||||
GetCoreThread().PauseSelfDebug();
|
||||
recExitExecution();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue