Public Member Functions | |
def | __init__ |
def | get_mem_array |
def | __getitem__ |
def | get |
def | is_little_endian |
def | is_big_endian |
Public Attributes | |
endianness | |
mems | |
name | |
Memory abstration for TranslatorZ3. Memory elements are only accessed, never written. To give a concrete value for a given memory cell in a solver, add "mem32.get(address, size) == <value>" constraints to your equation. The endianness of memory accesses is handled accordingly to the "endianness" attribute. Note: Will have one memory space for each addressing size used. For example, if memory is accessed via 32 bits values and 16 bits values, these access will not occur in the same address space.
def miasm2.ir.translators.z3_ir.Z3Mem.__init__ | ( | self, | |
endianness = "<" , |
|||
name = "mem" |
|||
) |
Initializes a Z3Mem object with a given @name and @endianness. @endianness: Endianness of memory representation. '<' for little endian, '>' for big endian. @name: name of memory Arrays generated. They will be named name+str(address size) (for example mem32, mem16...).
Definition at line 27 of file z3_ir.py.
def miasm2.ir.translators.z3_ir.Z3Mem.__getitem__ | ( | self, | |
addr | |||
) |
One byte memory access. Different address sizes with the same value will result in different memory accesses. @addr: a z3 BitVec, the address to read. Return a z3 BitVec of size 8 bits representing a memory access.
Definition at line 56 of file z3_ir.py.
def miasm2.ir.translators.z3_ir.Z3Mem.get | ( | self, | |
addr, | |||
size | |||
) |
Memory access at address @addr of size @size. @addr: a z3 BitVec, the address to read. @size: int, size of the read in bits. Return a z3 BitVec of size @size representing a memory access.
Definition at line 66 of file z3_ir.py.
def miasm2.ir.translators.z3_ir.Z3Mem.get_mem_array | ( | self, | |
size | |||
) |
Returns a z3 Array used internally to represent memory for addresses of size @size. @size: integer, size in bit of addresses in the memory to get. Return a z3 Array: BitVecSort(size) -> BitVecSort(8).
Definition at line 40 of file z3_ir.py.
def miasm2.ir.translators.z3_ir.Z3Mem.is_big_endian | ( | self | ) |
def miasm2.ir.translators.z3_ir.Z3Mem.is_little_endian | ( | self | ) |