From e2a20dedc354c0b8d2e5253ffd4ac22d2b2898aa Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 7 Sep 2026 23:19:53 +0200 Subject: vnf: display also the break mark on report() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- tests/expected/runrom/halt.txt | 11 +++++++++++ tests/runrom/halt.s | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/expected/runrom/halt.txt create mode 100644 tests/runrom/halt.s (limited to 'tests') diff --git a/tests/expected/runrom/halt.txt b/tests/expected/runrom/halt.txt new file mode 100644 index 0000000..8e4d83e --- /dev/null +++ b/tests/expected/runrom/halt.txt @@ -0,0 +1,11 @@ + PC: $8000, cycles: 7, registers: [a: $00, x: $00, y: $00, sp: $FD], status: ----I-- + [STACK]: 02 80 00 00 + [STACK]: 34 02 80 00 00 +brk PC: $8000, cycles: 14, registers: [a: $00, x: $00, y: $00, sp: $FA], status: --B-I-- + (break mark = $42) + +== Memory dump == + +[$2FB] = $34 [reads=0, writes=1] +[$2FC] = $02 [reads=0, writes=1] +[$2FD] = $80 [reads=0, writes=1] diff --git a/tests/runrom/halt.s b/tests/runrom/halt.s new file mode 100644 index 0000000..06d0bef --- /dev/null +++ b/tests/runrom/halt.s @@ -0,0 +1,20 @@ +.segment "HEADER" + .byte 'N', 'E', 'S', $1A + .byte $02, $01 + .byte $00 + .byte $00 + +.segment "CHARS" +.byte 0 + +.segment "VECTORS" + .addr reset, reset, reset + +.segment "CODE" +;; asan:stack full + +.proc reset + brk + .byte $42 + rts +.endproc -- cgit v1.2.3