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