#pragma once #include "stdafx.h" #include "DebuggerTypes.h" #include "IMemoryHandler.h" #include class Debugger; class MemoryAccessCounter { private: Debugger* _debugger; vector _readCounts[4]; vector _writeCounts[4]; vector _execCounts[4]; vector _readStamps[4]; vector _writeStamps[4]; vector _execStamps[4]; std::unordered_set _initWrites[4]; std::unordered_set _uninitReads[4]; vector& GetArray(MemoryOperationType operationType, AddressType addressType, bool stampArray); public: MemoryAccessCounter(Debugger* debugger); void ProcessMemoryAccess(AddressTypeInfo &addressInfo, MemoryOperationType operation, int32_t cpuCycle); void ResetCounts(); void GetAccessCounts(AddressType memoryType, MemoryOperationType operationType, uint32_t counts[], bool forUninitReads); void GetAccessCountsEx(uint32_t offset, uint32_t length, DebugMemoryType memoryType, MemoryOperationType operationType, int32_t counts[]); void GetAccessStamps(uint32_t offset, uint32_t length, DebugMemoryType memoryType, MemoryOperationType operationType, uint32_t stamps[]); };