class
MemSegmentContents
This class is a wrapper that represents a mapped memory area. It can be used transparently to write and read both abstract and concrete values. To do so, it uses a concrete buffer, an abstract buffer, and a memory status bitmap to keep track of what is abstract and what is concrete
❱ Base classes
- class Serializable
- Virtual interface that serializable classes must implement.
❱ Constructors, destructors, conversion operators
-
MemSegment(addr_
t start, addr_ t end, const std::string& name = "", bool is_engine_special_segment = false) - Constructor.
❱ Public functions
-
auto size() -> addr_
t - Number of bytes.
-
void extend_after(addr_
t nb_bytes) - Extend the buffer to make it represent 'nb_bytes' more bytes of memory. The new bytes are inserted at the end of the buffer.
-
void extend_before(addr_
t nb_bytes) - Extend the buffer to make it represent 'nb_bytes' more bytes of memory. The new bytes are inserted at the beginning of the segment.
-
auto read(addr_
t addr, unsigned int nb_bytes) -> Value - Read memory.
-
void read(Value& res,
addr_
t addr, unsigned int nb_bytes) - Read memory.
-
void write(addr_
t addr, const Value& val, VarContext& ctx) - Write value.
-
void write(addr_
t addr, cst_ t val, unsigned int nb_bytes) - Write concrete value.
-
void write(addr_
t addr, uint8_t* src, int nb_bytes) - Write concrete buffer.
-
void write(addr_
t addr, const std::vector<Value>& buf, VarContext& ctx) - Write buffer of values.
- void symbolic_ptr_read(Value& res, const Expr& addr, ValueSet& addr_value_set, unsigned int nb_bytes, const Expr& base)
- Read memory at the address pointed by a symbolic pointer.
-
void abstract_snapshot(addr_
t& addr, int& nb_bytes, abstract_ mem_ chunk_ t& snap) - (Internal) Takes an abstract snapshot. If the segment finishes before 'nb_bytes', 'addr' and 'nb_bytes' are updated to finish the snapshot in the next segment
-
auto concrete_snapshot(addr_
t& addr, int& nb_bytes) -> cst_ t - (Internal) Takes a concrete snapshot. If the segment finishes before 'nb_bytes', 'addr' and 'nb_bytes' are updated to finish the snapshot in the next segment. Shouldn't be called with nb_bytes > 8
-
auto raw_mem_at(addr_
t addr) -> uint8_t* - Returns a raw pointer to the concrete memory buffer at address 'addr'.
-
auto is_abstract_until(addr_
t start, addr_ t max) -> addr_ t - Returns the first address holding a non-abstract value starting from 'start' and before address 'start+max'.
-
auto is_concrete_until(addr_
t start, addr_ t max) -> addr_ t - Returns the first address holding an abstract value starting from 'start' and before address 'start+max'.
-
auto is_identical_until(addr_
t start, cst_ t byte) -> addr_ t - Finds the first address holding a value different that 'byte' starting from 'start'.
- auto class_uid() const -> uid_t virtual
- Return the class uid (see ClassId enum)
-
void dump(serial::
Serializer&) const virtual - Dump the object contents in a serializer stream.
-
void load(serial::
Deserializer&) virtual - Restore an object from a deserializer stream.