Serialization module

Maat's serialization utilities.

Contents

❱   Classes

class maat::serial::SimpleStateManager
Helper class for dynamically saving and loading states into a single MaatEngine.

template<typename T>
struct maat::serial::Bits

template<typename T>
struct maat::serial::Buffer

template<typename T>
struct maat::serial::OptionalBits

template<typename T>
struct maat::serial::ContainerBits

class maat::serial::Serializable
Virtual interface that serializable classes must implement.

class maat::serial::Empty
Wrap an empty object for reading/writing to serializer/deserializer.

class maat::serial::Serializer

class maat::serial::Deserializer

❱   Enums

enum ClassId: uid_t { ARCH_NONE =1, ARCH_X64, ARCH_X86, BRANCH, CONSTRAINT, CPU, CPU_CONTEXT, ENV_EMULATOR, ENV_LINUX_EMULATOR, ENV_SNAPSHOT, EXPR_BINOP, EXPR_CONCAT, EXPR_CST, EXPR_EXTRACT, EXPR_ITE, EXPR_UNOP, EXPR_VAR, FILE_ACCESSOR, FILE_SYSTEM, FS_DIRECTORY, INFO, INST_LOCATION, INTERVAL_TREE, LIFTER, MAAT_ENGINE, MEM_ABSTRACT_BUFFER, MEM_ACCESS, MEM_CONCRETE_BUFFER, MEM_ENGINE, MEM_MAP, MEM_MAP_MANAGER, MEM_PAGE_MANAGER, MEM_SEGMENT, MEM_STATUS_BITMAP, NUMBER, PAGE_SET, PATH_MANAGER, PHYSICAL_FILE, PROCESS_INFO, REG_ACCESS, SAVED_MEM_STATE, SETTINGS, SIMPLE_INTERVAL, SNAPSHOT, SNAPSHOT_MANAGER, SNAPSHOT_MANAGER_ENV, SYMBOL, SYMBOL_MANAGER, SYMBOLIC_MEM_ENGINE, SYMBOLIC_MEM_WRITE, TMP_CONTEXT, VALUE, VALUE_SET, VAR_CONTEXT }

❱   Typedefs

using uid_t = uint16_t
Unique identifier of a serialized object.

❱   Functions

template<typename T>
static auto bits(T& t) -> Bits<T&>
Wrap a variable for reading from a deserializer stream.

template<typename T>
static auto bits(const T& t) -> Bits<const T&>
Wrap a variable for writing to a serializer stream.

static auto buffer(char* buf, int cnt) -> Buffer<char>
Wrap a buffer for reading from a deserializer stream.

static auto buffer(const char* buf, int cnt) -> Buffer<const char>
Wrap a buffer for writing to a serializer stream.

template<typename T>
static auto optional_bits(std::optional<T>& t) -> OptionalBits<std::optional<T>&>
Wrap a variable for reading from a deserializer stream.

template<typename T>
static auto optional_bits(const std::optional<T>& t) -> OptionalBits<const std::optional<T>&>
Wrap a variable for writing to a deserializer stream.

template<typename T, template<typename ELEM, typename ALLOC=std::allocator<ELEM>> class C>
static auto container_bits(C<T>& t) -> ContainerBits<C<T>&>
Wrap a POD type container for reading from a deserializer stream.

template<typename T, template<typename ELEM, typename ALLOC=std::allocator<ELEM>> class C>
static auto container_bits(const C<T>& t) -> ContainerBits<const C<T>&>
Wrap a POD type container for writing to a deserializer stream.

❱   Enum documentation

enum ClassId: uid_t

UID for Maat classes. The UID is used to store the class of a serialized object and reconstruct the appropriate object when deserializing. NULL UID is reserved for error detection