diff options
| author | hrydgard <hrydgard@gmail.com> | 2008-08-25 20:34:11 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2008-08-25 20:34:11 +0000 |
| commit | fd188ec09eb5a73960a0e6ef071c3d979fb39aa0 (patch) | |
| tree | 18cfeb642ebae2382b4944255c21f791c92c3170 /Source/Core/DebuggerWX/src | |
| parent | 35fdbdc3604c1177f96612fbb68aaea82bca837e (diff) | |
Switch between JIT and Interpreter at runtime using the debug window (pause first!)
Plus assorted cleanup & fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@312 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/src')
| -rw-r--r-- | Source/Core/DebuggerWX/src/CodeView.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/src/CodeWindow.cpp | 15 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/src/CodeWindow.h | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/Source/Core/DebuggerWX/src/CodeView.cpp b/Source/Core/DebuggerWX/src/CodeView.cpp index d6aab45ac9..81e20ab704 100644 --- a/Source/Core/DebuggerWX/src/CodeView.cpp +++ b/Source/Core/DebuggerWX/src/CodeView.cpp @@ -341,9 +341,8 @@ void CCodeView::OnPaint(wxPaintEvent& event) dc.DrawRectangle(0, 0, 16, rc.height);
dc.DrawRectangle(0, 0, rc.width, 5);
// TODO - clean up this freaking mess!!!!!
- int i;
- for (i = -numRows; i <= numRows; i++)
+ for (int i = -numRows; i <= numRows; i++)
{
unsigned int address = curAddress + i * align;
@@ -469,7 +468,7 @@ void CCodeView::OnPaint(wxPaintEvent& event) dc.SetPen(currentPen);
- for (i = 0; i < numBranches; i++)
+ for (int i = 0; i < numBranches; i++)
{
int x = 300 + (branches[i].srcAddr % 9) * 8;
_MoveTo(x-2, branches[i].src);
diff --git a/Source/Core/DebuggerWX/src/CodeWindow.cpp b/Source/Core/DebuggerWX/src/CodeWindow.cpp index 96b9a822f4..c3bcf58cbe 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/src/CodeWindow.cpp @@ -75,6 +75,8 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame) EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
+ EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnInterpreter)
+
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
EVT_MENU(IDM_SCANFUNCTIONS, CCodeWindow::OnSymbolsMenu)
@@ -103,7 +105,6 @@ inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length) return(wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1));
}
-
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent, wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(parent, id, title, pos, size, style)
@@ -225,12 +226,12 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam {
wxMenu* pCoreMenu = new wxMenu;
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter"), wxEmptyString, wxITEM_CHECK);
- interpreter->Check(!_LocalCoreStartupParameter.bUseDynarec);
+ interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
- pMenuBar->Append(pCoreMenu, _T("&Core Startup"));
+ pMenuBar->Append(pCoreMenu, _T("&CPU Mode"));
}
{
@@ -289,6 +290,14 @@ bool CCodeWindow::UseDualCore() return(GetMenuBar()->IsChecked(IDM_DUALCORE));
}
+void CCodeWindow::OnInterpreter(wxCommandEvent& event)
+{
+ if (Core::GetState() != Core::CORE_RUN) {
+ PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT);
+ } else {
+ wxMessageBox(_T("Please pause the emulator before changing mode."));
+ }
+}
void CCodeWindow::OnJitMenu(wxCommandEvent& event)
{
diff --git a/Source/Core/DebuggerWX/src/CodeWindow.h b/Source/Core/DebuggerWX/src/CodeWindow.h index e8f6edea3f..dbdd1c826b 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.h +++ b/Source/Core/DebuggerWX/src/CodeWindow.h @@ -144,6 +144,7 @@ class CCodeWindow void OnHostMessage(wxCommandEvent& event);
void OnSymbolsMenu(wxCommandEvent& event);
void OnJitMenu(wxCommandEvent& event);
+ void OnInterpreter(wxCommandEvent& event);
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter);
|
