2013-04-17 21:43:35 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// 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-17 03:18:15 -07:00
|
|
|
#include <wx/artprov.h>
|
2008-12-07 21:46:09 -07:00
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/listbox.h>
|
2014-02-17 03:18:15 -07:00
|
|
|
#include <wx/textctrl.h>
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Common/Thread.h"
|
|
|
|
#include "Core/CoreParameter.h"
|
|
|
|
#include "DolphinWX/Frame.h"
|
|
|
|
#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;
|
|
|
|
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;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
class CCodeWindow
|
2009-08-24 19:50:27 -06:00
|
|
|
: public wxPanel
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-09-07 06:40:43 -06:00
|
|
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
|
|
|
CFrame * parent,
|
2009-08-31 20:41:48 -06:00
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2010-07-26 20:39:12 -06:00
|
|
|
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
|
2011-01-04 21:35:46 -07:00
|
|
|
const wxString& name = _("Code")
|
2009-08-31 20:41:48 -06:00
|
|
|
);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-08-26 19:30:08 -06:00
|
|
|
void Load();
|
|
|
|
void Save();
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-08-27 04:10:07 -06:00
|
|
|
// Parent interaction
|
|
|
|
CFrame *Parent;
|
2009-08-24 19:50:27 -06:00
|
|
|
wxMenuBar * GetMenuBar();
|
2010-07-22 21:53:18 -06:00
|
|
|
wxAuiToolBar * GetToolBar();
|
2009-08-27 01:33:07 -06:00
|
|
|
wxBitmap m_Bitmaps[ToolbarDebugBitmapMax];
|
2009-08-24 19:50:27 -06:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
bool UseInterpreter();
|
2009-01-04 19:52:55 -07:00
|
|
|
bool BootToPause();
|
2009-01-07 00:35:12 -07:00
|
|
|
bool AutomaticStart();
|
2010-07-04 20:05:47 -06:00
|
|
|
bool JITNoBlockCache();
|
2009-01-20 09:52:46 -07:00
|
|
|
bool JITBlockLinking();
|
2010-07-22 21:53:18 -06:00
|
|
|
void JumpToAddress(u32 _Address);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-08-24 19:50:27 -06:00
|
|
|
void Update();
|
|
|
|
void NotifyMapLoaded();
|
2014-02-16 21:51:41 -07:00
|
|
|
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
2010-07-25 21:46:14 -06:00
|
|
|
void CreateMenuOptions(wxMenu *pMenu);
|
|
|
|
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
2009-08-24 19:50:27 -06:00
|
|
|
void RecreateToolbar(wxAuiToolBar*);
|
|
|
|
void PopulateToolbar(wxAuiToolBar* toolBar);
|
|
|
|
void UpdateButtonStates();
|
2009-08-26 19:30:08 -06:00
|
|
|
void OpenPages();
|
|
|
|
void UpdateManager();
|
2010-07-22 21:53:18 -06:00
|
|
|
|
2009-09-02 23:24:30 -06:00
|
|
|
// Menu bar
|
2009-09-08 10:07:13 -06:00
|
|
|
// -------------------
|
2010-07-22 21:53:18 -06:00
|
|
|
void OnCPUMode(wxCommandEvent& event); // CPU Mode menu
|
2009-09-02 23:24:30 -06:00
|
|
|
void OnJITOff(wxCommandEvent& event);
|
|
|
|
|
2010-07-18 20:09:34 -06:00
|
|
|
void ToggleCodeWindow(bool bShow);
|
|
|
|
void ToggleRegisterWindow(bool bShow);
|
|
|
|
void ToggleBreakPointWindow(bool bShow);
|
|
|
|
void ToggleMemoryWindow(bool bShow);
|
|
|
|
void ToggleJitWindow(bool bShow);
|
2011-01-28 11:39:30 -07:00
|
|
|
void ToggleSoundWindow(bool bShow);
|
2011-01-30 19:39:25 -07:00
|
|
|
void ToggleVideoWindow(bool bShow);
|
2010-07-18 20:09:34 -06:00
|
|
|
|
2009-08-27 04:10:07 -06:00
|
|
|
void OnChangeFont(wxCommandEvent& event);
|
2009-08-24 19:50:27 -06:00
|
|
|
|
2009-09-02 23:24:30 -06:00
|
|
|
void OnCodeStep(wxCommandEvent& event);
|
|
|
|
void OnAddrBoxChange(wxCommandEvent& event);
|
|
|
|
void OnSymbolsMenu(wxCommandEvent& event);
|
|
|
|
void OnJitMenu(wxCommandEvent& event);
|
|
|
|
void OnProfilerMenu(wxCommandEvent& event);
|
|
|
|
|
2009-08-26 03:19:15 -06:00
|
|
|
// Sub dialogs
|
|
|
|
CRegisterWindow* m_RegisterWindow;
|
|
|
|
CBreakPointWindow* m_BreakpointWindow;
|
|
|
|
CMemoryWindow* m_MemoryWindow;
|
|
|
|
CJitWindow* m_JitWindow;
|
2011-01-30 21:36:49 -07:00
|
|
|
DSPDebuggerLLE* m_SoundWindow;
|
2011-01-30 19:39:25 -07:00
|
|
|
GFXDebuggerPanel* m_VideoWindow;
|
2009-08-26 03:19:15 -06:00
|
|
|
|
2009-08-27 09:53:19 -06:00
|
|
|
// Settings
|
|
|
|
bool bAutomaticStart; bool bBootToPause;
|
2010-07-25 21:46:14 -06:00
|
|
|
bool bShowOnStart[IDM_VIDEOWINDOW - IDM_LOGWINDOW + 1];
|
|
|
|
int iNbAffiliation[IDM_CODEWINDOW - IDM_LOGWINDOW + 1];
|
2009-08-27 09:53:19 -06:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
private:
|
|
|
|
|
|
|
|
enum
|
2010-07-22 21:53:18 -06:00
|
|
|
{
|
2008-12-10 01:57:57 -07:00
|
|
|
// Debugger GUI Objects
|
|
|
|
ID_CODEVIEW,
|
|
|
|
ID_CALLSTACKLIST,
|
|
|
|
ID_CALLERSLIST,
|
|
|
|
ID_CALLSLIST,
|
|
|
|
ID_SYMBOLLIST
|
2008-12-07 21:46:09 -07: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 00:00:22 -06:00
|
|
|
// Debugger functions
|
|
|
|
void SingleStep();
|
|
|
|
void StepOver();
|
|
|
|
void ToggleBreakpoint();
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
void UpdateLists();
|
2009-02-23 14:27:58 -07:00
|
|
|
void UpdateCallstack();
|
2009-01-04 19:52:55 -07:00
|
|
|
|
2009-08-27 01:33:07 -06:00
|
|
|
void InitBitmaps();
|
|
|
|
|
2009-08-24 19:50:27 -06:00
|
|
|
CCodeView* codeview;
|
|
|
|
wxListBox* callstack;
|
|
|
|
wxListBox* symbols;
|
|
|
|
wxListBox* callers;
|
|
|
|
wxListBox* calls;
|
|
|
|
Common::Event sync_event;
|
|
|
|
|
2010-07-22 21:53:18 -06:00
|
|
|
DECLARE_EVENT_TABLE()
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|