2009-07-28 21:32:10 +00:00
|
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 05:30:24 +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/
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
|
|
|
|
|
// Include
|
2008-12-18 00:37:24 +00:00
|
|
|
|
#include "Common.h"
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
#include <wx/button.h>
|
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
|
#include <wx/textdlg.h>
|
|
|
|
|
#include <wx/listctrl.h>
|
|
|
|
|
#include <wx/thread.h>
|
|
|
|
|
#include <wx/mstream.h>
|
2008-12-09 05:37:15 +00:00
|
|
|
|
#include <wx/tipwin.h>
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
#include "Host.h"
|
|
|
|
|
|
|
|
|
|
#include "Debugger.h"
|
|
|
|
|
|
|
|
|
|
#include "RegisterWindow.h"
|
|
|
|
|
#include "BreakpointWindow.h"
|
|
|
|
|
#include "MemoryWindow.h"
|
|
|
|
|
#include "JitWindow.h"
|
|
|
|
|
|
|
|
|
|
#include "CodeWindow.h"
|
|
|
|
|
#include "CodeView.h"
|
|
|
|
|
|
|
|
|
|
#include "FileUtil.h"
|
|
|
|
|
#include "Core.h"
|
2009-06-17 19:50:59 +00:00
|
|
|
|
#include "HW/Memmap.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
#include "HLE/HLE.h"
|
|
|
|
|
#include "Boot/Boot.h"
|
|
|
|
|
#include "LogManager.h"
|
|
|
|
|
#include "HW/CPU.h"
|
|
|
|
|
#include "PowerPC/PowerPC.h"
|
|
|
|
|
#include "Debugger/PPCDebugInterface.h"
|
|
|
|
|
#include "Debugger/Debugger_SymbolMap.h"
|
|
|
|
|
#include "PowerPC/PPCAnalyst.h"
|
|
|
|
|
#include "PowerPC/Profiler.h"
|
2009-06-21 08:39:21 +00:00
|
|
|
|
#include "PowerPC/PPCSymbolDB.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
#include "PowerPC/SignatureDB.h"
|
|
|
|
|
#include "PowerPC/PPCTables.h"
|
|
|
|
|
#include "PowerPC/Jit64/Jit.h"
|
2009-02-23 20:29:55 +00:00
|
|
|
|
#include "PowerPC/JitCommon/JitCache.h" // for ClearCache()
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-09 12:46:04 +00:00
|
|
|
|
#include "PluginManager.h"
|
2009-01-17 23:41:21 +00:00
|
|
|
|
#include "ConfigManager.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
extern "C" // Bitmaps
|
|
|
|
|
{
|
2008-12-08 05:30:24 +00:00
|
|
|
|
#include "../resources/toolbar_play.c"
|
|
|
|
|
#include "../resources/toolbar_pause.c"
|
|
|
|
|
#include "../resources/toolbar_add_memorycheck.c"
|
|
|
|
|
#include "../resources/toolbar_delete.c"
|
|
|
|
|
#include "../resources/toolbar_add_breakpoint.c"
|
|
|
|
|
}
|
2009-01-05 02:52:55 +00:00
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
class CPluginInfo;
|
|
|
|
|
class CPluginManager;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
|
|
|
|
|
2009-08-27 10:10:07 +00:00
|
|
|
|
/*
|
2009-01-05 02:52:55 +00:00
|
|
|
|
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
|
|
|
|
inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length)
|
|
|
|
|
{
|
|
|
|
|
wxMemoryInputStream is(data, length);
|
|
|
|
|
return(wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1));
|
|
|
|
|
}
|
2009-08-27 10:10:07 +00:00
|
|
|
|
*/
|
2009-01-05 02:52:55 +00:00
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
|
2008-12-10 08:57:57 +00:00
|
|
|
|
EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
|
|
|
|
EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
|
|
|
|
EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
|
|
|
|
|
EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange)
|
2008-12-09 05:37:15 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
|
|
|
|
|
|
|
|
|
|
EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
2009-01-05 02:52:55 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// Menu bar
|
|
|
|
|
EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnCPUMode) // CPU Mode
|
|
|
|
|
EVT_MENU(IDM_AUTOMATICSTART, CCodeWindow::OnCPUMode)
|
2009-08-25 09:13:17 +00:00
|
|
|
|
EVT_MENU(IDM_BOOTTOPAUSE, CCodeWindow::OnCPUMode)
|
|
|
|
|
|
|
|
|
|
EVT_MENU(IDM_JITUNLIMITED, CCodeWindow::OnCPUMode)
|
2009-01-07 07:35:12 +00:00
|
|
|
|
EVT_MENU(IDM_JITOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSLXZOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSLWZOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSLBZXOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSFOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITLSPOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITFPOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITIOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
|
|
|
|
|
2009-08-26 09:19:15 +00:00
|
|
|
|
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleWindow) //views
|
|
|
|
|
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleWindow)
|
|
|
|
|
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleWindow)
|
|
|
|
|
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleWindow)
|
|
|
|
|
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleWindow)
|
|
|
|
|
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleWindow)
|
2009-02-06 18:18:20 +00:00
|
|
|
|
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
|
|
|
|
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
|
|
|
|
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
|
|
|
|
EVT_MENU(IDM_SAVEMAPFILE, CCodeWindow::OnSymbolsMenu)
|
2009-01-15 06:48:15 +00:00
|
|
|
|
EVT_MENU(IDM_SAVEMAPFILEWITHCODES, CCodeWindow::OnSymbolsMenu)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
EVT_MENU(IDM_CREATESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
|
|
|
|
EVT_MENU(IDM_USESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
|
|
|
|
EVT_MENU(IDM_PATCHHLEFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
2009-08-25 01:50:27 +00:00
|
|
|
|
EVT_MENU(IDM_RENAME_SYMBOLS, CCodeWindow::OnSymbolsMenu)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu)
|
|
|
|
|
EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu)
|
2009-06-17 19:50:59 +00:00
|
|
|
|
EVT_MENU(IDM_SEARCHINSTRUCTION, CCodeWindow::OnJitMenu)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
EVT_MENU(IDM_PROFILEBLOCKS, CCodeWindow::OnProfilerMenu)
|
|
|
|
|
EVT_MENU(IDM_WRITEPROFILE, CCodeWindow::OnProfilerMenu)
|
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// Toolbar
|
2008-12-08 05:30:24 +00:00
|
|
|
|
EVT_MENU(IDM_DEBUG_GO, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_MENU(IDM_STEP, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_MENU(IDM_STEPOVER, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_MENU(IDM_SKIP, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_MENU(IDM_SETPC, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_MENU(IDM_GOTOPC, CCodeWindow::OnCodeStep)
|
|
|
|
|
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
|
2009-01-15 06:48:15 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
// Menu tooltips
|
|
|
|
|
//EVT_MENU_HIGHLIGHT_ALL( CCodeWindow::OnStatusBar)
|
|
|
|
|
/* Do this to to avoid that the ToolTips get stuck when only the wxMenu is changed
|
|
|
|
|
and not any wxMenuItem that is required by EVT_MENU_HIGHLIGHT_ALL */
|
|
|
|
|
//EVT_UPDATE_UI(wxID_ANY, CCodeWindow::OnStatusBar_)
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Class, input event handler and host message handler
|
2009-08-27 10:10:07 +00:00
|
|
|
|
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *ParentObject, wxWindow* Parent,
|
|
|
|
|
wxWindowID Id)
|
|
|
|
|
: wxPanel(Parent, Id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxNO_BORDER, wxT("Dolphin-Debugger"))
|
|
|
|
|
, Parent(ParentObject)
|
2009-01-05 02:52:55 +00:00
|
|
|
|
/* Remember to initialize potential new controls with NULL there, otherwise m_dialog = true and
|
|
|
|
|
things may crash */
|
2008-12-08 05:30:24 +00:00
|
|
|
|
, m_RegisterWindow(NULL)
|
|
|
|
|
, m_BreakpointWindow(NULL)
|
|
|
|
|
, m_MemoryWindow(NULL)
|
|
|
|
|
, m_JitWindow(NULL)
|
|
|
|
|
{
|
|
|
|
|
// Load ini settings
|
2009-08-27 01:30:08 +00:00
|
|
|
|
this->Load();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
InitBitmaps();
|
|
|
|
|
|
|
|
|
|
CreateGUIControls(_LocalCoreStartupParameter);
|
|
|
|
|
// Create the toolbar
|
2009-08-25 01:50:27 +00:00
|
|
|
|
//RecreateToolbar();
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Update bitmap buttons
|
2009-08-25 01:50:27 +00:00
|
|
|
|
//UpdateButtonStates();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Connect keyboard
|
2008-12-08 05:30:24 +00:00
|
|
|
|
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN,
|
|
|
|
|
wxKeyEventHandler(CCodeWindow::OnKeyDown),
|
|
|
|
|
(wxObject*)0, this);
|
|
|
|
|
}
|
|
|
|
|
CCodeWindow::~CCodeWindow()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
2009-08-27 01:30:08 +00:00
|
|
|
|
// Redirect old wxFrame calls
|
2009-08-27 10:10:07 +00:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-08-25 01:50:27 +00:00
|
|
|
|
wxMenuBar *CCodeWindow::GetMenuBar()
|
|
|
|
|
{
|
2009-08-27 10:10:07 +00:00
|
|
|
|
return Parent->GetMenuBar();
|
2009-08-25 01:50:27 +00:00
|
|
|
|
}
|
2009-08-25 10:58:13 +00:00
|
|
|
|
wxAuiToolBar *CCodeWindow::GetToolBar()
|
2009-08-25 01:50:27 +00:00
|
|
|
|
{
|
2009-08-27 10:10:07 +00:00
|
|
|
|
return Parent->m_ToolBarDebug;
|
2009-08-26 09:19:15 +00:00
|
|
|
|
}
|
2009-08-25 01:50:27 +00:00
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
void CCodeWindow::OnKeyDown(wxKeyEvent& event)
|
|
|
|
|
{
|
2009-08-27 10:10:07 +00:00
|
|
|
|
if ((event.GetKeyCode() == WXK_SPACE) && Parent->IsActive())
|
2009-01-15 06:48:15 +00:00
|
|
|
|
SingleCPUStep();
|
2009-01-05 02:52:55 +00:00
|
|
|
|
else
|
|
|
|
|
event.Skip();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
switch (event.GetId())
|
|
|
|
|
{
|
|
|
|
|
case IDM_NOTIFYMAPLOADED:
|
|
|
|
|
NotifyMapLoaded();
|
|
|
|
|
break;
|
2009-08-27 01:30:08 +00:00
|
|
|
|
/*
|
|
|
|
|
case IDM_UPDATELOGDISPLAY:
|
|
|
|
|
if (m_LogWindow) m_LogWindow->NotifyUpdate();
|
|
|
|
|
break;
|
|
|
|
|
*/
|
2009-01-05 02:52:55 +00:00
|
|
|
|
case IDM_UPDATEDISASMDIALOG:
|
|
|
|
|
Update();
|
2009-08-27 01:30:08 +00:00
|
|
|
|
if (m_RegisterWindow) m_RegisterWindow->NotifyUpdate();
|
2009-01-05 02:52:55 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_UPDATEBREAKPOINTS:
|
|
|
|
|
Update();
|
2009-08-27 01:30:08 +00:00
|
|
|
|
if (m_BreakpointWindow) m_BreakpointWindow->NotifyUpdate();
|
2009-01-05 02:52:55 +00:00
|
|
|
|
break;
|
|
|
|
|
case IDM_UPDATESTATUSBAR:
|
|
|
|
|
//if (main_frame->m_pStatusBar != NULL)
|
|
|
|
|
{
|
|
|
|
|
//this->GetParent()->m_p
|
|
|
|
|
//this->GetParent()->
|
|
|
|
|
//parent->m_pStatusBar->SetStatusText(wxT("Hi"), 0);
|
|
|
|
|
//m_pStatusBar->SetStatusText(event.GetString(), event.GetInt());
|
|
|
|
|
//this->GetParent()->m_pStatusBar->SetStatusText(event.GetString(), event.GetInt());
|
|
|
|
|
//main_frame->m_pStatusBar->SetStatusText(event.GetString(), event.GetInt());
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Load these settings before CreateGUIControls()
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-08-27 01:30:08 +00:00
|
|
|
|
void CCodeWindow::Load()
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-08-27 01:30:08 +00:00
|
|
|
|
IniFile ini;
|
|
|
|
|
ini.Load(DEBUGGER_CONFIG_FILE);
|
|
|
|
|
|
2009-02-06 18:18:20 +00:00
|
|
|
|
// The font to override DebuggerFont with
|
|
|
|
|
std::string fontDesc;
|
|
|
|
|
ini.Get("ShowOnStart", "DebuggerFont", &fontDesc);
|
|
|
|
|
if (!fontDesc.empty())
|
2009-08-13 05:11:25 +00:00
|
|
|
|
DebuggerFont.SetNativeFontInfoUserDesc(wxString::FromAscii(fontDesc.c_str()));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
// Decide what windows to use
|
2009-08-27 15:53:19 +00:00
|
|
|
|
ini.Get("ShowOnStart", "Code", &bCodeWindow, true);
|
|
|
|
|
ini.Get("ShowOnStart", "Registers", &bRegisterWindow, false);
|
|
|
|
|
ini.Get("ShowOnStart", "Breakpoints", &bBreakpointWindow, false);
|
|
|
|
|
ini.Get("ShowOnStart", "Memory", &bMemoryWindow, false);
|
|
|
|
|
ini.Get("ShowOnStart", "JIT", &bJitWindow, false);
|
|
|
|
|
ini.Get("ShowOnStart", "Sound", &bSoundWindow, false);
|
|
|
|
|
ini.Get("ShowOnStart", "Video", &bVideoWindow, false);
|
|
|
|
|
|
|
|
|
|
ini.Get("Notebook", "Log", &iLogWindow, 1);
|
|
|
|
|
ini.Get("Notebook", "Code", &iCodeWindow, 1);
|
|
|
|
|
ini.Get("Notebook", "Registers", &iRegisterWindow, 1);
|
|
|
|
|
ini.Get("Notebook", "Breakpoints", &iBreakpointWindow, 0);
|
|
|
|
|
ini.Get("Notebook", "Memory", &iMemoryWindow, 1);
|
|
|
|
|
ini.Get("Notebook", "JIT", &iJitWindow, 1);
|
|
|
|
|
ini.Get("Notebook", "Sound", &iSoundWindow, 0);
|
|
|
|
|
ini.Get("Notebook", "Video", &iVideoWindow, 0);
|
|
|
|
|
|
|
|
|
|
// Remove bad values
|
|
|
|
|
iCodeWindow = Limit(iCodeWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iRegisterWindow = Limit(iRegisterWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iBreakpointWindow = Limit(iBreakpointWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iMemoryWindow = Limit(iMemoryWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iJitWindow = Limit(iJitWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iSoundWindow = Limit(iSoundWindow, 0, Parent->m_NB.size()-1);
|
|
|
|
|
iVideoWindow = Limit(iVideoWindow, 0, Parent->m_NB.size()-1);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
// Boot to pause or not
|
|
|
|
|
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
|
2009-01-05 02:52:55 +00:00
|
|
|
|
ini.Get("ShowOnStart", "BootToPause", &bBootToPause, true);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
2009-08-27 01:30:08 +00:00
|
|
|
|
void CCodeWindow::Save()
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-08-27 01:30:08 +00:00
|
|
|
|
IniFile ini;
|
|
|
|
|
ini.Load(DEBUGGER_CONFIG_FILE);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-02-06 18:18:20 +00:00
|
|
|
|
ini.Set("ShowOnStart", "DebuggerFont", std::string(DebuggerFont.GetNativeFontInfoUserDesc().mb_str()));
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
// Boot to pause or not
|
|
|
|
|
ini.Set("ShowOnStart", "AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATICSTART));
|
2009-01-05 02:52:55 +00:00
|
|
|
|
ini.Set("ShowOnStart", "BootToPause", GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-08-27 15:53:19 +00:00
|
|
|
|
// Save windows settings
|
|
|
|
|
ini.Set("ShowOnStart", "Code", GetMenuBar()->IsChecked(IDM_CODEWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "Registers", GetMenuBar()->IsChecked(IDM_REGISTERWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "Breakpoints", GetMenuBar()->IsChecked(IDM_BREAKPOINTWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "Memory", GetMenuBar()->IsChecked(IDM_MEMORYWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "JIT", GetMenuBar()->IsChecked(IDM_JITWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "Sound", GetMenuBar()->IsChecked(IDM_SOUNDWINDOW));
|
|
|
|
|
ini.Set("ShowOnStart", "Video", GetMenuBar()->IsChecked(IDM_VIDEOWINDOW));
|
|
|
|
|
|
|
|
|
|
ini.Set("Notebook", "Log", iLogWindow);
|
|
|
|
|
ini.Set("Notebook", "Code", iCodeWindow);
|
|
|
|
|
ini.Set("Notebook", "Registers", iRegisterWindow);
|
|
|
|
|
ini.Set("Notebook", "Breakpoints", iBreakpointWindow);
|
|
|
|
|
ini.Set("Notebook", "Memory", iMemoryWindow);
|
|
|
|
|
ini.Set("Notebook", "JIT", iJitWindow);
|
|
|
|
|
ini.Set("Notebook", "Sound", iSoundWindow);
|
|
|
|
|
ini.Set("Notebook", "Video", iVideoWindow);
|
2009-08-27 01:30:08 +00:00
|
|
|
|
|
|
|
|
|
// Save window settings
|
|
|
|
|
/*
|
|
|
|
|
ini.Set("CodeWindow", "x", GetPosition().x);
|
|
|
|
|
ini.Set("CodeWindow", "y", GetPosition().y);
|
|
|
|
|
ini.Set("CodeWindow", "w", GetSize().GetWidth());
|
|
|
|
|
ini.Set("CodeWindow", "h", GetSize().GetHeight());
|
|
|
|
|
ini.Set("MainWindow", "x", GetParent()->GetPosition().x);
|
|
|
|
|
ini.Set("MainWindow", "y", GetParent()->GetPosition().y);
|
|
|
|
|
ini.Set("MainWindow", "w", GetParent()->GetSize().GetWidth());
|
|
|
|
|
ini.Set("MainWindow", "h", GetParent()->GetSize().GetHeight());
|
|
|
|
|
|
|
|
|
|
if (m_BreakpointWindow) m_BreakpointWindow->Save(file);
|
|
|
|
|
if (m_RegisterWindow) m_RegisterWindow->Save(file);
|
|
|
|
|
if (m_MemoryWindow) m_MemoryWindow->Save(file);
|
|
|
|
|
if (m_JitWindow) m_JitWindow->Save(file);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
ini.Save(DEBUGGER_CONFIG_FILE);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter)
|
|
|
|
|
{
|
2009-08-25 01:50:27 +00:00
|
|
|
|
//CreateMenu(_LocalCoreStartupParameter);
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
// Configure the code window
|
|
|
|
|
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
|
wxBoxSizer* sizerLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
|
2009-06-28 12:15:31 +00:00
|
|
|
|
DebugInterface* di = &PowerPC::debug_interface;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-06-21 08:39:21 +00:00
|
|
|
|
codeview = new CCodeView(di, &g_symbolDB, this, ID_CODEVIEW);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
sizerBig->Add(sizerLeft, 2, wxEXPAND);
|
|
|
|
|
sizerBig->Add(codeview, 5, wxEXPAND);
|
|
|
|
|
|
2008-12-10 08:57:57 +00:00
|
|
|
|
sizerLeft->Add(callstack = new wxListBox(this, ID_CALLSTACKLIST, wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
|
|
|
|
|
sizerLeft->Add(symbols = new wxListBox(this, ID_SYMBOLLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);
|
|
|
|
|
sizerLeft->Add(calls = new wxListBox(this, ID_CALLSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
|
|
|
|
sizerLeft->Add(callers = new wxListBox(this, ID_CALLERSLIST, wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
SetSizer(sizerBig);
|
|
|
|
|
|
|
|
|
|
sizerLeft->SetSizeHints(this);
|
|
|
|
|
sizerLeft->Fit(this);
|
|
|
|
|
sizerBig->SetSizeHints(this);
|
|
|
|
|
sizerBig->Fit(this);
|
|
|
|
|
|
|
|
|
|
sync_event.Init();
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// Create CPU Mode and Views menus
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar * _pMenuBar)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// Create menu
|
2009-08-25 01:50:27 +00:00
|
|
|
|
//pMenuBar = new wxMenuBar(wxMB_DOCKABLE);
|
|
|
|
|
pMenuBar = _pMenuBar;
|
|
|
|
|
|
|
|
|
|
// Add separator to mark beginning of debugging menus
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-15 06:48:15 +00:00
|
|
|
|
// CPU Mode
|
2009-01-07 07:35:12 +00:00
|
|
|
|
wxMenu* pCoreMenu = new wxMenu;
|
|
|
|
|
|
|
|
|
|
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter core")
|
|
|
|
|
, wxString::FromAscii("This is nessesary to get break points"
|
|
|
|
|
" and stepping to work as explained in the Developer Documentation. But it can be very"
|
|
|
|
|
" slow, perhaps slower than 1 fps.")
|
|
|
|
|
, wxITEM_CHECK);
|
|
|
|
|
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
|
|
|
|
|
pCoreMenu->AppendSeparator();
|
|
|
|
|
|
|
|
|
|
wxMenuItem* boottopause = pCoreMenu->Append(IDM_BOOTTOPAUSE, _T("Boot to pause"),
|
|
|
|
|
wxT("Start the game directly instead of booting to pause"), wxITEM_CHECK);
|
|
|
|
|
boottopause->Check(bBootToPause);
|
|
|
|
|
|
|
|
|
|
wxMenuItem* automaticstart = pCoreMenu->Append(IDM_AUTOMATICSTART, _T("&Automatic start")
|
|
|
|
|
, wxString::FromAscii(
|
|
|
|
|
"Automatically load the Default ISO when Dolphin starts, or the last game you loaded,"
|
|
|
|
|
" if you have not given it an elf file with the --elf command line. [This can be"
|
|
|
|
|
" convenient if you are bugtesting with a certain game and want to rebuild"
|
|
|
|
|
" and retry it several times, either with changes to Dolphin or if you are"
|
|
|
|
|
" developing a homebrew game.]")
|
|
|
|
|
, wxITEM_CHECK);
|
2009-08-25 01:50:27 +00:00
|
|
|
|
automaticstart->Check(bAutomaticStart);
|
2009-01-07 07:35:12 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
pCoreMenu->AppendSeparator();
|
2009-01-20 16:52:46 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
jitblocklinking = pCoreMenu->Append(IDM_JITBLOCKLINKING + 123, _T("&JIT Block Linking off"),
|
|
|
|
|
_T("Provide safer execution by not linking the JIT blocks."),
|
|
|
|
|
wxITEM_CHECK);
|
|
|
|
|
|
|
|
|
|
jitunlimited = pCoreMenu->Append(IDM_JITUNLIMITED, _T("&Unlimited JIT Cache"),
|
|
|
|
|
_T("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from crashing.")
|
|
|
|
|
_T(" [This option must be selected before a game is started.]"),
|
|
|
|
|
wxITEM_CHECK);
|
2009-01-20 16:52:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef JIT_OFF_OPTIONS
|
2009-01-05 02:52:55 +00:00
|
|
|
|
pCoreMenu->AppendSeparator();
|
|
|
|
|
jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off (JIT core)"),
|
|
|
|
|
_T("Turn off all JIT functions, but still use the JIT core from Jit.cpp"),
|
|
|
|
|
wxITEM_CHECK);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
jitlsoff = pCoreMenu->Append(IDM_JITLSOFF, _T("&JIT LoadStore off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitlslbzxoff = pCoreMenu->Append(IDM_JITLSLBZXOFF, _T(" &JIT LoadStore lbzx off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitlslxzoff = pCoreMenu->Append(IDM_JITLSLXZOFF, _T(" &JIT LoadStore lXz off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitlslwzoff = pCoreMenu->Append(IDM_JITLSLWZOFF, _T(" &JIT LoadStore lwz off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitlspoff = pCoreMenu->Append(IDM_JITLSFOFF, _T("&JIT LoadStore Floating off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitlsfoff = pCoreMenu->Append(IDM_JITLSPOFF, _T("&JIT LoadStore Paired off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitfpoff = pCoreMenu->Append(IDM_JITFPOFF, _T("&JIT FloatingPoint off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitioff = pCoreMenu->Append(IDM_JITIOFF, _T("&JIT Integer off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitpoff = pCoreMenu->Append(IDM_JITPOFF, _T("&JIT Paired off"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK);
|
2009-01-07 07:35:12 +00:00
|
|
|
|
#endif
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
|
2009-01-15 06:48:15 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
pMenuBar->Append(pCoreMenu, _T("&CPU Mode"));
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-08-27 15:53:19 +00:00
|
|
|
|
// Views
|
2009-01-07 07:35:12 +00:00
|
|
|
|
wxMenu* pDebugDialogs = new wxMenu;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
wxMenuItem* pRegister = pDebugDialogs->Append(IDM_REGISTERWINDOW, _T("&Registers"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pRegister->Check(bRegisterWindow);
|
|
|
|
|
wxMenuItem* pBreakPoints = pDebugDialogs->Append(IDM_BREAKPOINTWINDOW, _T("&BreakPoints"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pBreakPoints->Check(bBreakpointWindow);
|
|
|
|
|
wxMenuItem* pMemory = pDebugDialogs->Append(IDM_MEMORYWINDOW, _T("&Memory"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pMemory->Check(bMemoryWindow);
|
|
|
|
|
wxMenuItem* pJit = pDebugDialogs->Append(IDM_JITWINDOW, _T("&Jit"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pJit->Check(bJitWindow);
|
2009-04-03 19:29:15 +00:00
|
|
|
|
wxMenuItem* pSound = pDebugDialogs->Append(IDM_SOUNDWINDOW, _T("&Sound"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pSound->Check(bSoundWindow);
|
2009-01-07 07:35:12 +00:00
|
|
|
|
wxMenuItem* pVideo = pDebugDialogs->Append(IDM_VIDEOWINDOW, _T("&Video"), wxEmptyString, wxITEM_CHECK);
|
|
|
|
|
pVideo->Check(bVideoWindow);
|
2009-02-06 18:18:20 +00:00
|
|
|
|
pDebugDialogs->AppendSeparator();
|
|
|
|
|
wxMenuItem* pFontPicker = pDebugDialogs->Append(IDM_FONTPICKER, _T("&Font..."), wxEmptyString, wxITEM_NORMAL);
|
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
pMenuBar->Append(pDebugDialogs, _T("&Views"));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
CreateSymbolsMenu();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
//SetMenuBar(pMenuBar);
|
2009-01-05 02:52:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Toolbar and bitmaps for the toolbar
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
void CCodeWindow::InitBitmaps()
|
|
|
|
|
{
|
|
|
|
|
// load original size 48x48
|
|
|
|
|
m_Bitmaps[Toolbar_DebugGo] = wxGetBitmapFromMemory(toolbar_play_png);
|
|
|
|
|
m_Bitmaps[Toolbar_Step] = wxGetBitmapFromMemory(toolbar_add_breakpoint_png);
|
|
|
|
|
m_Bitmaps[Toolbar_StepOver] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
|
|
|
|
m_Bitmaps[Toolbar_Skip] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
|
|
|
|
m_Bitmaps[Toolbar_GotoPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
|
|
|
|
m_Bitmaps[Toolbar_SetPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
2009-08-27 07:33:07 +00:00
|
|
|
|
m_Bitmaps[Toolbar_DebugPause] = wxGetBitmapFromMemory(toolbar_pause_png);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// scale to 16x16 for toolbar
|
2009-08-27 07:33:07 +00:00
|
|
|
|
for (size_t n = Toolbar_DebugGo; n < ToolbarDebugBitmapMax; n++)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-01-05 02:52:55 +00:00
|
|
|
|
m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(16, 16));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
2009-01-05 02:52:55 +00:00
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar)
|
2009-01-05 02:52:55 +00:00
|
|
|
|
{
|
|
|
|
|
int w = m_Bitmaps[Toolbar_DebugGo].GetWidth(),
|
|
|
|
|
h = m_Bitmaps[Toolbar_DebugGo].GetHeight();
|
|
|
|
|
|
|
|
|
|
toolBar->SetToolBitmapSize(wxSize(w, h));
|
|
|
|
|
toolBar->AddTool(IDM_DEBUG_GO, _T("Play"), m_Bitmaps[Toolbar_DebugGo]);
|
|
|
|
|
toolBar->AddTool(IDM_STEP, _T("Step"), m_Bitmaps[Toolbar_Step]);
|
|
|
|
|
toolBar->AddTool(IDM_STEPOVER, _T("Step Over"), m_Bitmaps[Toolbar_StepOver]);
|
|
|
|
|
toolBar->AddTool(IDM_SKIP, _T("Skip"), m_Bitmaps[Toolbar_Skip]);
|
|
|
|
|
toolBar->AddSeparator();
|
|
|
|
|
toolBar->AddTool(IDM_GOTOPC, _T("Show PC"), m_Bitmaps[Toolbar_GotoPC]);
|
|
|
|
|
toolBar->AddTool(IDM_SETPC, _T("Set PC"), m_Bitmaps[Toolbar_SetPC]);
|
|
|
|
|
toolBar->AddSeparator();
|
|
|
|
|
toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, _T("")));
|
|
|
|
|
|
|
|
|
|
// after adding the buttons to the toolbar, must call Realize() to reflect
|
|
|
|
|
// the changes
|
|
|
|
|
toolBar->Realize();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Shortcuts
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
bool CCodeWindow::UseInterpreter()
|
|
|
|
|
{
|
|
|
|
|
return GetMenuBar()->IsChecked(IDM_INTERPRETER);
|
|
|
|
|
}
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
bool CCodeWindow::BootToPause()
|
|
|
|
|
{
|
|
|
|
|
return GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE);
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
bool CCodeWindow::AutomaticStart()
|
|
|
|
|
{
|
|
|
|
|
return GetMenuBar()->IsChecked(IDM_AUTOMATICSTART);
|
|
|
|
|
}
|
2009-01-07 07:35:12 +00:00
|
|
|
|
|
|
|
|
|
bool CCodeWindow::UnlimitedJITCache()
|
|
|
|
|
{
|
|
|
|
|
return GetMenuBar()->IsChecked(IDM_JITUNLIMITED);
|
|
|
|
|
}
|
2009-01-20 16:52:46 +00:00
|
|
|
|
|
|
|
|
|
bool CCodeWindow::JITBlockLinking()
|
|
|
|
|
{
|
|
|
|
|
return GetMenuBar()->IsChecked(IDM_JITBLOCKLINKING);
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// CPU Mode and JIT Menu
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
void CCodeWindow::OnCPUMode(wxCommandEvent& event)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-01-07 07:35:12 +00:00
|
|
|
|
switch (event.GetId())
|
2009-01-05 02:52:55 +00:00
|
|
|
|
{
|
2009-01-07 07:35:12 +00:00
|
|
|
|
case IDM_INTERPRETER:
|
|
|
|
|
PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT); break;
|
|
|
|
|
|
|
|
|
|
case IDM_BOOTTOPAUSE:
|
|
|
|
|
bBootToPause = !bBootToPause; return;
|
|
|
|
|
case IDM_AUTOMATICSTART:
|
|
|
|
|
bAutomaticStart = !bAutomaticStart; return;
|
|
|
|
|
|
|
|
|
|
case IDM_JITOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStoreOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSLXZOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSLWZOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSLBZXOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSFOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITLSPOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITFPOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITFloatingPointOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITIOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITIntegerOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITPOFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITPairedOff = event.IsChecked(); break;
|
|
|
|
|
case IDM_JITSROFF:
|
|
|
|
|
Core::g_CoreStartupParameter.bJITSystemRegistersOff = event.IsChecked(); break;
|
2009-01-05 02:52:55 +00:00
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-07 07:35:12 +00:00
|
|
|
|
// Clear the JIT cache to enable these changes
|
2009-07-15 20:15:34 +00:00
|
|
|
|
jit.ClearCache();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnJitMenu(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
switch (event.GetId())
|
|
|
|
|
{
|
2009-01-07 07:35:12 +00:00
|
|
|
|
case IDM_LOGINSTRUCTIONS:
|
|
|
|
|
PPCTables::LogCompiledInstructions(); break;
|
|
|
|
|
|
|
|
|
|
case IDM_CLEARCODECACHE:
|
2009-07-15 20:15:34 +00:00
|
|
|
|
jit.ClearCache(); break;
|
2009-06-17 19:50:59 +00:00
|
|
|
|
|
|
|
|
|
case IDM_SEARCHINSTRUCTION:
|
|
|
|
|
{
|
|
|
|
|
wxString str;
|
2009-06-17 21:44:03 +00:00
|
|
|
|
str = wxGetTextFromUser(_(""), wxT("Op?"), wxEmptyString, this);
|
2009-06-17 19:50:59 +00:00
|
|
|
|
for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4) {
|
|
|
|
|
const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr));
|
2009-06-17 21:44:03 +00:00
|
|
|
|
if (name && !strcmp((const char *)str.mb_str(), name))
|
2009-06-17 19:50:59 +00:00
|
|
|
|
NOTICE_LOG(POWERPC, "Found %s at %08x", str.c_str(), addr);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Events
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2009-01-15 06:48:15 +00:00
|
|
|
|
// The Play, Stop, Step, Skip, Go to PC and Show PC buttons all go here
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
switch (event.GetId())
|
|
|
|
|
{
|
|
|
|
|
case IDM_DEBUG_GO:
|
|
|
|
|
{
|
|
|
|
|
// [F|RES] prolly we should disable the other buttons in go mode too ...
|
|
|
|
|
if (CCPU::IsStepping())
|
|
|
|
|
{
|
|
|
|
|
CCPU::EnableStepping(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2009-02-17 23:07:10 +00:00
|
|
|
|
CCPU::EnableStepping(true); // Break
|
2008-12-08 05:30:24 +00:00
|
|
|
|
Host_UpdateLogDisplay();
|
|
|
|
|
}
|
2009-02-23 21:27:58 +00:00
|
|
|
|
wxThread::Sleep(20);
|
|
|
|
|
JumpToAddress(PC);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
Update();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_STEP:
|
|
|
|
|
SingleCPUStep();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_STEPOVER:
|
2009-02-17 23:07:10 +00:00
|
|
|
|
CCPU::EnableStepping(true); // TODO: Huh?
|
2008-12-08 05:30:24 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_SKIP:
|
|
|
|
|
PC += 4;
|
|
|
|
|
Update();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_SETPC:
|
|
|
|
|
PC = codeview->GetSelection();
|
|
|
|
|
Update();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case IDM_GOTOPC:
|
|
|
|
|
JumpToAddress(PC);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2009-08-27 00:54:44 +00:00
|
|
|
|
UpdateButtonStates();
|
|
|
|
|
// Update all toolbars in the aui manager
|
2009-08-27 10:10:07 +00:00
|
|
|
|
Parent->UpdateGUI();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::JumpToAddress(u32 _Address)
|
|
|
|
|
{
|
|
|
|
|
codeview->Center(_Address);
|
|
|
|
|
UpdateLists();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnCodeViewChange(wxCommandEvent &event)
|
|
|
|
|
{
|
|
|
|
|
//PanicAlert("boo");
|
|
|
|
|
UpdateLists();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnAddrBoxChange(wxCommandEvent& event)
|
|
|
|
|
{
|
2009-08-25 10:58:13 +00:00
|
|
|
|
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
|
|
|
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
|
|
|
"GetToolBar():%i\n", GetToolBar()).c_str());
|
|
|
|
|
|
|
|
|
|
if (!GetToolBar()) return;
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
wxTextCtrl* pAddrCtrl = (wxTextCtrl*)GetToolBar()->FindControl(IDM_ADDRBOX);
|
|
|
|
|
wxString txt = pAddrCtrl->GetValue();
|
|
|
|
|
|
|
|
|
|
std::string text(txt.mb_str());
|
|
|
|
|
text = StripSpaces(text);
|
|
|
|
|
if (text.size() == 8)
|
|
|
|
|
{
|
|
|
|
|
u32 addr;
|
|
|
|
|
sscanf(text.c_str(), "%08x", &addr);
|
|
|
|
|
JumpToAddress(addr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
event.Skip(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnCallstackListChange(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
int index = callstack->GetSelection();
|
|
|
|
|
if (index >= 0) {
|
|
|
|
|
u32 address = (u32)(u64)(callstack->GetClientData(index));
|
|
|
|
|
if (address)
|
|
|
|
|
JumpToAddress(address);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnCallersListChange(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
int index = callers->GetSelection();
|
|
|
|
|
if (index >= 0) {
|
|
|
|
|
u32 address = (u32)(u64)(callers->GetClientData(index));
|
|
|
|
|
if (address)
|
|
|
|
|
JumpToAddress(address);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::OnCallsListChange(wxCommandEvent& event)
|
|
|
|
|
{
|
|
|
|
|
int index = calls->GetSelection();
|
|
|
|
|
if (index >= 0) {
|
|
|
|
|
u32 address = (u32)(u64)(calls->GetClientData(index));
|
|
|
|
|
if (address)
|
|
|
|
|
JumpToAddress(address);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
void CCodeWindow::SingleCPUStep()
|
|
|
|
|
{
|
|
|
|
|
CCPU::StepOpcode(&sync_event);
|
|
|
|
|
// if (CCPU::IsStepping())
|
|
|
|
|
// sync_event.Wait();
|
|
|
|
|
wxThread::Sleep(20);
|
|
|
|
|
// need a short wait here
|
|
|
|
|
JumpToAddress(PC);
|
|
|
|
|
Update();
|
|
|
|
|
Host_UpdateLogDisplay();
|
|
|
|
|
}
|
|
|
|
|
|
2009-02-23 21:27:58 +00:00
|
|
|
|
void CCodeWindow::UpdateLists()
|
|
|
|
|
{
|
|
|
|
|
callers->Clear();
|
|
|
|
|
u32 addr = codeview->GetSelection();
|
|
|
|
|
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(addr);
|
|
|
|
|
if (!symbol)
|
|
|
|
|
return;
|
|
|
|
|
for (int i = 0; i < (int)symbol->callers.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
u32 caller_addr = symbol->callers[i].callAddress;
|
|
|
|
|
Symbol *caller_symbol = g_symbolDB.GetSymbolFromAddr(caller_addr);
|
|
|
|
|
if (caller_symbol) {
|
2009-08-13 05:11:25 +00:00
|
|
|
|
int idx = callers->Append(wxString::FromAscii(StringFromFormat("< %s (%08x)", caller_symbol->name.c_str(), caller_addr).c_str()));
|
2009-02-23 21:27:58 +00:00
|
|
|
|
callers->SetClientData(idx, (void*)caller_addr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
calls->Clear();
|
|
|
|
|
for (int i = 0; i < (int)symbol->calls.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
u32 call_addr = symbol->calls[i].function;
|
|
|
|
|
Symbol *call_symbol = g_symbolDB.GetSymbolFromAddr(call_addr);
|
|
|
|
|
if (call_symbol) {
|
2009-08-13 05:11:25 +00:00
|
|
|
|
int idx = calls->Append(wxString::FromAscii(StringFromFormat("> %s (%08x)", call_symbol->name.c_str(), call_addr).c_str()));
|
2009-02-23 21:27:58 +00:00
|
|
|
|
calls->SetClientData(idx, (void*)call_addr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::UpdateCallstack()
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
|
|
|
|
callstack->Clear();
|
|
|
|
|
|
2009-07-07 14:04:56 +00:00
|
|
|
|
std::vector<Dolphin_Debugger::CallstackEntry> stack;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-07-07 14:04:56 +00:00
|
|
|
|
if (Dolphin_Debugger::GetCallstack(stack))
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
|
|
|
|
for (size_t i = 0; i < stack.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
int idx = callstack->Append(wxString::FromAscii(stack[i].Name.c_str()));
|
|
|
|
|
callstack->SetClientData(idx, (void*)(u64)stack[i].vAddress);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
callstack->Append(wxString::FromAscii("invalid callstack"));
|
|
|
|
|
}
|
2009-02-23 21:27:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CCodeWindow::Update()
|
|
|
|
|
{
|
|
|
|
|
codeview->Refresh();
|
|
|
|
|
UpdateCallstack();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
UpdateButtonStates();
|
|
|
|
|
|
2009-01-20 19:00:51 +00:00
|
|
|
|
/* DO NOT Automatically show the current PC position when a breakpoint is hit or
|
|
|
|
|
when we pause SINCE THIS CAN BE CALLED AT OTHER TIMES TOO */
|
|
|
|
|
// codeview->Center(PC);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Update GUI
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
void CCodeWindow::UpdateButtonStates()
|
|
|
|
|
{
|
2009-01-07 07:35:12 +00:00
|
|
|
|
bool Initialized = (Core::GetState() != Core::CORE_UNINITIALIZED);
|
|
|
|
|
bool Running = (Core::GetState() == Core::CORE_RUN);
|
|
|
|
|
bool Pause = (Core::GetState() == Core::CORE_PAUSE);
|
2009-08-27 00:54:44 +00:00
|
|
|
|
wxAuiToolBar* ToolBar = GetToolBar();
|
2009-01-07 07:35:12 +00:00
|
|
|
|
|
2009-08-27 00:54:44 +00:00
|
|
|
|
if (!ToolBar) return;
|
2009-08-25 01:50:27 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
if (Core::GetState() == Core::CORE_UNINITIALIZED)
|
|
|
|
|
{
|
2009-08-27 00:54:44 +00:00
|
|
|
|
ToolBar->EnableTool(IDM_DEBUG_GO, false);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEP, false);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEPOVER, false);
|
|
|
|
|
ToolBar->EnableTool(IDM_SKIP, false);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (!CCPU::IsStepping())
|
|
|
|
|
{
|
2009-08-27 00:54:44 +00:00
|
|
|
|
ToolBar->SetToolShortHelp(IDM_DEBUG_GO, _T("&Pause"));
|
|
|
|
|
ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Pause"));
|
2009-08-27 07:33:07 +00:00
|
|
|
|
ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugPause]);
|
2009-08-27 00:54:44 +00:00
|
|
|
|
ToolBar->EnableTool(IDM_DEBUG_GO, true);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEP, false);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEPOVER, false);
|
|
|
|
|
ToolBar->EnableTool(IDM_SKIP, false);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2009-08-27 00:54:44 +00:00
|
|
|
|
ToolBar->SetToolShortHelp(IDM_DEBUG_GO, _T("&Play"));
|
|
|
|
|
ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Play"));
|
|
|
|
|
ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugGo]);
|
|
|
|
|
ToolBar->EnableTool(IDM_DEBUG_GO, true);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEP, true);
|
|
|
|
|
ToolBar->EnableTool(IDM_STEPOVER, true);
|
|
|
|
|
ToolBar->EnableTool(IDM_SKIP, true);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2009-01-07 07:35:12 +00:00
|
|
|
|
|
|
|
|
|
// Enabled or disable menu items
|
|
|
|
|
GetMenuBar()->Enable(IDM_INTERPRETER, Pause); // CPU Mode
|
|
|
|
|
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITUNLIMITED, !Initialized);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSLXZOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSLWZOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSLBZXOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSFOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITLSPOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITFPOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITIOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITPOFF, Pause);
|
|
|
|
|
GetMenuBar()->Enable(IDM_JITSROFF, Pause);
|
|
|
|
|
|
|
|
|
|
GetMenuBar()->Enable(IDM_CLEARCODECACHE, Pause); // JIT Menu
|
2009-02-06 18:18:20 +00:00
|
|
|
|
|
|
|
|
|
// Update Fonts
|
|
|
|
|
callstack->SetFont(DebuggerFont);
|
|
|
|
|
symbols->SetFont(DebuggerFont);
|
|
|
|
|
callers->SetFont(DebuggerFont);
|
|
|
|
|
calls->SetFont(DebuggerFont);
|
2009-08-27 00:54:44 +00:00
|
|
|
|
|
|
|
|
|
if (ToolBar) ToolBar->Realize();
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-08-25 01:50:27 +00:00
|
|
|
|
void CCodeWindow::RecreateToolbar(wxAuiToolBar * toolBar)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-08-25 01:50:27 +00:00
|
|
|
|
/*
|
2008-12-08 05:30:24 +00:00
|
|
|
|
// delete and recreate the toolbar
|
|
|
|
|
wxToolBarBase* toolBar = GetToolBar();
|
|
|
|
|
delete toolBar;
|
|
|
|
|
SetToolBar(NULL);
|
2009-08-25 01:50:27 +00:00
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
long style = TOOLBAR_STYLE;
|
|
|
|
|
style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
2009-08-27 07:33:07 +00:00
|
|
|
|
wxToolBar* theToolBar = CreateToolBar(style, ID_TOOLBAR_DEBUG);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
PopulateToolbar(theToolBar);
|
|
|
|
|
SetToolBar(theToolBar);
|
2009-08-25 01:50:27 +00:00
|
|
|
|
*/
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Show Tool Tip for menu items
|
|
|
|
|
void CCodeWindow::DoTip(wxString text)
|
|
|
|
|
{
|
|
|
|
|
// Create a blank tooltip to clear the eventual old one
|
|
|
|
|
static wxTipWindow *tw = NULL;
|
|
|
|
|
if (tw)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-01-05 02:52:55 +00:00
|
|
|
|
tw->SetTipWindowPtr(NULL);
|
|
|
|
|
tw->Close();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
2009-01-05 02:52:55 +00:00
|
|
|
|
tw = NULL;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Don't make a new one for blank text
|
|
|
|
|
if(text.empty()) return;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
tw = new wxTipWindow(this, text, 175, &tw);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// Move it to the right
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
POINT point;
|
|
|
|
|
GetCursorPos(&point);
|
|
|
|
|
tw->SetPosition(wxPoint(point.x + 25, point.y));
|
|
|
|
|
#endif
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
// See the comment under BEGIN_EVENT_TABLE for an explanation of why we use both these events.
|
|
|
|
|
void CCodeWindow::OnStatusBar(wxMenuEvent& event)
|
2008-12-08 05:30:24 +00:00
|
|
|
|
{
|
2009-01-05 08:19:44 +00:00
|
|
|
|
event.Skip(); // This doesn't hurt right?
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
/* We assume the debug build user don't need to see this all the time. And these tooltips
|
|
|
|
|
may not be entirely stable. So we leave them out of debug builds. I could for example
|
|
|
|
|
get it to crash at wxWindowBase::DoHitTest(), that may be fixed in wxWidgets 2.9.0. */
|
|
|
|
|
#if !defined(_DEBUG) || defined(DEBUGFAST)
|
2009-01-07 07:35:12 +00:00
|
|
|
|
//DoTip(pMenuBar->GetHelpString(event.GetId()));
|
2009-01-05 02:52:55 +00:00
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
void CCodeWindow::OnStatusBar_(wxUpdateUIEvent& event)
|
|
|
|
|
{
|
2009-01-05 08:19:44 +00:00
|
|
|
|
event.Skip();
|
|
|
|
|
|
2009-01-05 02:52:55 +00:00
|
|
|
|
#if !defined(_DEBUG) || defined(DEBUGFAST)
|
|
|
|
|
// The IDM_ADDRBOX id seems to come with this outside the toolbar
|
2009-01-07 07:35:12 +00:00
|
|
|
|
//if(event.GetId() != IDM_ADDRBOX) DoTip(wxEmptyString);
|
2009-01-05 02:52:55 +00:00
|
|
|
|
#endif
|
2008-12-08 05:30:24 +00:00
|
|
|
|
}
|
2009-06-17 21:44:03 +00:00
|
|
|
|
|