Core: Kill off Host_ShowJitResults

Another host function that can be killed off by simple wx event handling
This commit is contained in:
Lioncash 2014-08-15 15:10:41 -04:00
parent d5d5580424
commit cf46ac7dc9
11 changed files with 15 additions and 24 deletions

View File

@ -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;
};

View File

@ -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()
{

View File

@ -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;
};

View File

@ -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();

View File

@ -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:

View File

@ -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;
}
}

View File

@ -250,6 +250,7 @@ enum
IDM_UPDATESTATUSBAR,
IDM_UPDATETITLE,
IDM_UPDATEBREAKPOINTS,
IDM_UPDATEJITPANE,
IDM_PANIC,
IDM_KEYSTATE,
IDM_WINDOWSIZEREQUEST,

View File

@ -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);

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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&) {}