thermosphere: add watchpoint + watchpoint merging code

This commit is contained in:
TuxSH
2019-08-07 21:38:40 +02:00
parent 9bc0ed2f70
commit 83c6e2f0e7
5 changed files with 278 additions and 8 deletions

View File

@@ -21,12 +21,17 @@
/// Structure to synchronize and keep track of watchpoints
typedef struct WatchpointManager {
DebugRegisterPair watchpoints[16];
DebugRegisterPair splitWatchpoints[16 * 8];
RecursiveSpinlock lock;
u32 numSplitWatchpoints;
u32 maxWatchpoints;
u32 maxSplitWatchpoints;
u16 allocationBitmap;
} WatchpointManager;
extern WatchpointManager g_watchpointManager;
void initWatchpoints(void);
DebugRegisterPair *findSplitWatchpoint(u64 addr, size_t size, WatchpointLoadStoreControl direction, bool strict);
bool addWatchpoint(u64 addr, size_t size, WatchpointLoadStoreControl direction);
bool removeWatchpoint(u64 addr, size_t size, WatchpointLoadStoreControl direction);