2015-06-24 23:26:19 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2016-01-09 18:15:43 +00:00
|
|
|
#include "ExpressionEvaluator.h"
|
2015-06-24 23:26:19 +00:00
|
|
|
|
2016-01-09 18:15:43 +00:00
|
|
|
enum BreakpointType
|
2015-06-24 23:26:19 +00:00
|
|
|
{
|
2016-01-09 18:15:43 +00:00
|
|
|
Global = 0,
|
|
|
|
Execute = 1,
|
|
|
|
ReadRam = 2,
|
2016-11-19 02:32:07 +00:00
|
|
|
WriteRam = 3,
|
|
|
|
ReadVram = 4,
|
|
|
|
WriteVram = 5,
|
2015-06-24 23:26:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class Breakpoint
|
|
|
|
{
|
2016-11-19 02:32:07 +00:00
|
|
|
private:
|
|
|
|
enum BreakpointTypeFlags
|
|
|
|
{
|
|
|
|
Global = 0,
|
|
|
|
Execute = 1,
|
|
|
|
ReadRam = 2,
|
|
|
|
WriteRam = 4,
|
|
|
|
ReadVram = 8,
|
|
|
|
WriteVram = 16,
|
|
|
|
};
|
|
|
|
|
2015-06-24 23:26:19 +00:00
|
|
|
public:
|
2016-01-09 18:15:43 +00:00
|
|
|
Breakpoint();
|
2015-06-24 23:26:19 +00:00
|
|
|
~Breakpoint();
|
|
|
|
|
2018-02-11 02:23:22 +00:00
|
|
|
bool Matches(uint32_t memoryAddr, AddressTypeInfo &info);
|
|
|
|
bool Matches(uint32_t memoryAddr, PpuAddressTypeInfo &info);
|
2016-11-19 02:32:07 +00:00
|
|
|
bool HasBreakpointType(BreakpointType type);
|
2016-01-09 18:15:43 +00:00
|
|
|
string GetCondition();
|
2017-03-04 02:03:20 +00:00
|
|
|
bool HasCondition();
|
2016-01-09 18:15:43 +00:00
|
|
|
void ClearCondition();
|
2018-02-19 03:41:50 +00:00
|
|
|
|
2018-02-20 04:23:26 +00:00
|
|
|
uint32_t GetId();
|
2018-02-19 03:41:50 +00:00
|
|
|
bool IsEnabled();
|
|
|
|
bool IsMarked();
|
2015-06-24 23:26:19 +00:00
|
|
|
|
|
|
|
private:
|
2018-02-20 04:23:26 +00:00
|
|
|
uint32_t _id;
|
2018-02-11 02:23:22 +00:00
|
|
|
DebugMemoryType _memoryType;
|
2016-11-19 02:32:07 +00:00
|
|
|
BreakpointTypeFlags _type;
|
2016-12-04 17:21:20 +00:00
|
|
|
int32_t _startAddr;
|
|
|
|
int32_t _endAddr;
|
2018-02-19 03:41:50 +00:00
|
|
|
bool _enabled;
|
|
|
|
bool _markEvent;
|
2016-01-09 18:15:43 +00:00
|
|
|
char _condition[1000];
|
2015-06-24 23:26:19 +00:00
|
|
|
};
|