AsmGrader 0.0.0
Loading...
Searching...
No Matches
asmgrader::MemoryIOBase Class Referenceabstract

Base class for interacting with a tracee's memory in a variety of ways at a (relatively) high-level Functionally a data pipeline between the tracer and tracee. More...

#include <memory_io_base.hpp>

Inheritance diagram for asmgrader::MemoryIOBase:
[legend]

Public Member Functions

 MemoryIOBase (pid_t pid)
 
virtual ~MemoryIOBase ()=default
 
template<MemoryReadSupported T>
Result< T > read (std::uintptr_t address)
 
template<MemoryReadSupported T>
requires std::is_trivial_v<T>
Result< std::vector< T > > read_array (std::uintptr_t address, std::size_t size)
 
template<MemoryReadSupported T>
requires std::is_trivial_v<T>
Result< std::vector< T > > read_array (std::uintptr_t address, std::function< bool(const T &)> until_predicate)
 
Result< ByteVectorread_bytes (std::uintptr_t address, std::size_t length)
 
template<MemoryReadSupported T>
Result< remove_all_pointers_t< T > > read_deref_all (std::uintptr_t address)
 
template<MemoryWriteSupported T>
Result< std::size_t > write (std::uintptr_t address, const T &data)
 
pid_t get_pid () const
 

Friends

template<typename T >
struct MemoryIOSerde
 

Detailed Description

Base class for interacting with a tracee's memory in a variety of ways at a (relatively) high-level Functionally a data pipeline between the tracer and tracee.

A precondition to essentially every operation performed by this class is that the tracee is stopped

Constructor & Destructor Documentation

◆ MemoryIOBase()

asmgrader::MemoryIOBase::MemoryIOBase ( pid_t pid)
inlineexplicit

◆ ~MemoryIOBase()

virtual asmgrader::MemoryIOBase::~MemoryIOBase ( )
virtualdefault

Member Function Documentation

◆ get_pid()

pid_t asmgrader::MemoryIOBase::get_pid ( ) const
inline

◆ read()

template<MemoryReadSupported T>
Result< T > asmgrader::MemoryIOBase::read ( std::uintptr_t address)
inline

◆ read_array() [1/2]

template<MemoryReadSupported T>
requires std::is_trivial_v<T>
Result< std::vector< T > > asmgrader::MemoryIOBase::read_array ( std::uintptr_t address,
std::function< bool(const T &)> until_predicate )
inline

◆ read_array() [2/2]

template<MemoryReadSupported T>
requires std::is_trivial_v<T>
Result< std::vector< T > > asmgrader::MemoryIOBase::read_array ( std::uintptr_t address,
std::size_t size )
inline

◆ read_bytes()

Result< ByteVector > asmgrader::MemoryIOBase::read_bytes ( std::uintptr_t address,
std::size_t length )
inline

◆ read_deref_all()

template<MemoryReadSupported T>
Result< remove_all_pointers_t< T > > asmgrader::MemoryIOBase::read_deref_all ( std::uintptr_t address)
inline

◆ write()

template<MemoryWriteSupported T>
Result< std::size_t > asmgrader::MemoryIOBase::write ( std::uintptr_t address,
const T & data )
inline

Friends And Related Symbol Documentation

◆ MemoryIOSerde

template<typename T >
friend struct MemoryIOSerde
friend

The documentation for this class was generated from the following files: