Stop QEMU read_mem32/write_mem32 from leaving the target permanently halted#57
Merged
Conversation
…halted stub.continue_execution().await? propagated via ? after a successful read/write, discarding the valid result and leaving the target halted for the rest of the run -- every subsequent interrupt() then hit an already-halted target. Resume now retries once (covers a transient GDB-RSP blip) and its outcome is tracked separately from the read/write result, so a resume failure is recorded (finish() reports Failed) without discarding an already-successful read or write.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
read_mem32/write_mem32halt the target withinterrupt(), perform the read/write, then resume withcontinue_execution().await?. If resume failed, the?propagated immediately, discarding an already-successful read/write result and leaving the target halted — every subsequentinterrupt()call for the rest of the run then hit an already-halted target.resume_with_retry), covering a transient GDB-RSP blip (e.g. a TCP hiccup) that self-heals on a second attempt.record_failure(sofinish()correctly reportsFailedinstead of silently leaving the target halted with no indication anything went wrong) without discarding an already-successful read or write result.read_mem32andwrite_mem32.Test plan
cargo test -p nucleus-hil --lib— 62 passed, including new regression tests:resume_with_retry_recovers_after_one_transient_failureresume_with_retry_fails_after_two_consecutive_failuresread_mem32_preserves_a_successful_read_even_when_resume_never_succeedswrite_mem32_records_failure_when_resume_never_succeedscargo clippy -p nucleus-hil -p nucleus-cli --all-targets -- -D warnings— clean.cargo fmt --all -- --check— clean.Generated by Claude Code