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:
Unknown W. Brackets committed 2018-06-06 05:58:49 -07:00
1 parent e9cc1ee463
commit 77609bbea2
2 files changed
+8 -2

No files matched your search

+6
View File
@@ -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;
}