1#ifndef YAZE_APP_EMU_DEBUG_BREAKPOINT_MANAGER_H
2#define YAZE_APP_EMU_DEBUG_BREAKPOINT_MANAGER_H
7#include <unordered_map>
68 const std::string& condition =
"",
69 const std::string& description =
"");
98 uint8_t value, uint32_t pc);
136 uint32_t address, uint8_t value);
Manages CPU and SPC700 breakpoints for debugging.
const Breakpoint * last_hit_
bool ShouldBreakOnExecute(uint32_t pc, CpuType cpu)
Check if execution should break at this address.
void RemoveBreakpoint(uint32_t id)
Remove a breakpoint by ID.
bool ShouldBreakOnMemoryAccess(uint32_t address, bool is_write, uint8_t value, uint32_t pc)
Check if execution should break on memory access.
void ClearAll()
Clear all breakpoints.
void SetEnabled(uint32_t id, bool enabled)
Enable or disable a breakpoint.
std::vector< Breakpoint > GetAllBreakpoints() const
Get all breakpoints.
bool EvaluateCondition(const std::string &condition, uint32_t pc, uint32_t address, uint8_t value)
void ResetHitCounts()
Reset hit counts for all breakpoints.
const Breakpoint * GetLastHit() const
Get the last breakpoint that was hit.
~BreakpointManager()=default
std::vector< Breakpoint > GetBreakpoints(CpuType cpu) const
Get breakpoints for specific CPU.
std::unordered_map< uint32_t, Breakpoint > breakpoints_
uint32_t AddBreakpoint(uint32_t address, Type type, CpuType cpu, const std::string &condition="", const std::string &description="")
Add a new breakpoint.
BreakpointManager()=default
Main namespace for the application.
std::function< bool(uint32_t pc, uint32_t address, uint8_t value)> callback