Merge pull request #20831 from Silvris/websocket-debug-fix

Websocket Debugger: fix hanging thread
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2025-09-22 10:27:55 -06:00
commit 033b21ebfc
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -191,7 +191,7 @@ void Core_StateProcessed() {
void Core_WaitInactive() {
while (Core_IsActive() && !GPUStepping::IsStepping()) {
std::unique_lock<std::mutex> guard(m_hInactiveMutex);
m_InactiveCond.wait(guard);
m_InactiveCond.wait_for(guard, std::chrono::seconds(1));
}
}
@@ -61,9 +61,13 @@ struct AutoDisabledReplacements {
// Important: Only use keepReplacements when reading, not writing.
static AutoDisabledReplacements LockMemoryAndCPU(uint32_t addr, bool keepReplacements) {
AutoDisabledReplacements result;
CoreState state = coreState;
if (Core_IsStepping()) {
result.wasStepping = true;
} else {
while (state != CoreState::CORE_RUNNING_CPU) {
state = coreState;
}
Core_Break(BreakReason::MemoryAccess, addr);
Core_WaitInactive();
}