From 1d7a42f0b8b82999ccb9b6edcd8ebcce0edd409d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 24 Dec 2012 21:48:19 -0800 Subject: [PATCH] Add a button on Windows to enable HLE stepping. --- Windows/Debugger/Debugger_Disasm.cpp | 33 +++++++++++++++++++-------- Windows/ppsspp.rc | Bin 28756 -> 28864 bytes Windows/resource.h | 3 ++- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index b326bc75bc..6d2097f1ee 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -14,6 +14,7 @@ #include "../../Core/Core.h" #include "../../Core/CPU.h" +#include "../../Core/HLE/HLE.h" #include "base/stringutil.h" @@ -136,10 +137,10 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) break; case IDC_FUNCTIONLIST: - switch (HIWORD(wParam)) - { - case CBN_DBLCLK: - case CBN_SELCHANGE: + switch (HIWORD(wParam)) + { + case CBN_DBLCLK: + case CBN_SELCHANGE: { HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ListBox_GetCurSel(lb); @@ -154,9 +155,9 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) break; case IDC_GOTOINT: - switch (HIWORD(wParam)) - { - case LBN_SELCHANGE: + switch (HIWORD(wParam)) + { + case LBN_SELCHANGE: { HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam)); int n = ComboBox_GetCurSel(lb); @@ -192,7 +193,7 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) SetDebugMode(false); CBreakPoints::AddBreakPoint(cpu->GetPC()+cpu->getInstructionSize(0),true); _dbg_update_(); - Core_EnableStepping(false); + Core_EnableStepping(false); MainWindow::UpdateMenus(); Sleep(1); ptr->gotoPC(); @@ -200,6 +201,16 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) } break; + case IDC_STEPHLE: + { + hleDebugBreak(); + SetDebugMode(false); + _dbg_update_(); + Core_EnableStepping(false); + MainWindow::UpdateMenus(); + } + break; + case IDC_STOP: { SetDebugMode(true); @@ -241,8 +252,8 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) HWND list = GetDlgItem(hDlg,IDC_CALLSTACK); ComboBox_ResetContent(list); - u32 pc = currentMIPS->pc; - u32 ra = currentMIPS->r[MIPS_REG_RA]; + u32 pc = currentMIPS->pc; + u32 ra = currentMIPS->r[MIPS_REG_RA]; DWORD addr = Memory::ReadUnchecked_U32(pc); int count=1; ComboBox_SetItemData(list,ComboBox_AddString(list,symbolMap.GetDescription(pc)),pc); @@ -341,6 +352,7 @@ void CDisasm::SetDebugMode(bool _bDebug) EnableWindow( GetDlgItem(hDlg, IDC_GO), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_STEP), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), TRUE); + EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_STOP), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_SKIP), TRUE); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); @@ -353,6 +365,7 @@ void CDisasm::SetDebugMode(bool _bDebug) EnableWindow( GetDlgItem(hDlg, IDC_GO), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_STEP), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), FALSE); + EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_STOP), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_SKIP), FALSE); } diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 40f6f0e24f4608edab308ad315a56c3577fc3b70..3c691428661e75dc9a4105a434f708ed81e8a7dd 100644 GIT binary patch delta 84 zcmccefbqaX#tkZ*jGU7j*_Dm`7*ZK37)lrv7}OX%76usMbELmB`x$P-Nf delta 21 dcmX@`knzd`#tkZ*lkc!|O!i~bSbTsp9RO+K2$cW; diff --git a/Windows/resource.h b/Windows/resource.h index 09a16838bb..134447f2a5 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -246,13 +246,14 @@ #define ID_OPTIONS_WIREFRAME 40123 #define ID_OPTIONS_HARDWARETRANSFORM 40124 #define ID_OPTIONS_FASTMEMORY 40125 +#define IDC_STEPHLE 40126 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 232 -#define _APS_NEXT_COMMAND_VALUE 40126 +#define _APS_NEXT_COMMAND_VALUE 40127 #define _APS_NEXT_CONTROL_VALUE 1162 #define _APS_NEXT_SYMED_VALUE 101 #endif