mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
29 lines
433 B
C++
29 lines
433 B
C++
#pragma once
|
|
#include "stdafx.h"
|
|
#include "Debugger.h"
|
|
|
|
class DebugBreakHelper
|
|
{
|
|
private:
|
|
Debugger* _debugger;
|
|
bool _needResume = false;
|
|
|
|
public:
|
|
DebugBreakHelper(Debugger* debugger)
|
|
{
|
|
_debugger = debugger;
|
|
|
|
if(!debugger->IsExecutionStopped()) {
|
|
debugger->Step(1, false);
|
|
while(!debugger->IsExecutionStopped()) {}
|
|
_needResume = true;
|
|
}
|
|
}
|
|
|
|
~DebugBreakHelper()
|
|
{
|
|
if(_needResume) {
|
|
_debugger->Run();
|
|
}
|
|
}
|
|
}; |