From e6e0210e73458415027055774ccd7442106860dd Mon Sep 17 00:00:00 2001 From: Eladash Date: Sun, 18 Jul 2021 21:06:06 +0300 Subject: [PATCH] Extend ppu_thread::call_history_t formatter --- rpcs3/Emu/Cell/PPUThread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 49a0601520..bc5bce3769 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -123,9 +123,13 @@ void fmt_class_string::format(std::string& { const auto& history = get_object(arg); + PPUDisAsm dis_asm(cpu_disasm_mode::normal, vm::g_sudo_addr); + for (u64 count = 0, idx = history.index - 1; idx != umax && count < ppu_thread::call_history_max_size; count++, idx--) { - fmt::append(out, "\n(%u) 0x%08x", count, history.data[idx % ppu_thread::call_history_max_size]); + const u32 pc = history.data[idx % ppu_thread::call_history_max_size]; + dis_asm.disasm(pc); + fmt::append(out, "\n(%u) 0x%08x: %s", count, pc, dis_asm.last_opcode); } }