Skip to content
Permalink
Browse files

Merge pull request #11171 from unknownbrackets/debugger

Fix some issues with GE dumps
  • Loading branch information...
hrydgard committed Jun 14, 2018
2 parents 0fd4ea8 + 582bc2d commit e03aeba75e3d3faadf40eb0fcff3e8ca8cd57f2f
Showing with 157 additions and 78 deletions.
  1. +12 −4 Core/Core.cpp
  2. +5 −0 Core/Core.h
  3. +132 −66 GPU/Debugger/Record.cpp
  4. +4 −6 GPU/Debugger/Stepping.cpp
  5. +1 −1 GPU/Debugger/Stepping.h
  6. +2 −0 GPU/GLES/TextureCacheGLES.cpp
  7. +1 −1 Windows/GEDebugger/GEDebugger.cpp
@@ -54,7 +54,8 @@ static std::condition_variable m_InactiveCond;
static std::mutex m_hInactiveMutex;
static bool singleStepPending = false;
static int steppingCounter = 0;
static std::set<CoreLifecycleFunc> shutdownFuncs;
static std::set<CoreLifecycleFunc> lifecycleFuncs;
static std::set<CoreStopRequestFunc> stopFuncs;
static bool windowHidden = false;
static double lastActivity = 0.0;
static double lastKeepAwake = 0.0;
@@ -76,17 +77,24 @@ void Core_NotifyActivity() {
}

void Core_ListenLifecycle(CoreLifecycleFunc func) {
shutdownFuncs.insert(func);
lifecycleFuncs.insert(func);
}

void Core_NotifyLifecycle(CoreLifecycle stage) {
for (auto it = shutdownFuncs.begin(); it != shutdownFuncs.end(); ++it) {
(*it)(stage);
for (auto func : lifecycleFuncs) {
func(stage);
}
}

void Core_ListenStopRequest(CoreStopRequestFunc func) {
stopFuncs.insert(func);
}

void Core_Stop() {
Core_UpdateState(CORE_POWERDOWN);
for (auto func : stopFuncs) {
func();
}
}

bool Core_IsStepping() {
@@ -51,10 +51,15 @@ enum class CoreLifecycle {
MEMORY_REINITED,
};

// Callback is called on the Emu thread.
typedef void (* CoreLifecycleFunc)(CoreLifecycle stage);
void Core_ListenLifecycle(CoreLifecycleFunc func);
void Core_NotifyLifecycle(CoreLifecycle stage);

// Callback is executed on requesting thread.
typedef void (* CoreStopRequestFunc)();
void Core_ListenStopRequest(CoreStopRequestFunc callback);

bool Core_IsStepping();

bool Core_IsActive();
Oops, something went wrong.

0 comments on commit e03aeba

Please sign in to comment.
You can’t perform that action at this time.