1#ifndef YAZE_APP_EMU_DEBUG_WATCHPOINT_MANAGER_H
2#define YAZE_APP_EMU_DEBUG_WATCHPOINT_MANAGER_H
7#include <unordered_map>
66 uint32_t
AddWatchpoint(uint32_t start_address, uint32_t end_address,
67 bool track_reads,
bool track_writes,
68 bool break_on_access =
false,
69 const std::string& description =
"");
92 uint8_t old_value, uint8_t new_value, uint64_t cycle_count);
105 std::vector<AccessLog>
GetHistory(uint32_t address,
int max_entries = 100)
const;
Manages memory watchpoints for debugging.
uint32_t AddWatchpoint(uint32_t start_address, uint32_t end_address, bool track_reads, bool track_writes, bool break_on_access=false, const std::string &description="")
Add a memory watchpoint.
bool ExportHistoryToCSV(const std::string &filepath) const
Export access history to CSV.
std::vector< Watchpoint > GetAllWatchpoints() const
Get all watchpoints.
std::unordered_map< uint32_t, Watchpoint > watchpoints_
std::vector< AccessLog > GetHistory(uint32_t address, int max_entries=100) const
Get access history for a specific address.
bool IsInRange(const Watchpoint &wp, uint32_t address) const
void ClearAll()
Clear all watchpoints.
~WatchpointManager()=default
WatchpointManager()=default
bool OnMemoryAccess(uint32_t pc, uint32_t address, bool is_write, uint8_t old_value, uint8_t new_value, uint64_t cycle_count)
Check if memory access should break/log.
void ClearHistory()
Clear history for all watchpoints.
void SetEnabled(uint32_t id, bool enabled)
Enable or disable a watchpoint.
void RemoveWatchpoint(uint32_t id)
Remove a watchpoint.
Main namespace for the application.
static constexpr size_t kMaxHistorySize
std::deque< AccessLog > history