From 2a83b7a7119abd4c63acb5ea7d6849305e313aba Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 18 Oct 2022 04:00:03 -0600 Subject: Support program counter in --dump-regs --- tb/top/conspiracion.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tb/top') diff --git a/tb/top/conspiracion.cpp b/tb/top/conspiracion.cpp index 851aaa2..fb65209 100644 --- a/tb/top/conspiracion.cpp +++ b/tb/top/conspiracion.cpp @@ -12,6 +12,7 @@ #include "Vconspiracion_arm810.h" #include "Vconspiracion_conspiracion.h" #include "Vconspiracion_platform.h" +#include "Vconspiracion_core_control.h" #include "Vconspiracion_core_regs.h" #include "Vconspiracion_core_reg_file.h" @@ -232,13 +233,16 @@ int main(int argc, char **argv) { std::puts("=== dump-regs ==="); - const auto ®file = top.conspiracion->core->regs->a->file; + const auto &core = *top.conspiracion->core; + const auto ®file = core.regs->a->file; int i = 0; for(const auto *name : gp_regs) { std::printf("%08x %s\n", regfile[i++], name); } + + std::printf("%08x pc\n", core.control->pc << 2); } const auto &dumps = *dump_mem; -- cgit v1.2.3