Demonstrates memory debugging capabilities for AI agents. More...

Public Member Functions | |
| MemoryDebuggingExample (emu::Emulator *emulator) | |
| absl::Status | TrackPlayerHealth () |
| absl::Status | MonitorInventory () |
| absl::Status | DebugSpriteData () |
| absl::Status | TrackDMATransfers () |
| absl::Status | AnalyzeWatchpointData () |
| absl::Status | ExportWatchpointHistory (const std::string &filename) |
| void | ClearDebugging () |
| absl::Status | RunMemoryDebuggingSession () |
Private Attributes | |
| emu::Emulator * | emulator_ |
| emu::BreakpointManager & | breakpoint_mgr_ |
| emu::WatchpointManager & | watchpoint_mgr_ |
Demonstrates memory debugging capabilities for AI agents.
This example shows how to:
Definition at line 32 of file memory_debugging_example.cc.
|
inline |
Definition at line 34 of file memory_debugging_example.cc.
|
inline |
Example 1: Track writes to the player's health address
Definition at line 42 of file memory_debugging_example.cc.
References yaze::emu::BreakpointManager::AddBreakpoint(), yaze::emu::WatchpointManager::AddWatchpoint(), breakpoint_mgr_, yaze::emu::BreakpointManager::CPU_65816, LOG_INFO, watchpoint_mgr_, and yaze::emu::BreakpointManager::WRITE.
Referenced by RunMemoryDebuggingSession().

|
inline |
Example 2: Monitor item inventory changes
Definition at line 77 of file memory_debugging_example.cc.
References yaze::emu::WatchpointManager::AddWatchpoint(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Example 3: Debug sprite corruption by tracking sprite data
Definition at line 100 of file memory_debugging_example.cc.
References yaze::emu::WatchpointManager::AddWatchpoint(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Example 4: Track DMA transfers
Definition at line 123 of file memory_debugging_example.cc.
References yaze::emu::WatchpointManager::AddWatchpoint(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Analyze collected watchpoint data
Definition at line 146 of file memory_debugging_example.cc.
References yaze::emu::WatchpointManager::GetAllWatchpoints(), yaze::emu::WatchpointManager::GetHistory(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Export watchpoint data for external analysis
Definition at line 193 of file memory_debugging_example.cc.
References yaze::emu::WatchpointManager::ExportHistoryToCSV(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Clear all debugging state
Definition at line 204 of file memory_debugging_example.cc.
References breakpoint_mgr_, yaze::emu::BreakpointManager::ClearAll(), yaze::emu::WatchpointManager::ClearAll(), LOG_INFO, and watchpoint_mgr_.
Referenced by RunMemoryDebuggingSession().

|
inline |
Example usage in an AI agent
Definition at line 213 of file memory_debugging_example.cc.
References AnalyzeWatchpointData(), ClearDebugging(), DebugSpriteData(), emulator_, ExportWatchpointHistory(), LOG_INFO, MonitorInventory(), RETURN_IF_ERROR, yaze::emu::Emulator::set_debugging(), TrackDMATransfers(), and TrackPlayerHealth().
|
private |
Definition at line 242 of file memory_debugging_example.cc.
Referenced by RunMemoryDebuggingSession().
|
private |
Definition at line 243 of file memory_debugging_example.cc.
Referenced by ClearDebugging(), and TrackPlayerHealth().
|
private |
Definition at line 244 of file memory_debugging_example.cc.
Referenced by AnalyzeWatchpointData(), ClearDebugging(), DebugSpriteData(), ExportWatchpointHistory(), MonitorInventory(), TrackDMATransfers(), and TrackPlayerHealth().