Skip to content

Commit

Permalink
Quick and dirty Windows UI for memchecks.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Mar 12, 2013
1 parent e4b43b7 commit 303058f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions Windows/Debugger/Debugger_Disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "../../Core/MemMap.h"
#include "../Resource.h"
#include "../InputBox.h"

#include "../../Core/Debugger/Breakpoints.h"
#include "../../Core/Debugger/SymbolMap.h"
Expand Down Expand Up @@ -234,6 +235,37 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
}
break;

case IDC_MEMCHECK:
{
bool isRunning = !Core_IsInactive();
if (isRunning)
{
SetDebugMode(true);
Core_EnableStepping(true);
Core_WaitInactive(200);
}

MemCheck check;
if (InputBox_GetHex(GetModuleHandle(NULL), m_hDlg, "JIT (and not HLE) only for now, no delete", 0, check.iStartAddress))
{
check.bBreak = true;
check.bLog = true;
check.bOnRead = true;
check.bOnWrite = true;
check.bRange = false;
CBreakPoints::MemChecks.push_back(check);
CBreakPoints::InvalidateJit();
}

if (isRunning)
{
SetDebugMode(false);
Core_EnableStepping(false);
MainWindow::UpdateMenus();
}
}
break;

case IDC_ADDRESS:
{
if (HIWORD(wParam) == EN_CHANGE )
Expand Down
1 change: 1 addition & 0 deletions Windows/ppsspp.rc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ BEGIN
PUSHBUTTON "Step &Over",IDC_STEPOVER,219,0,40,14
PUSHBUTTON "S&kip",IDC_SKIP,265,0,23,14
PUSHBUTTON "Next &HLE",IDC_STEPHLE,294,0,40,14
PUSHBUTTON "&Memcheck",IDC_MEMCHECK,340,0,40,14
EDITTEXT IDC_ADDRESS,11,24,91,13,ES_UPPERCASE | ES_AUTOHSCROLL
PUSHBUTTON "&PC",IDC_GOTOPC,11,40,15,13
PUSHBUTTON "&LR",IDC_GOTOLR,28,40,14,13
Expand Down
3 changes: 2 additions & 1 deletion Windows/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,15 @@
#define ID_OPTIONS_SHOWFPS 40137
#define ID_OPTIONS_STRETCHDISPLAY 40138
#define ID_OPTIONS_FRAMESKIP 40139
#define IDC_MEMCHECK 40140
#define IDC_STATIC -1

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 233
#define _APS_NEXT_COMMAND_VALUE 40140
#define _APS_NEXT_COMMAND_VALUE 40141
#define _APS_NEXT_CONTROL_VALUE 1163
#define _APS_NEXT_SYMED_VALUE 101
#endif
Expand Down

0 comments on commit 303058f

Please sign in to comment.