mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2952] [MERGED] GDBServer: Fix emulator deadlock on client connection #1381
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/2952
Author: @boricj
Created: 2/25/2023
Status: ✅ Merged
Merged: 3/13/2023
Merged by: @stenzek
Base:
master← Head:bugfix/GDBServer📝 Commits (2)
7810e68Qt: Run GDB server on emulation threadd65fb0eQt: Add toggle to enable GDB server📊 Changes
9 files changed (+91 additions, -65 deletions)
View changed files
📝
src/duckstation-qt/gdbconnection.cpp(+30 -25)📝
src/duckstation-qt/gdbconnection.h(+5 -4)📝
src/duckstation-qt/gdbserver.cpp(+30 -17)📝
src/duckstation-qt/gdbserver.h(+5 -4)📝
src/duckstation-qt/mainwindow.cpp(+7 -11)📝
src/duckstation-qt/mainwindow.h(+0 -4)📝
src/duckstation-qt/mainwindow.ui(+9 -0)📝
src/duckstation-qt/qthost.cpp(+3 -0)📝
src/duckstation-qt/qthost.h(+2 -0)📄 Description
The GDB server has a regression bisected down to
8d7aea5e19: DuckStation hangs when a client connects and the GDB connection tries to pause a running emulation, or at least it hangs every single time on my system.I'm no Qt expert and I don't know what's going on (I also have hangs when I try to open the CPU Debugger window if the emulator isn't paused, so something's definitely fishy), but migrating the GDB stuff to the CPU emulation thread no longer causes DuckStation to hang while playing around with the GDB connection. We can't mess around with the emulated CPU if it's running anyway, so I don't expect this to be a problem.
While I'm here, let's also add an option toggle for enabling the GDB server in the Debug menu for visibility. It only modifies the setting and does not start/stop the GDB server on-the-fly, so it takes effect on the next power-on of the console.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.