Skip to content

Wait for emulation before accepting gdbserver clients#54

Merged
desertkun merged 1 commit into
masterfrom
gdbserver-wait-for-emulation
Jun 17, 2026
Merged

Wait for emulation before accepting gdbserver clients#54
desertkun merged 1 commit into
masterfrom
gdbserver-wait-for-emulation

Conversation

@morozov

@morozov morozov commented Jun 15, 2026

Copy link
Copy Markdown
Member

The gdbserver accepts client connections before the emulation loop starts running. A client that connects in that window and sends the RSP ? packet hangs: answering ? requires trapping the emulator, which is only possible once emulation is executing. The connection times out.

Hold the accept loop until emulation is running. The emulation loop signals a condition variable when it starts; the network thread waits on it before accepting clients. gdbserver_stop also signals it so teardown never blocks.

@desertkun desertkun merged commit 2d90d3b into master Jun 17, 2026
2 checks passed
@desertkun desertkun deleted the gdbserver-wait-for-emulation branch June 17, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants