libTriton  version 0.6 build 1362
MemoryAccess

Table of Contents

[python api] All information about the memory access python object.

Description


This object is used to represent a memory access.

Example

>>> ctxt.processing(inst)
True
>>> print inst
0x40000: mov ah, byte ptr [rdx + rcx*2 + 0x100]
>>> op1 = inst.getOperands()[1]
>>> print op1
[@0x100]:8 bv[7..0]
>>> print op1.getBaseRegister()
rdx:64 bv[63..0]
>>> print op1.getIndexRegister()
rcx:64 bv[63..0]
>>> print op1.getScale()
0x2:64 bv[63..0]
>>> print op1.getDisplacement()
0x100:64 bv[63..0]
>>> print op1.getLeaAst()
(bvadd (_ bv0 64) (bvadd (bvmul (_ bv0 64) (_ bv2 64)) (_ bv256 64)))
>>> print hex(op1.getLeaAst().evaluate())
0x100L
>>> print hex(op1.getAddress())
0x100L
>>> print op1.getSize()
1

Constructor

>>> mem = MemoryAccess(0x400f4d3, 8)
>>> print mem
[@0x400f4d3]:64 bv[63..0]
>>> hex(mem.getAddress())
'0x400f4d3L'
>>> mem.getSize()
8L

Python API - Methods of the MemoryAccess class