angr.storage.memory_mixins.memory_mixin¶
- class angr.storage.memory_mixins.memory_mixin.MemoryMixin¶
Bases:
SimStatePlugin,GenericMemoryMixin is the base class for the memory model in angr. It provides a set of methods that should be implemented by memory models. This is done using mixins, where each mixin handles some specific feature of the memory model, only overriding methods that it needs to implement its function. The memory model class itself then combines a set of mixins using inheritence to form the final memory model class.
- property category: str¶
reg, mem, or file.
- Type:
Return the category of this SimMemory instance. It can be one of the three following categories
- find(addr, data, max_search, **kwargs)¶
- load(addr, size=None, **kwargs)¶
- Return type:
TypeVar(OutData)- Parameters:
addr (Addr)
size (InData | None)
- store(addr, data, size=None, **kwargs)¶
- Return type:
- Parameters:
addr (Addr)
data (InData)
size (InData | None)
- permissions(addr, permissions=None, **kwargs)¶
- Return type:
- Parameters:
addr (Addr)
permissions (int | claripy.ast.BV | None)
- map_region(addr, length, permissions, *, init_zero=False, **kwargs)¶
- Parameters:
addr (Addr)
length (int)
permissions (int | claripy.ast.BV)
init_zero (bool)
- concrete_load(addr, size, writing=False, **kwargs)¶
Set SUPPORTS_CONCRETE_LOAD to True and implement concrete_load if reading concrete bytes is faster in this memory model.
- Parameters:
addr – The address to load from.
size – Size of the memory read.
writing
- Return type:
- Returns:
A memoryview into the loaded bytes.
- erase(addr, size=None, **kwargs)¶
Set [addr:addr+size) to uninitialized. In many cases this will be faster than overwriting those locations with new values. This is commonly used during static data flow analysis.
- copy_contents(dst, src, size, condition=None, **kwargs)¶
Override this method to provide faster copying of large chunks of data.