GE debugger: Lock when adding command breakpoints

Debuggers add them from their own threads, racing ClearTempBreakpoints
on the emu thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-29 13:17:00 -06:00
1 parent 035c98d14f
commit 7e553b0732
1 file changed
+3
+3
View File
@@ -319,6 +319,8 @@ void GPUBreakpoints::AddAddressBreakpoint(u32 addr, bool temp) {
}
void GPUBreakpoints::AddCmdBreakpoint(u8 cmd, bool temp) {
// Debuggers call this from their own threads, racing ClearTempBreakpoints on the emu thread.
std::lock_guard<std::mutex> guard(breaksLock);
if (temp) {
if (!breakCmds[cmd]) {
breakCmdsTemp[cmd] = true;
@@ -374,6 +376,7 @@ void GPUBreakpoints::AddRenderTargetBreakpoint(u32 addr, bool temp) {
}
void GPUBreakpoints::AddTextureChangeTempBreakpoint() {
std::lock_guard<std::mutex> guard(breaksLock);
textureChangeTemp = true;
hasBreakpoints_ = true;
}