Files
dolphin/Source/Core/DolphinWX/Debugger/CodeWindow.h
T

149 lines
3.6 KiB
C++
Raw Normal View History

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
2008-12-08 04:46:09 +00:00
#pragma once
2008-12-08 04:46:09 +00:00
2014-02-22 23:36:30 +01:00
#include <wx/bitmap.h>
#include <wx/defs.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/panel.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/windowid.h>
2008-12-08 04:46:09 +00:00
2014-02-22 23:36:30 +01:00
#include "Common/CommonTypes.h"
#include "Common/Event.h"
2014-02-17 05:18:15 -05:00
#include "DolphinWX/Globals.h"
2009-08-27 07:33:07 +00:00
2009-08-27 10:10:07 +00:00
class CFrame;
2008-12-08 04:46:09 +00:00
class CRegisterWindow;
class CBreakPointWindow;
class CMemoryWindow;
class CJitWindow;
class CCodeView;
2011-01-31 04:36:49 +00:00
class DSPDebuggerLLE;
class GFXDebuggerPanel;
2014-02-22 23:36:30 +01:00
struct SCoreStartupParameter;
class wxAuiToolBar;
class wxListBox;
class wxMenu;
class wxMenuBar;
2008-12-08 04:46:09 +00:00
class CCodeWindow
: public wxPanel
2008-12-08 04:46:09 +00:00
{
public:
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
CFrame * parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
const wxString& name = _("Code")
);
2008-12-08 04:46:09 +00:00
2009-08-27 01:30:08 +00:00
void Load();
void Save();
2008-12-08 04:46:09 +00:00
2009-08-27 10:10:07 +00:00
// Parent interaction
CFrame *Parent;
wxMenuBar * GetMenuBar();
wxAuiToolBar * GetToolBar();
2009-08-27 07:33:07 +00:00
wxBitmap m_Bitmaps[ToolbarDebugBitmapMax];
2008-12-08 04:46:09 +00:00
bool UseInterpreter();
bool BootToPause();
bool AutomaticStart();
2010-07-05 02:05:47 +00:00
bool JITNoBlockCache();
bool JITBlockLinking();
bool JumpToAddress(u32 address);
2008-12-08 04:46:09 +00:00
2014-03-08 01:54:44 +01:00
void Update() override;
void NotifyMapLoaded();
2014-02-16 23:51:41 -05:00
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
2010-07-26 03:46:14 +00:00
void CreateMenuOptions(wxMenu *pMenu);
void CreateMenuSymbols(wxMenuBar *pMenuBar);
void RecreateToolbar(wxAuiToolBar*);
void PopulateToolbar(wxAuiToolBar* toolBar);
void UpdateButtonStates();
2009-08-27 01:30:08 +00:00
void OpenPages();
void UpdateManager();
// Menu bar
// -------------------
void OnCPUMode(wxCommandEvent& event); // CPU Mode menu
void OnJITOff(wxCommandEvent& event);
void ToggleCodeWindow(bool bShow);
void ToggleRegisterWindow(bool bShow);
void ToggleBreakPointWindow(bool bShow);
void ToggleMemoryWindow(bool bShow);
void ToggleJitWindow(bool bShow);
void ToggleSoundWindow(bool bShow);
void ToggleVideoWindow(bool bShow);
2009-08-27 10:10:07 +00:00
void OnChangeFont(wxCommandEvent& event);
void OnCodeStep(wxCommandEvent& event);
void OnAddrBoxChange(wxCommandEvent& event);
void OnSymbolsMenu(wxCommandEvent& event);
void OnJitMenu(wxCommandEvent& event);
void OnProfilerMenu(wxCommandEvent& event);
2009-08-26 09:19:15 +00:00
// Sub dialogs
CRegisterWindow* m_RegisterWindow;
CBreakPointWindow* m_BreakpointWindow;
CMemoryWindow* m_MemoryWindow;
CJitWindow* m_JitWindow;
2011-01-31 04:36:49 +00:00
DSPDebuggerLLE* m_SoundWindow;
GFXDebuggerPanel* m_VideoWindow;
2009-08-26 09:19:15 +00:00
2009-08-27 15:53:19 +00:00
// Settings
bool bAutomaticStart; bool bBootToPause;
2010-07-26 03:46:14 +00:00
bool bShowOnStart[IDM_VIDEOWINDOW - IDM_LOGWINDOW + 1];
int iNbAffiliation[IDM_CODEWINDOW - IDM_LOGWINDOW + 1];
2009-08-27 15:53:19 +00:00
2008-12-08 04:46:09 +00:00
private:
enum
{
// Debugger GUI Objects
ID_CODEVIEW,
ID_CALLSTACKLIST,
ID_CALLERSLIST,
ID_CALLSLIST,
ID_SYMBOLLIST
2008-12-08 04:46:09 +00:00
};
void OnSymbolListChange(wxCommandEvent& event);
void OnSymbolListContextMenu(wxContextMenuEvent& event);
void OnCallstackListChange(wxCommandEvent& event);
void OnCallersListChange(wxCommandEvent& event);
void OnCallsListChange(wxCommandEvent& event);
void OnCodeViewChange(wxCommandEvent &event);
void OnHostMessage(wxCommandEvent& event);
2010-08-08 06:00:22 +00:00
// Debugger functions
void SingleStep();
void StepOver();
void ToggleBreakpoint();
void UpdateLists();
void UpdateCallstack();
2009-08-27 07:33:07 +00:00
void InitBitmaps();
2008-12-08 04:46:09 +00:00
CCodeView* codeview;
wxListBox* callstack;
wxListBox* symbols;
wxListBox* callers;
wxListBox* calls;
Common::Event sync_event;
DECLARE_EVENT_TABLE()
2008-12-08 04:46:09 +00:00
};