diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-07 23:19:53 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-07 23:19:53 +0200 |
| commit | e2a20dedc354c0b8d2e5253ffd4ac22d2b2898aa (patch) | |
| tree | 4bfd91230b7834feb97d8a0cbb7b73ed10e5de29 /lib | |
| parent | a17bd972a99007099057d7901b88732b22d08270 (diff) | |
| download | tools.nes-e2a20dedc354c0b8d2e5253ffd4ac22d2b2898aa.tar.gz tools.nes-e2a20dedc354c0b8d2e5253ffd4ac22d2b2898aa.zip | |
vnf: display also the break mark on report()
When reporting the final instruction, if that was actually a brk (and
hence we stopped because of it), show the breaking mark as that could be
relevant when debugging.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/vnf/src/lib.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs index c9ae1a0..534fc1c 100644 --- a/lib/vnf/src/lib.rs +++ b/lib/vnf/src/lib.rs @@ -577,7 +577,15 @@ impl Machine { } if !self.active { - println!("<end>"); + if matches!( + self.current_instruction.identifier, + InstructionIdentifier::Brk + ) && let Some(brk) = self.status_register.break_mark + { + println!("<end> (break mark = ${:02X})", brk); + } else { + println!("<end>"); + } } } |
