dolphin/Source/Core/DolphinWX/Debugger/JitWindow.h
Ryan Houdek d0ae3f7d24 Break out the disassembler code from the WXWidgets UI.
This cleans up some of the code between core and UI for disassembling and dumping code blocks.
Should help the QT UI in bringing up its debug UI since it won't have to deal with this garbage now.
2015-05-31 18:16:59 -05:00

58 lines
1.3 KiB
C++

// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include <vector>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include "Common/CommonTypes.h"
#include "UICommon/Disassembler.h"
class wxButton;
class wxListBox;
class wxTextCtrl;
class JitBlockList : public wxListCtrl
{
std::vector<int> block_ranking;
public:
JitBlockList(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
void Init();
void Update() override;
};
class CJitWindow : public wxPanel
{
public:
CJitWindow(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
const wxString& name = _("JIT block viewer"));
void ViewAddr(u32 em_address);
void Update() override;
private:
void OnRefresh(wxCommandEvent& /*event*/);
void Compare(u32 em_address);
JitBlockList* block_list;
std::unique_ptr<HostDisassembler> m_disassembler;
wxButton* button_refresh;
wxTextCtrl* ppc_box;
wxTextCtrl* x86_box;
wxListBox* top_instructions;
void OnSymbolListChange(wxCommandEvent& event);
void OnCallstackListChange(wxCommandEvent& event);
void OnAddrBoxChange(wxCommandEvent& event);
void OnHostMessage(wxCommandEvent& event);
};