Skip to content

Send checkpoints when stepping or pausing in trace mode#352

Merged
MaartenS11 merged 2 commits intomainfrom
feat/tracing-stepping-pausing
Apr 17, 2026
Merged

Send checkpoints when stepping or pausing in trace mode#352
MaartenS11 merged 2 commits intomainfrom
feat/tracing-stepping-pausing

Conversation

@MaartenS11
Copy link
Copy Markdown
Member

@MaartenS11 MaartenS11 commented Apr 15, 2026

This works better for debuggers such as MIO which expect information about the current program counter/program state while stepping.

Also now resets the instruction counter upon using reset in the debugger so this no loner happens:

CHECKPOINT {"instructions_executed": 17, "fidx_called": 1, "args": [21], "returns": [-2], "snapshot": {"pc":241}}
EMU: chip_digital_write(10,0) 
EMU: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
EMU: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
EMU: chip_digital_write(11,1) 
EMU: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
EMU: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
Interrupt: 13
Reset WARDuino.
04
Interrupt: 4
CHECKPOINT {"instructions_executed": 13, "snapshot": {"pc":213}}
STEP!

Here we reset and then execute one instruction but say we executed 13. This should now be resolved.

@MaartenS11 MaartenS11 force-pushed the feat/tracing-stepping-pausing branch from d2e79eb to df75a3b Compare April 15, 2026 14:28
This works better for debuggers such as MIO which expect information about the current program counter/program state while stepping.
This ensures the debugger never reports executing more instructions than it actually did when resetting.
@MaartenS11 MaartenS11 force-pushed the feat/tracing-stepping-pausing branch from 40b5177 to 30ad58e Compare April 15, 2026 15:10
@MaartenS11 MaartenS11 merged commit 82a8afd into main Apr 17, 2026
17 checks passed
@MaartenS11 MaartenS11 deleted the feat/tracing-stepping-pausing branch April 17, 2026 13:26
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.

1 participant