This class is responsible for recording memory accesses to an Arion instance.
More...
#include <memory_manager.hpp>
|
| static bool | write_mem_hook (std::shared_ptr< Arion > arion, uc_mem_type type, uint64_t addr, int size, int64_t val, void *user_data) |
| |
This class is responsible for recording memory accesses to an Arion instance.
◆ MemoryRecorder()
| arion::MemoryRecorder::MemoryRecorder |
( |
std::weak_ptr< Arion > |
arion | ) |
|
|
inline |
◆ add_edit()
| void arion::MemoryRecorder::add_edit |
( |
std::shared_ptr< ARION_MEM_EDIT > |
edit | ) |
|
|
private |
Records a new memory access.
- Parameters
-
| [in] | edit | The memory access to record. |
◆ clear()
| void arion::MemoryRecorder::clear |
( |
| ) |
|
Clears all recorded memory accesses.
◆ get_edits()
| std::vector< std::shared_ptr< ARION_MEM_EDIT > > arion::MemoryRecorder::get_edits |
( |
| ) |
|
Retrieves all recorded memory accesses.
- Returns
- A vector of ARION_MEM_EDIT instances representing the recorded memory accesses.
◆ initialize()
| static std::unique_ptr< MemoryRecorder > arion::MemoryRecorder::initialize |
( |
std::weak_ptr< Arion > |
arion | ) |
|
|
static |
Instanciates and initializes new MemoryRecorder objects with some parameters.
- Parameters
-
| [in] | arion | The Arion instance being recorded. |
- Returns
- A new Memory recorder instance.
◆ start()
| void arion::MemoryRecorder::start |
( |
| ) |
|
Starts recording memory accesses.
◆ stop()
| void arion::MemoryRecorder::stop |
( |
| ) |
|
Stops recording memory accesses.
◆ write_mem_hook()
| static bool arion::MemoryRecorder::write_mem_hook |
( |
std::shared_ptr< Arion > |
arion, |
|
|
uc_mem_type |
type, |
|
|
uint64_t |
addr, |
|
|
int |
size, |
|
|
int64_t |
val, |
|
|
void * |
user_data |
|
) |
| |
|
staticprivate |
The function called when a memory write occurs to the associated Arion instance.
- Parameters
-
| [in] | arion | Arion instance that triggered the hook. |
| [in] | type | Type of memory being access. |
| [in] | addr | Memory address where the write occurred. |
| [in] | size | Size of the write in bytes. |
| [in] | val | Value written to memory. |
| [in] | user_data | Optional user-defined data passed to the hook. |
◆ arion
| std::weak_ptr<Arion> arion::MemoryRecorder::arion |
|
private |
The Arion instance being recorded.
◆ edits
| std::vector<std::shared_ptr<ARION_MEM_EDIT> > arion::MemoryRecorder::edits |
|
private |
Recorded memory accesses.
◆ started
| bool arion::MemoryRecorder::started = false |
|
private |
Indicates whether recording is currently active.
◆ write_mem_hook_id
| HOOK_ID arion::MemoryRecorder::write_mem_hook_id |
|
private |
ID of the hook used to record memory writes.
The documentation for this class was generated from the following file: