mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-28 03:20:24 +00:00
52 lines
854 B
C++
52 lines
854 B
C++
#pragma once
|
|
#include "stdafx.h"
|
|
#include "ExpressionEvaluator.h"
|
|
|
|
enum BreakpointType
|
|
{
|
|
Global = 0,
|
|
Execute = 1,
|
|
ReadRam = 2,
|
|
WriteRam = 3,
|
|
ReadVram = 4,
|
|
WriteVram = 5,
|
|
};
|
|
|
|
class Breakpoint
|
|
{
|
|
private:
|
|
enum BreakpointTypeFlags
|
|
{
|
|
Global = 0,
|
|
Execute = 1,
|
|
ReadRam = 2,
|
|
WriteRam = 4,
|
|
ReadVram = 8,
|
|
WriteVram = 16,
|
|
};
|
|
|
|
public:
|
|
Breakpoint();
|
|
~Breakpoint();
|
|
|
|
bool Matches(uint32_t memoryAddr, AddressTypeInfo &info);
|
|
bool Matches(uint32_t memoryAddr, PpuAddressTypeInfo &info);
|
|
bool HasBreakpointType(BreakpointType type);
|
|
string GetCondition();
|
|
bool HasCondition();
|
|
void ClearCondition();
|
|
|
|
uint32_t GetId();
|
|
bool IsEnabled();
|
|
bool IsMarked();
|
|
|
|
private:
|
|
uint32_t _id;
|
|
DebugMemoryType _memoryType;
|
|
BreakpointTypeFlags _type;
|
|
int32_t _startAddr;
|
|
int32_t _endAddr;
|
|
bool _enabled;
|
|
bool _markEvent;
|
|
char _condition[1000];
|
|
}; |