2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:43:35 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <wx/bitmap.h>
|
|
|
|
#include <wx/panel.h>
|
2015-02-24 08:56:01 -07:00
|
|
|
#include <wx/aui/framemanager.h>
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-04-13 17:15:23 -06:00
|
|
|
#include "Common/Event.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DolphinWX/Globals.h"
|
2009-08-27 01:33:07 -06:00
|
|
|
|
2009-08-27 04:10:07 -06:00
|
|
|
class CFrame;
|
2008-12-07 21:46:09 -07:00
|
|
|
class CRegisterWindow;
|
2014-10-19 04:45:40 -06:00
|
|
|
class CWatchWindow;
|
2008-12-07 21:46:09 -07:00
|
|
|
class CBreakPointWindow;
|
|
|
|
class CMemoryWindow;
|
|
|
|
class CJitWindow;
|
|
|
|
class CCodeView;
|
2011-01-30 21:36:49 -07:00
|
|
|
class DSPDebuggerLLE;
|
2011-01-30 19:39:25 -07:00
|
|
|
class GFXDebuggerPanel;
|
2015-06-12 05:56:53 -06:00
|
|
|
struct SConfig;
|
2014-02-22 15:36:30 -07:00
|
|
|
|
2015-02-24 22:06:45 -07:00
|
|
|
class wxAuiToolBar;
|
2014-02-22 15:36:30 -07:00
|
|
|
class wxListBox;
|
|
|
|
class wxMenu;
|
|
|
|
class wxMenuBar;
|
2015-02-24 22:06:45 -07:00
|
|
|
class wxToolBar;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-10-18 20:55:23 -06:00
|
|
|
class CCodeWindow : public wxPanel
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
2014-10-18 20:55:23 -06:00
|
|
|
public:
|
2015-06-12 05:56:53 -06:00
|
|
|
CCodeWindow(const SConfig& _LocalCoreStartupParameter,
|
2014-10-23 19:57:17 -06:00
|
|
|
CFrame * parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
|
2014-10-18 20:55:23 -06:00
|
|
|
const wxString& name = _("Code"));
|
2015-02-24 08:56:01 -07:00
|
|
|
~CCodeWindow();
|
2014-10-18 20:55:23 -06:00
|
|
|
|
2014-10-23 19:57:17 -06:00
|
|
|
void Load();
|
|
|
|
void Save();
|
|
|
|
|
|
|
|
// Parent interaction
|
|
|
|
CFrame *Parent;
|
|
|
|
wxMenuBar * GetMenuBar();
|
|
|
|
wxToolBar * GetToolBar();
|
2014-12-20 18:36:26 -07:00
|
|
|
wxBitmap m_Bitmaps[Toolbar_Debug_Bitmap_Max];
|
2014-10-23 19:57:17 -06:00
|
|
|
|
|
|
|
bool UseInterpreter();
|
|
|
|
bool BootToPause();
|
|
|
|
bool AutomaticStart();
|
|
|
|
bool JITNoBlockCache();
|
|
|
|
bool JITNoBlockLinking();
|
|
|
|
bool JumpToAddress(u32 address);
|
|
|
|
|
|
|
|
void Update() override;
|
|
|
|
void NotifyMapLoaded();
|
2015-06-12 05:56:53 -06:00
|
|
|
void CreateMenu(const SConfig& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
2014-10-23 19:57:17 -06:00
|
|
|
void CreateMenuOptions(wxMenu *pMenu);
|
|
|
|
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
|
|
|
void PopulateToolbar(wxToolBar* toolBar);
|
|
|
|
void UpdateButtonStates();
|
|
|
|
void OpenPages();
|
|
|
|
|
|
|
|
// Menu bar
|
|
|
|
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);
|
|
|
|
|
|
|
|
// 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-20 18:36:26 -07:00
|
|
|
bool bShowOnStart[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW + 1];
|
|
|
|
int iNbAffiliation[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1];
|
2014-10-18 20:55:23 -06:00
|
|
|
|
|
|
|
private:
|
2015-04-27 18:36:09 -06:00
|
|
|
void OnCPUMode(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnChangeFont(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnCodeStep(wxCommandEvent& event);
|
|
|
|
void OnAddrBoxChange(wxCommandEvent& event);
|
|
|
|
void OnSymbolsMenu(wxCommandEvent& event);
|
|
|
|
void OnJitMenu(wxCommandEvent& event);
|
|
|
|
void OnProfilerMenu(wxCommandEvent& event);
|
|
|
|
|
2014-10-23 19:57:17 -06: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 08:56:01 -07:00
|
|
|
|
2015-02-24 22:06:45 -07:00
|
|
|
wxAuiManager m_aui_manager;
|
|
|
|
wxAuiToolBar* m_aui_toolbar;
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|