2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CODEWINDOW_H_
|
|
|
|
#define CODEWINDOW_H_
|
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/listbox.h>
|
2009-08-26 09:19:15 +00:00
|
|
|
#include <wx/artprov.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2009-02-06 18:18:20 +00:00
|
|
|
#include "Thread.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
#include "CoreParameter.h"
|
|
|
|
|
2009-08-27 07:33:07 +00:00
|
|
|
// GUI global
|
|
|
|
#include "../../DolphinWX/Src/Globals.h"
|
2009-08-27 10:10:07 +00:00
|
|
|
#include "../../DolphinWX/Src/Frame.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;
|
|
|
|
|
|
|
|
class CCodeWindow
|
2009-08-25 01:50:27 +00:00
|
|
|
: public wxPanel
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-09-07 12:40:43 +00:00
|
|
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
|
|
|
CFrame * parent,
|
2009-09-01 02:41:48 +00:00
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxT("Dolphin-Debugger")
|
|
|
|
);
|
2009-08-25 01:50:27 +00:00
|
|
|
/*
|
2008-12-08 04:46:09 +00:00
|
|
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxString& title = _T("Dolphin-Debugger"),
|
|
|
|
const wxPoint& pos = wxPoint(950, 100),
|
|
|
|
const wxSize& size = wxSize(400, 500),
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
2009-08-25 01:50:27 +00:00
|
|
|
*/
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
~CCodeWindow();
|
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;
|
2009-08-25 01:50:27 +00:00
|
|
|
wxMenuBar * GetMenuBar();
|
2009-08-31 05:56:30 +00:00
|
|
|
wxAuiToolBar * GetToolBar();
|
2009-08-27 15:53:19 +00:00
|
|
|
int GetNootebookAffiliation(wxString);
|
2009-08-27 07:33:07 +00:00
|
|
|
wxBitmap m_Bitmaps[ToolbarDebugBitmapMax];
|
2009-08-25 01:50:27 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
bool UseInterpreter();
|
2009-01-05 02:52:55 +00:00
|
|
|
bool BootToPause();
|
2009-01-07 07:35:12 +00:00
|
|
|
bool AutomaticStart();
|
|
|
|
bool UnlimitedJITCache();
|
2009-01-20 16:52:46 +00:00
|
|
|
bool JITBlockLinking();
|
2008-12-08 04:46:09 +00:00
|
|
|
void JumpToAddress(u32 _Address);
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
void Update();
|
|
|
|
void NotifyMapLoaded();
|
|
|
|
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar * pMenuBar);
|
2009-09-03 06:54:46 +00:00
|
|
|
void CreateMenuView(wxMenuBar * pMenuBar, wxMenu*);
|
|
|
|
void CreateMenuOptions(wxMenuBar * pMenuBar, wxMenu*);
|
|
|
|
void CreateMenuSymbols();
|
2009-08-25 01:50:27 +00:00
|
|
|
void RecreateToolbar(wxAuiToolBar*);
|
|
|
|
void PopulateToolbar(wxAuiToolBar* toolBar);
|
|
|
|
void UpdateButtonStates();
|
2009-08-27 01:30:08 +00:00
|
|
|
void OpenPages();
|
|
|
|
void UpdateManager();
|
2009-08-27 10:10:07 +00:00
|
|
|
|
2009-09-03 05:24:30 +00:00
|
|
|
// Menu bar
|
2009-09-08 16:07:13 +00:00
|
|
|
// -------------------
|
2009-09-03 05:24:30 +00:00
|
|
|
void OnCPUMode(wxCommandEvent& event); // CPU Mode menu
|
|
|
|
void OnJITOff(wxCommandEvent& event);
|
|
|
|
|
2009-08-27 10:10:07 +00:00
|
|
|
void OnToggleWindow(wxCommandEvent& event);
|
2009-08-30 19:44:42 +00:00
|
|
|
void OnToggleCodeWindow(bool,int);
|
2009-08-27 15:53:19 +00:00
|
|
|
void OnToggleRegisterWindow(bool,int);
|
|
|
|
void OnToggleBreakPointWindow(bool,int);
|
|
|
|
void OnToggleMemoryWindow(bool,int);
|
|
|
|
void OnToggleJitWindow(bool,int);
|
2009-09-07 13:33:40 +00:00
|
|
|
void OnToggleDLLWindow(int,bool,int);
|
2009-08-27 10:10:07 +00:00
|
|
|
void OnChangeFont(wxCommandEvent& event);
|
2009-08-25 01:50:27 +00:00
|
|
|
|
2009-09-03 05:24:30 +00:00
|
|
|
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
|
|
|
|
wxMenuBar* pMenuBar;
|
|
|
|
CRegisterWindow* m_RegisterWindow;
|
|
|
|
CBreakPointWindow* m_BreakpointWindow;
|
|
|
|
CMemoryWindow* m_MemoryWindow;
|
|
|
|
CJitWindow* m_JitWindow;
|
|
|
|
|
2009-08-27 15:53:19 +00:00
|
|
|
// Settings
|
|
|
|
bool bAutomaticStart; bool bBootToPause;
|
2009-08-30 10:01:45 +00:00
|
|
|
bool bLogWindow; int iLogWindow;
|
|
|
|
bool bConsoleWindow; int iConsoleWindow;
|
2009-09-06 18:45:22 +00:00
|
|
|
bool bCodeWindow; int iCodeWindow; bool bFloatCodeWindow;
|
|
|
|
bool bRegisterWindow; int iRegisterWindow; bool bFloatRegisterWindow;
|
|
|
|
bool bBreakpointWindow; int iBreakpointWindow; bool bFloatBreakpointWindow;
|
|
|
|
bool bMemoryWindow; int iMemoryWindow; bool bFloatMemoryWindow;
|
|
|
|
bool bJitWindow; int iJitWindow; bool bFloatJitWindow;
|
|
|
|
bool bSoundWindow; int iSoundWindow; bool bFloatSoundWindow;
|
|
|
|
bool bVideoWindow; int iVideoWindow; bool bFloatVideoWindow;
|
2009-08-27 15:53:19 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
enum
|
2009-08-25 09:13:17 +00:00
|
|
|
{
|
2008-12-10 08:57:57 +00:00
|
|
|
// 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);
|
2009-09-03 05:24:30 +00:00
|
|
|
void SingleCPUStep();
|
2008-12-08 04:46:09 +00:00
|
|
|
void OnHostMessage(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void UpdateLists();
|
2009-02-23 21:27:58 +00:00
|
|
|
void UpdateCallstack();
|
2009-01-05 02:52:55 +00:00
|
|
|
void OnStatusBar(wxMenuEvent& event); void OnStatusBar_(wxUpdateUIEvent& event);
|
|
|
|
void DoTip(wxString text);
|
2008-12-08 04:46:09 +00:00
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
2009-01-05 02:52:55 +00:00
|
|
|
|
2009-08-27 07:33:07 +00:00
|
|
|
void InitBitmaps();
|
|
|
|
void CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter);
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
wxMenuItem* jitblocklinking, *jitunlimited, *jitoff;
|
|
|
|
wxMenuItem* jitlsoff, *jitlslxzoff, *jitlslwzoff, *jitlslbzxoff;
|
|
|
|
wxMenuItem* jitlspoff;
|
|
|
|
wxMenuItem* jitlsfoff;
|
|
|
|
wxMenuItem* jitfpoff;
|
|
|
|
wxMenuItem* jitioff;
|
|
|
|
wxMenuItem* jitpoff;
|
|
|
|
wxMenuItem* jitsroff;
|
|
|
|
|
|
|
|
CCodeView* codeview;
|
|
|
|
wxListBox* callstack;
|
|
|
|
wxListBox* symbols;
|
|
|
|
wxListBox* callers;
|
|
|
|
wxListBox* calls;
|
|
|
|
Common::Event sync_event;
|
|
|
|
|
2009-08-27 07:33:07 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*CODEWINDOW_*/
|