From 51cbdea782705f22053f6b15b2bcc4e99be305fb Mon Sep 17 00:00:00 2001 From: hrydgard Date: Wed, 17 Jun 2009 19:50:59 +0000 Subject: MemoryView can now view ARAM (rightclick -> toggle memory). Add "search for instruction" capability to debugger. Code cleanup, log zelda pb type (9 all the time in Zelda Four Swords) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3479 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Source/Core/DebuggerWX/Src/CodeWindow.cpp') diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index 60b46928c7..aef91973d4 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -46,6 +46,7 @@ #include "FileUtil.h" #include "Core.h" +#include "HW/Memmap.h" #include "HLE/HLE.h" #include "Boot/Boot.h" #include "LogManager.h" @@ -140,6 +141,7 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame) EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu) EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu) + EVT_MENU(IDM_SEARCHINSTRUCTION, CCodeWindow::OnJitMenu) EVT_MENU(IDM_PROFILEBLOCKS, CCodeWindow::OnProfilerMenu) EVT_MENU(IDM_WRITEPROFILE, CCodeWindow::OnProfilerMenu) @@ -656,6 +658,18 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event) case IDM_CLEARCODECACHE: jit.ClearCache(); break; + + case IDM_SEARCHINSTRUCTION: + { + wxString str; + str = wxGetTextFromUser("", "Op?", wxEmptyString, this); + for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4) { + const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr)); + if (name && !strcmp(str.c_str(), name)) + NOTICE_LOG(POWERPC, "Found %s at %08x", str.c_str(), addr); + } + break; + } } } // ===================================== -- cgit v1.2.3