libTriton  version 0.6 build 1362
Register

Table of Contents

[python api] All information about the Register python object.

Description


This object is used to represent a register operand according to the CPU architecture.

Example

>>> ctxt.processing(inst)
True
>>> print inst
0x40000: mov ah, byte ptr [rdx + rcx*2 + 0x100]
>>> op0 = inst.getOperands()[0]
>>> print op0
ah:8 bv[15..8]
>>> op0.getName()
'ah'
>>> op0.getSize()
1L
>>> op0.getBitSize()
8L
>>> ctxt.getParentRegister(op0).getName()
'rax'

Constructor

>>> ah = ctxt.getRegister(REG.X86_64.AH)
>>> print ah
ah:8 bv[15..8]
>>> print ah.getBitSize()
8
>>> print ctxt.registers.rax
rax:64 bv[63..0]

Python API - Methods of the Register class