From d8c397248fe2cbd3da9efc96af755f234b668c23 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:13:07 -0300 Subject: [PATCH] chore: dump pipeline state on cpu panic --- src/core/cpu.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/cpu.zig b/src/core/cpu.zig index e54a5fa..092dc20 100644 --- a/src/core/cpu.zig +++ b/src/core/cpu.zig @@ -547,6 +547,8 @@ pub const Arm7tdmi = struct { std.debug.print("spsr: 0x{X:0>8} ", .{self.spsr.raw}); prettyPrintPsr(&self.spsr); + std.debug.print("pipeline: {??X:0>8}\n", .{self.pipe.stage}); + if (self.cpsr.t.read()) { const opcode = self.bus.dbgRead(u16, self.r[15] - 4); const id = thumb.idx(opcode);