Mesen-SX/Core/BreakpointManager.h

32 lines
986 B
C
Raw Normal View History

2019-03-01 20:27:49 -05:00
#pragma once
#include "stdafx.h"
#include "Breakpoint.h"
#include "DebugTypes.h"
2019-07-30 22:34:52 -04:00
#include "DebugUtilities.h"
2019-03-01 20:27:49 -05:00
class ExpressionEvaluator;
class Debugger;
struct ExpressionData;
enum class MemoryOperationType;
class BreakpointManager
{
private:
static constexpr int BreakpointTypeCount = 3; //Read, Write, Exec
Debugger *_debugger;
2019-07-30 22:34:52 -04:00
vector<Breakpoint> _breakpoints[(int)DebugUtilities::GetLastCpuType() + 1][BreakpointTypeCount];
vector<ExpressionData> _rpnList[(int)DebugUtilities::GetLastCpuType() + 1][BreakpointTypeCount];
bool _hasBreakpoint[(int)DebugUtilities::GetLastCpuType() + 1][BreakpointTypeCount] = {};
2019-03-01 20:27:49 -05:00
2019-07-30 22:34:52 -04:00
unique_ptr<ExpressionEvaluator> _bpExpEval[(int)DebugUtilities::GetLastCpuType() + 1];
2019-03-01 20:27:49 -05:00
BreakpointType GetBreakpointType(MemoryOperationType type);
public:
BreakpointManager(Debugger *debugger);
void SetBreakpoints(Breakpoint breakpoints[], uint32_t count);
int CheckBreakpoint(CpuType cpuType, MemoryOperationInfo operationInfo, AddressInfo &address);
2019-03-01 20:27:49 -05:00
};