From 0718937237db22d26e1b764b4733645c2b9f1562 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 17 Jul 2014 21:33:51 -0400 Subject: Common: Introduce the new Gekko disassembler to Common. This moves the Gekko disassembler to Common where it should be. Having it in the Bochs disassembly Externals is incorrect. Unlike the PowerPC disassembler prior however, this one is updated to have an API that is more fitting for C++. e.g. Not needing to specify a string buffer and size. It does all of this under the hood. This modifies all the DebuggingInterfaces as necessary to handle this. --- Source/Core/DolphinWX/Debugger/JitWindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/JitWindow.cpp') diff --git a/Source/Core/DolphinWX/Debugger/JitWindow.cpp b/Source/Core/DolphinWX/Debugger/JitWindow.cpp index dc10d4ac5c..0ef374ddbe 100644 --- a/Source/Core/DolphinWX/Debugger/JitWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/JitWindow.cpp @@ -5,7 +5,6 @@ #include #include #include // Bochs -#include // Bochs #include #include #include @@ -22,6 +21,7 @@ #include #include "Common/Common.h" +#include "Common/GekkoDisassembler.h" #include "Common/StringUtil.h" #include "Core/PowerPC/Gekko.h" #include "Core/PowerPC/PPCAnalyst.h" @@ -161,9 +161,8 @@ void CJitWindow::Compare(u32 em_address) for (u32 i = 0; i < code_block.m_num_instructions; i++) { const PPCAnalyst::CodeOp &op = code_buffer.codebuffer[i]; - char temp[256]; - DisassembleGekko(op.inst.hex, op.address, temp, 256); - sptr += sprintf(sptr, "%08x %s\n", op.address, temp); + std::string temp = GekkoDisassembler::Disassemble(op.inst.hex, op.address); + sptr += sprintf(sptr, "%08x %s\n", op.address, temp.c_str()); } // Add stats to the end of the ppc box since it's generally the shortest. -- cgit v1.2.3