diff --git a/Source/Core/Common/DebugInterface.h b/Source/Core/Common/DebugInterface.h index 96b4eec275..5bee2f7951 100644 --- a/Source/Core/Common/DebugInterface.h +++ b/Source/Core/Common/DebugInterface.h @@ -31,7 +31,6 @@ public: virtual void RunToBreakpoint() {} virtual void BreakNow() {} virtual void InsertBLR(unsigned int /*address*/, unsigned int /*value*/) {} - virtual void ShowJitResults(unsigned int /*address*/) {}; virtual int GetColor(unsigned int /*address*/){return 0xFFFFFFFF;} virtual std::string GetDescription(unsigned int /*address*/) = 0; }; diff --git a/Source/Core/Core/Debugger/PPCDebugInterface.cpp b/Source/Core/Core/Debugger/PPCDebugInterface.cpp index ed46e18db3..c935fabed9 100644 --- a/Source/Core/Core/Debugger/PPCDebugInterface.cpp +++ b/Source/Core/Core/Debugger/PPCDebugInterface.cpp @@ -213,11 +213,6 @@ void PPCDebugInterface::SetPC(unsigned int address) PowerPC::ppcState.pc = address; } -void PPCDebugInterface::ShowJitResults(unsigned int address) -{ - Host_ShowJitResults(address); -} - void PPCDebugInterface::RunToBreakpoint() { diff --git a/Source/Core/Core/Debugger/PPCDebugInterface.h b/Source/Core/Core/Debugger/PPCDebugInterface.h index c80416d58b..8fc37d4ff2 100644 --- a/Source/Core/Core/Debugger/PPCDebugInterface.h +++ b/Source/Core/Core/Debugger/PPCDebugInterface.h @@ -41,5 +41,4 @@ public: virtual void InsertBLR(unsigned int address, unsigned int value) override; virtual int GetColor(unsigned int address) override; virtual std::string GetDescription(unsigned int address) override; - virtual void ShowJitResults(u32 address) override; }; diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 6cf54b6c95..480846baeb 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -34,7 +34,6 @@ void Host_RequestRenderWindowSize(int width, int height); void Host_RequestFullscreen(bool enable_fullscreen); void Host_SetStartupDebuggingParameters(); void Host_SetWiiMoteConnectionState(int _State); -void Host_ShowJitResults(unsigned int address); void Host_SysMessage(const char *fmt, ...); void Host_UpdateDisasmDialog(); void Host_UpdateMainFrame(); diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 182451beac..0c74b3dbd9 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -309,7 +309,12 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) break; case IDM_JITRESULTS: - m_debugger->ShowJitResults(m_selection); + { + // Propagate back to the parent window and tell it + // to flip to the JIT tab for the current address. + wxCommandEvent jit_event(wxEVT_HOST_COMMAND, IDM_UPDATEJITPANE); + GetEventHandler()->AddPendingEvent(jit_event); + } break; case IDM_FOLLOWBRANCH: diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index fd0c296eb7..ffddd52902 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -49,6 +49,7 @@ #include "DolphinWX/Debugger/CodeView.h" #include "DolphinWX/Debugger/CodeWindow.h" #include "DolphinWX/Debugger/DebuggerUIUtil.h" +#include "DolphinWX/Debugger/JitWindow.h" #include "DolphinWX/Debugger/RegisterWindow.h" extern "C" // Bitmaps @@ -156,6 +157,13 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event) Update(); if (m_BreakpointWindow) m_BreakpointWindow->NotifyUpdate(); break; + + case IDM_UPDATEJITPANE: + // Check if the JIT pane is in the AUI notebook. If not, add it and switch to it. + if (!m_JitWindow) + ToggleJitWindow(true); + m_JitWindow->ViewAddr(codeview->GetSelection()); + break; } } diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index 1ca1ecc911..7966b95c15 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -250,6 +250,7 @@ enum IDM_UPDATESTATUSBAR, IDM_UPDATETITLE, IDM_UPDATEBREAKPOINTS, + IDM_UPDATEJITPANE, IDM_PANIC, IDM_KEYSTATE, IDM_WINDOWSIZEREQUEST, diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 7cd478492c..1f40da2d9a 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -553,16 +553,6 @@ void Host_UpdateDisasmDialog() } } -void Host_ShowJitResults(unsigned int address) -{ - if (main_frame->g_pCodeWindow) - { - if (!main_frame->g_pCodeWindow->m_JitWindow) - main_frame->g_pCodeWindow->ToggleJitWindow(true); - main_frame->g_pCodeWindow->m_JitWindow->ViewAddr(address); - } -} - void Host_UpdateMainFrame() { wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEGUI); diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index eb01219752..e6f3a3bbea 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -55,8 +55,6 @@ std::string g_filename; void Host_NotifyMapLoaded() {} void Host_RefreshDSPDebuggerWindow() {} -void Host_ShowJitResults(unsigned int address){} - Common::Event updateMainFrameEvent; void Host_Message(int Id) { diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index fe0d960a03..9befeb4b59 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -47,8 +47,6 @@ static bool running = true; void Host_NotifyMapLoaded() {} void Host_RefreshDSPDebuggerWindow() {} -void Host_ShowJitResults(unsigned int address){} - static Common::Event updateMainFrameEvent; void Host_Message(int Id) { diff --git a/Source/UnitTests/TestUtils/StubHost.cpp b/Source/UnitTests/TestUtils/StubHost.cpp index f7ec9e54a4..87df14ccce 100644 --- a/Source/UnitTests/TestUtils/StubHost.cpp +++ b/Source/UnitTests/TestUtils/StubHost.cpp @@ -12,7 +12,6 @@ void Host_NotifyMapLoaded() {} void Host_RefreshDSPDebuggerWindow() {} -void Host_ShowJitResults(unsigned int) {} void Host_Message(int) {} void* Host_GetRenderHandle() { return nullptr; } void Host_UpdateTitle(const std::string&) {}