mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
Debugger: Track a counter when entering stepping.
This allows us to poll coreState and know if a new stepping needs to be sent. This is useful to allow e.g. regs to show changes per step.
This commit is contained in:
1 parent
e9cc1ee463
commit
77609bbea2
2 files changed
+8
-2
No files matched your search
@@ -54,6 +54,7 @@ static std::mutex m_hStepMutex;
|
||||
static std::condition_variable m_InactiveCond;
|
||||
static std::mutex m_hInactiveMutex;
|
||||
static bool singleStepPending = false;
|
||||
static int steppingCounter = 0;
|
||||
static std::set<Core_ShutdownFunc> shutdownFuncs;
|
||||
static bool windowHidden = false;
|
||||
static double lastActivity = 0.0;
|
||||
@@ -334,6 +335,7 @@ void Core_EnableStepping(bool step) {
|
||||
sleep_ms(1);
|
||||
host->SetDebugMode(true);
|
||||
Core_UpdateState(CORE_STEPPING);
|
||||
steppingCounter++;
|
||||
} else {
|
||||
host->SetDebugMode(false);
|
||||
coreState = CORE_RUNNING;
|
||||
@@ -341,3 +343,7 @@ void Core_EnableStepping(bool step) {
|
||||
m_StepCond.notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
int Core_GetSteppingCounter() {
|
||||
return steppingCounter;
|
||||
}
|
||||
+2
-2
@@ -31,12 +31,12 @@ void Core_ErrorPause();
|
||||
// For platforms that don't call Core_Run
|
||||
void Core_SetGraphicsContext(GraphicsContext *ctx);
|
||||
|
||||
void Core_RunRenderThreadFrame();
|
||||
|
||||
// called from gui
|
||||
void Core_EnableStepping(bool step);
|
||||
void Core_DoSingleStep();
|
||||
void Core_UpdateSingleStep();
|
||||
// Changes every time we enter stepping.
|
||||
int Core_GetSteppingCounter();
|
||||
|
||||
typedef void (* Core_ShutdownFunc)();
|
||||
void Core_ListenShutdown(Core_ShutdownFunc func);
|
||||
|
||||
Reference in new issue
Block a user