2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-22 22:36:30 +00: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>
|
2015-02-24 15:56:01 +00:00
|
|
|
#include <wx/aui/framemanager.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-04-13 23:15:23 +00:00
|
|
|
#include "Common/Event.h"
|
2014-02-17 10:18:15 +00: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;
|
2014-10-19 10:45:40 +00:00
|
|
|
class CWatchWindow;
|
2008-12-08 04:46:09 +00:00
|
|
|
class CBreakPointWindow;
|
|
|
|
class CMemoryWindow;
|
|
|
|
class CJitWindow;
|
|
|
|
class CCodeView;
|
2011-01-31 04:36:49 +00:00
|
|
|
class DSPDebuggerLLE;
|
2011-01-31 02:39:25 +00:00
|
|
|
class GFXDebuggerPanel;
|
2014-02-22 22:36:30 +00:00
|
|
|
struct SCoreStartupParameter;
|
|
|
|
|
2015-02-25 05:06:45 +00:00
|
|
|
class wxAuiToolBar;
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxListBox;
|
|
|
|
class wxMenu;
|
|
|
|
class wxMenuBar;
|
2015-02-25 05:06:45 +00:00
|
|
|
class wxToolBar;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-10-19 02:55:23 +00:00
|
|
|
class CCodeWindow : public wxPanel
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2014-10-19 02:55:23 +00:00
|
|
|
public:
|
2014-10-24 01:57:17 +00:00
|
|
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
|
|
|
CFrame * parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
|
2014-10-19 02:55:23 +00:00
|
|
|
const wxString& name = _("Code"));
|
2015-02-24 15:56:01 +00:00
|
|
|
~CCodeWindow();
|
2014-10-19 02:55:23 +00:00
|
|
|
|
2014-10-24 01:57:17 +00:00
|
|
|
void Load();
|
|
|
|
void Save();
|
|
|
|
|
|
|
|
// Parent interaction
|
|
|
|
CFrame *Parent;
|
|
|
|
wxMenuBar * GetMenuBar();
|
|
|
|
wxToolBar * GetToolBar();
|
2014-12-21 01:36:26 +00:00
|
|
|
wxBitmap m_Bitmaps[Toolbar_Debug_Bitmap_Max];
|
2014-10-24 01:57:17 +00:00
|
|
|
|
|
|
|
bool UseInterpreter();
|
|
|
|
bool BootToPause();
|
|
|
|
bool AutomaticStart();
|
|
|
|
bool JITNoBlockCache();
|
|
|
|
bool JITNoBlockLinking();
|
|
|
|
bool JumpToAddress(u32 address);
|
|
|
|
|
|
|
|
void Update() override;
|
|
|
|
void NotifyMapLoaded();
|
|
|
|
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
|
|
|
void CreateMenuOptions(wxMenu *pMenu);
|
|
|
|
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
|
|
|
void RecreateToolbar(wxToolBar*);
|
|
|
|
void PopulateToolbar(wxToolBar* toolBar);
|
|
|
|
void UpdateButtonStates();
|
|
|
|
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 ToggleWatchWindow(bool bShow);
|
|
|
|
void ToggleBreakPointWindow(bool bShow);
|
|
|
|
void ToggleMemoryWindow(bool bShow);
|
|
|
|
void ToggleJitWindow(bool bShow);
|
|
|
|
void ToggleSoundWindow(bool bShow);
|
|
|
|
void ToggleVideoWindow(bool bShow);
|
|
|
|
|
|
|
|
void OnChangeFont(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnCodeStep(wxCommandEvent& event);
|
|
|
|
void OnAddrBoxChange(wxCommandEvent& event);
|
|
|
|
void OnSymbolsMenu(wxCommandEvent& event);
|
|
|
|
void OnJitMenu(wxCommandEvent& event);
|
|
|
|
void OnProfilerMenu(wxCommandEvent& event);
|
|
|
|
|
|
|
|
// Sub dialogs
|
|
|
|
CRegisterWindow* m_RegisterWindow;
|
|
|
|
CWatchWindow* m_WatchWindow;
|
|
|
|
CBreakPointWindow* m_BreakpointWindow;
|
|
|
|
CMemoryWindow* m_MemoryWindow;
|
|
|
|
CJitWindow* m_JitWindow;
|
|
|
|
DSPDebuggerLLE* m_SoundWindow;
|
|
|
|
GFXDebuggerPanel* m_VideoWindow;
|
|
|
|
|
|
|
|
// Settings
|
|
|
|
bool bAutomaticStart; bool bBootToPause;
|
2014-12-21 01:36:26 +00:00
|
|
|
bool bShowOnStart[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW + 1];
|
|
|
|
int iNbAffiliation[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1];
|
2014-10-19 02:55:23 +00:00
|
|
|
|
|
|
|
private:
|
2014-10-24 01:57:17 +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);
|
|
|
|
|
|
|
|
// Debugger functions
|
|
|
|
void SingleStep();
|
|
|
|
void StepOver();
|
|
|
|
void StepOut();
|
|
|
|
void ToggleBreakpoint();
|
|
|
|
|
|
|
|
void UpdateLists();
|
|
|
|
void UpdateCallstack();
|
|
|
|
|
|
|
|
void InitBitmaps();
|
|
|
|
|
|
|
|
CCodeView* codeview;
|
|
|
|
wxListBox* callstack;
|
|
|
|
wxListBox* symbols;
|
|
|
|
wxListBox* callers;
|
|
|
|
wxListBox* calls;
|
|
|
|
Common::Event sync_event;
|
2015-02-24 15:56:01 +00:00
|
|
|
|
2015-02-25 05:06:45 +00:00
|
|
|
wxAuiManager m_aui_manager;
|
|
|
|
wxAuiToolBar* m_aui_toolbar;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|