From f175dcea5870c1678a4915d9b53cad747a84fb3b Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 27 Mar 2024 22:37:37 -0400 Subject: [PATCH] Hack in some more potential debugging help. --- Machines/Acorn/Archimedes/Archimedes.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Machines/Acorn/Archimedes/Archimedes.cpp b/Machines/Acorn/Archimedes/Archimedes.cpp index 008cfeb34..e130d6c65 100644 --- a/Machines/Acorn/Archimedes/Archimedes.cpp +++ b/Machines/Acorn/Archimedes/Archimedes.cpp @@ -175,7 +175,7 @@ class ConcreteMachine: static uint32_t last_pc = 0; // static uint32_t last_r9 = 0; static bool log = false; - static bool accumulate = false; + static bool accumulate = true; // if(executor_.pc() == 0x03801ed8 || (executor_.registers()[9] == 0x00ff'0000 && executor_.registers()[9] != last_r9)) { // printf("At %08x; after last PC %08x and %zu ago was %08x; r9 is %08x [%d]\n", @@ -221,8 +221,15 @@ class ConcreteMachine: } info.append("]"); } + opcodes.insert(instruction); if(accumulate) { - opcodes.insert(instruction); + int c = 0; + for(auto instr : opcodes) { + printf("0x%08x, ", instr); + ++c; + if(!(c&15)) printf("\n"); + } + accumulate = false; } // logger.info().append("%08x: %08x", executor_.pc(), instruction); InstructionSet::ARM::execute(instruction, executor_);