9#include <range/v3/algorithm/fill.hpp>
10#include <range/v3/range/conversion.hpp>
11#include <range/v3/to_container.hpp>
12#include <range/v3/view/take_while.hpp>
13#include <range/v3/view/transform.hpp>
21template <std::
size_t NumBytes>
27 std::size_t
size()
const;
29 std::string
str()
const;
34 static std::uintptr_t get_alloced_address(
Program& prog) {
return prog.
alloc_mem(NumBytes); }
37template <std::
size_t NumBytes>
42template <std::
size_t NumBytes>
47 ranges::fill(buf,
byte);
54template <std::
size_t NumBytes>
62 return byte_str | ranges::views::transform([](std::byte
byte) {
return std::to_integer<char>(
byte); }) |
63 ranges::views::take_while([](
char chr) {
return chr != 0; }) | ranges::to<std::string>();
66template <std::
size_t NumBytes>
Definition asm_buffer.hpp:23
AsmBuffer(Program &prog)
Definition asm_buffer.hpp:67
std::size_t size() const
Definition asm_buffer.hpp:38
ByteArray< NumBytes > fill(std::byte byte) const
Definition asm_buffer.hpp:43
std::string str() const
Definition asm_buffer.hpp:55
Definition asm_data.hpp:20
Definition byte_array.hpp:23
Base class for interacting with a tracee's memory in a variety of ways at a (relatively) high-level F...
Definition memory_io_base.hpp:23
Result< T > read(std::uintptr_t address)
Definition memory_io_base.hpp:30
Definition program.hpp:31
std::uintptr_t alloc_mem(std::size_t amt)
Definition program.cpp:87
#define TRY_OR_THROW(expr,...)
Definition macros.hpp:11
Definition asm_buffer.hpp:19