mirror of https://github.com/PCSX2/pcsx2.git
Separate debug pausing from savestates and recording frame advance
This commit is contained in:
parent
1939671e7f
commit
939e576df9
|
@ -174,7 +174,7 @@ void DebugInterface::pauseCpu()
|
||||||
{
|
{
|
||||||
SysCoreThread& core = GetCoreThread();
|
SysCoreThread& core = GetCoreThread();
|
||||||
if (!core.IsPaused())
|
if (!core.IsPaused())
|
||||||
core.Pause();
|
core.Pause(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugInterface::resumeCpu()
|
void DebugInterface::resumeCpu()
|
||||||
|
|
|
@ -124,7 +124,7 @@ void SysThreadBase::Suspend( bool isBlocking )
|
||||||
// The previous suspension state; true if the thread was running or false if it was
|
// The previous suspension state; true if the thread was running or false if it was
|
||||||
// closed, not running, or paused.
|
// closed, not running, or paused.
|
||||||
//
|
//
|
||||||
void SysThreadBase::Pause()
|
void SysThreadBase::Pause(bool debug)
|
||||||
{
|
{
|
||||||
if( IsSelf() || !IsRunning() ) return;
|
if( IsSelf() || !IsRunning() ) return;
|
||||||
|
|
||||||
|
@ -143,7 +143,10 @@ void SysThreadBase::Pause()
|
||||||
|
|
||||||
pxAssertDev( m_ExecMode == ExecMode_Pausing, "ExecMode should be nothing other than Pausing..." );
|
pxAssertDev( m_ExecMode == ExecMode_Pausing, "ExecMode should be nothing other than Pausing..." );
|
||||||
|
|
||||||
OnPause();
|
if (debug)
|
||||||
|
OnPauseDebug();
|
||||||
|
else
|
||||||
|
OnPause();
|
||||||
m_sem_event.Post();
|
m_sem_event.Post();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public:
|
||||||
|
|
||||||
virtual void Suspend( bool isBlocking = true );
|
virtual void Suspend( bool isBlocking = true );
|
||||||
virtual void Resume();
|
virtual void Resume();
|
||||||
virtual void Pause();
|
virtual void Pause(bool debug = false);
|
||||||
virtual void PauseSelf();
|
virtual void PauseSelf();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -123,6 +123,7 @@ protected:
|
||||||
// Resume() has a lot of checks and balances to prevent re-entrance and race conditions.
|
// Resume() has a lot of checks and balances to prevent re-entrance and race conditions.
|
||||||
virtual void OnResumeReady() {}
|
virtual void OnResumeReady() {}
|
||||||
virtual void OnPause() {}
|
virtual void OnPause() {}
|
||||||
|
virtual void OnPauseDebug() {}
|
||||||
|
|
||||||
virtual bool StateCheckInThread();
|
virtual bool StateCheckInThread();
|
||||||
virtual void OnCleanupInThread();
|
virtual void OnCleanupInThread();
|
||||||
|
|
|
@ -210,7 +210,13 @@ void AppCoreThread::OnResumeReady()
|
||||||
|
|
||||||
void AppCoreThread::OnPause()
|
void AppCoreThread::OnPause()
|
||||||
{
|
{
|
||||||
sApp.PostAppMethod( &Pcsx2App::enterDebugMode );
|
//sApp.PostAppMethod( &Pcsx2App::enterDebugMode );
|
||||||
|
_parent::OnPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppCoreThread::OnPauseDebug()
|
||||||
|
{
|
||||||
|
sApp.PostAppMethod(&Pcsx2App::enterDebugMode);
|
||||||
_parent::OnPause();
|
_parent::OnPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@ protected:
|
||||||
|
|
||||||
virtual void OnResumeReady();
|
virtual void OnResumeReady();
|
||||||
virtual void OnPause();
|
virtual void OnPause();
|
||||||
|
virtual void OnPauseDebug();
|
||||||
virtual void OnResumeInThread( bool IsSuspended );
|
virtual void OnResumeInThread( bool IsSuspended );
|
||||||
virtual void OnSuspendInThread();
|
virtual void OnSuspendInThread();
|
||||||
virtual void OnCleanupInThread();
|
virtual void OnCleanupInThread();
|
||||||
|
|
|
@ -611,9 +611,10 @@ void DisassemblyDialog::setDebugMode(bool debugMode, bool switchPC)
|
||||||
|
|
||||||
if (debugMode)
|
if (debugMode)
|
||||||
{
|
{
|
||||||
wxBusyInfo wait("Please wait, Reading ELF functions");
|
{
|
||||||
reset();
|
wxBusyInfo wait("Please wait, Reading ELF functions");
|
||||||
wait.~wxBusyInfo();
|
reset();
|
||||||
|
}
|
||||||
CBreakPoints::ClearTemporaryBreakPoints();
|
CBreakPoints::ClearTemporaryBreakPoints();
|
||||||
breakRunButton->SetLabel(L"Run");
|
breakRunButton->SetLabel(L"Run");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue