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,
|
2010-07-27 02:39:12 +00:00
|
|
|
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
|
2011-01-05 04:35:46 +00:00
|
|
|
const wxString& name = _("Code")
|
2009-09-01 02:41:48 +00:00
|
|
|
);
|
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;
|
2009-08-25 01:50:27 +00:00
|
|
|
wxMenuBar * GetMenuBar();
|
2010-07-23 03:53:18 +00:00
|
|
|
wxAuiToolBar * GetToolBar();
|
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();
|
2010-07-05 02:05:47 +00:00
|
|
|
bool JITNoBlockCache();
|
2009-01-20 16:52:46 +00:00
|
|
|
bool JITBlockLinking();
|
2010-07-23 03:53:18 +00:00
|
|
|
void JumpToAddress(u32 _Address);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
void Update();
|
|
|
|
void NotifyMapLoaded();
|
2010-07-23 03:53:18 +00:00
|
|
|
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
2010-07-26 03:46:14 +00:00
|
|
|
wxMenuBar *pMenuBar);
|
|
|
|
void CreateMenuOptions(wxMenu *pMenu);
|
|
|
|
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
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();
|
2010-07-23 03:53:18 +00:00
|
|
|
|
2009-09-03 05:24:30 +00:00
|
|
|
// Menu bar
|
2009-09-08 16:07:13 +00:00
|
|
|
// -------------------
|
2010-07-23 03:53:18 +00:00
|
|
|
void OnCPUMode(wxCommandEvent& event); // CPU Mode menu
|
2009-09-03 05:24:30 +00:00
|
|
|
void OnJITOff(wxCommandEvent& event);
|
|
|
|
|
2010-07-19 02:09:34 +00:00
|
|
|
void ToggleCodeWindow(bool bShow);
|
|
|
|
void ToggleRegisterWindow(bool bShow);
|
|
|
|
void ToggleBreakPointWindow(bool bShow);
|
|
|
|
void ToggleMemoryWindow(bool bShow);
|
|
|
|
void ToggleJitWindow(bool bShow);
|
2011-01-28 18:39:30 +00:00
|
|
|
void ToggleSoundWindow(bool bShow);
|
2010-07-19 02:09:34 +00:00
|
|
|
void ToggleDLLWindow(int Id, bool bShow);
|
|
|
|
|
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
|
|
|
|
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;
|
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
|
2010-07-23 03:53:18 +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);
|
|
|
|
void OnHostMessage(wxCommandEvent& event);
|
|
|
|
|
2010-08-08 06:00:22 +00:00
|
|
|
// Debugger functions
|
|
|
|
void SingleStep();
|
|
|
|
void StepOver();
|
|
|
|
void ToggleBreakpoint();
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
void UpdateLists();
|
2009-02-23 21:27:58 +00:00
|
|
|
void UpdateCallstack();
|
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();
|
2010-07-23 03:53:18 +00:00
|
|
|
void CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter);
|
2009-08-27 07:33:07 +00:00
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
CCodeView* codeview;
|
|
|
|
wxListBox* callstack;
|
|
|
|
wxListBox* symbols;
|
|
|
|
wxListBox* callers;
|
|
|
|
wxListBox* calls;
|
|
|
|
Common::Event sync_event;
|
|
|
|
|
2010-07-23 03:53:18 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
|
2010-07-23 03:53:18 +00:00
|
|
|
#endif // CODEWINDOW_H_
|