Skip to content

Fix multiple bugs in GDB RP functionality#222

Merged
MaxDesiatov merged 9 commits intomainfrom
maxd/debugger-fixes
Nov 1, 2025
Merged

Fix multiple bugs in GDB RP functionality#222
MaxDesiatov merged 9 commits intomainfrom
maxd/debugger-fixes

Conversation

@MaxDesiatov
Copy link
Member

@MaxDesiatov MaxDesiatov commented Oct 31, 2025

Multiple issues with GDB RP implementation are addressed here:

  1. WasmKit not shutting down after debugger client sends a kill packet. We have to use a wrapping withThrowingTaskGroup for existing withThrowingDiscardingTaskGroup to propagate debugger handler cancellation error.
  2. isNoAckModeActive set too early in GDBHostCommandDecoder, which led to non-deterministic issues with command decoding.
  3. Separate enum BreakpointState within Debugger to properly express its state machine nature and correctly report exit codes of WASI modules to the debugger client.
  4. Use of Execution.CurrentMemory.mayUpdateCurrentInstance without the from: parameter, which means we no longer go through an early return path and now correctly set linear memory instance when resuming from a breakpoint.
  5. Fixed OOB in binary search implementation in DebuggerInstructionMapping, where we had to peek outside of an array slice and use Array's self instead of local slice.

@MaxDesiatov MaxDesiatov added bug wasm debugging Support for debugging of executed Wasm labels Oct 31, 2025
@MaxDesiatov MaxDesiatov marked this pull request as ready for review October 31, 2025 15:32
@MaxDesiatov MaxDesiatov merged commit 2503b0b into main Nov 1, 2025
18 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/debugger-fixes branch November 1, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug wasm debugging Support for debugging of executed Wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants