sansmoraxz opened PR #15182 from sansmoraxz:guest_debug_fix to bytecodealliance:main:
In a component with several core modules, turning single-stepping off removed the breakpoints in all of its modules except the last one.
The modules share one code image. When single-stepping was switched, each module reset every breakpoint site in that shared code by its own list of breakpoints, including the sites belonging to other modules. Whichever module went last decided for all of them.
With this change, each module only resets its own sites.
The test,
component_breakpoint_survives_single_step, sets a breakpoint in one of two modules, turns single-stepping on and off, and checks that the breakpoint still fires. Without the fix, a breakpoint in the first module never fires.
sansmoraxz requested pchickey for a review on PR #15182.
sansmoraxz removed the review request for wasmtime-core-reviewers from PR #15182.
sansmoraxz requested wasmtime-core-reviewers for a review on PR #15182.
:memo: cfallin submitted PR review:
Thanks!
:speech_balloon: cfallin created PR review comment:
Rather than doing a binary search for each PC as we walk through PCs, it's probably more efficient to add an accessor to
compiled_modulethat returns its offset-range, and test whetherpatch.offsetis within that range, no? Or perhapscompiled_module().contains_offset(patch.offset)actually, with the range-contains comparisons?
:memo: cfallin submitted PR review.
:speech_balloon: cfallin created PR review comment:
(To be clear with the latter: I'm suggesting adding that accessor, not that it already exists)
sansmoraxz updated PR #15182.
:memo: sansmoraxz submitted PR review.
:speech_balloon: sansmoraxz created PR review comment:
done
:thumbs_up: cfallin submitted PR review:
Thanks!
cfallin added PR #15182 Don't lose a component's breakpoints when single-stepping is turned off to the merge queue.
:check: cfallin merged PR #15182.
cfallin removed PR #15182 Don't lose a component's breakpoints when single-stepping is turned off from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC