libTriton version 1.0 build 1592
|
This class is used to represent a memory access. More...
#include <memoryAccess.hpp>
Public Member Functions | |
TRITON_EXPORT | MemoryAccess () |
Constructor. | |
TRITON_EXPORT | MemoryAccess (triton::uint64 address, triton::uint32 size) |
Constructor. | |
TRITON_EXPORT | MemoryAccess (const MemoryAccess &other) |
Constructor by copy. | |
TRITON_EXPORT triton::ast::SharedAbstractNode | getLeaAst (void) const |
Returns the AST of the memory access (LEA). | |
TRITON_EXPORT triton::uint64 | getAddress (void) const |
Returns the address of the memory. | |
TRITON_EXPORT triton::uint64 | getPcRelative (void) const |
LEA - Gets pc relative. | |
TRITON_EXPORT triton::uint32 | getBitSize (void) const |
Returns the size (in bits) of the memory vector. | |
TRITON_EXPORT triton::uint32 | getSize (void) const |
Returns the size (in bytes) of the memory vector. | |
TRITON_EXPORT triton::arch::operand_e | getType (void) const |
Returns the type of the operand (triton::arch::OPERAND_MEMORY). | |
TRITON_EXPORT triton::arch::Register & | getSegmentRegister (void) |
LEA - Returns the segment register operand. | |
TRITON_EXPORT triton::arch::Register & | getBaseRegister (void) |
LEA - Returns the base register operand. | |
TRITON_EXPORT triton::arch::Register & | getIndexRegister (void) |
LEA - Returns the index register operand. | |
TRITON_EXPORT triton::arch::Immediate & | getDisplacement (void) |
LEA - Returns the displacement operand. | |
TRITON_EXPORT triton::arch::Immediate & | getScale (void) |
LEA - Returns the scale operand. | |
TRITON_EXPORT const triton::arch::Register & | getConstSegmentRegister (void) const |
LEA - Returns the segment register operand. | |
TRITON_EXPORT const triton::arch::Register & | getConstBaseRegister (void) const |
LEA - Returns the base register operand. | |
TRITON_EXPORT const triton::arch::Register & | getConstIndexRegister (void) const |
LEA - Returns the index register operand. | |
TRITON_EXPORT const triton::arch::Immediate & | getConstDisplacement (void) const |
LEA - Returns the displacement operand. | |
TRITON_EXPORT const triton::arch::Immediate & | getConstScale (void) const |
LEA - Returns the scale operand. | |
TRITON_EXPORT bool | isOverlapWith (const MemoryAccess &other) const |
Returns true if other and self overlap. | |
TRITON_EXPORT void | setAddress (triton::uint64 addr) |
Sets the address of the memory access. | |
TRITON_EXPORT void | setPcRelative (triton::uint64 addr) |
LEA - Sets pc relative. | |
TRITON_EXPORT void | setSegmentRegister (const triton::arch::Register &segment) |
LEA - Sets the segment register operand. | |
TRITON_EXPORT void | setBaseRegister (const triton::arch::Register &base) |
LEA - Sets the base register operand. | |
TRITON_EXPORT void | setIndexRegister (const triton::arch::Register &index) |
LEA - Sets the index register operand. | |
TRITON_EXPORT void | setDisplacement (const triton::arch::Immediate &displacement) |
LEA - Sets the displacement operand. | |
TRITON_EXPORT void | setScale (const triton::arch::Immediate &scale) |
LEA - Sets the scale operand. | |
TRITON_EXPORT void | setLeaAst (const triton::ast::SharedAbstractNode &ast) |
Sets the AST of the memory access (LEA). | |
TRITON_EXPORT MemoryAccess & | operator= (const MemoryAccess &other) |
Copies a MemoryAccess. | |
Public Member Functions inherited from triton::arch::BitsVector | |
TRITON_EXPORT | BitsVector () |
Constructor. | |
TRITON_EXPORT | BitsVector (triton::uint32 high, triton::uint32 low) |
Constructor. | |
TRITON_EXPORT | BitsVector (const triton::arch::BitsVector &other) |
Constructor by copy. | |
TRITON_EXPORT BitsVector & | operator= (const BitsVector &other) |
Copy a BitsVector. | |
TRITON_EXPORT triton::uint32 | getHigh (void) const |
Returns the highest bit. | |
TRITON_EXPORT triton::uint32 | getLow (void) const |
Returns the lower bit. | |
TRITON_EXPORT triton::uint32 | getVectorSize (void) const |
Returns the size in bits of the vector. | |
TRITON_EXPORT triton::uint512 | getMaxValue (void) const |
Returns the max possible value of the bitvector. | |
TRITON_EXPORT void | setHigh (triton::uint32 v) |
Sets the highest bit position. | |
TRITON_EXPORT void | setLow (triton::uint32 v) |
Sets the lower bit position. | |
TRITON_EXPORT void | setBits (triton::uint32 high, triton::uint32 low) |
Sets the bits (high, low) position. | |
Protected Attributes | |
triton::uint64 | address |
The memory' address. | |
triton::uint64 | pcRelative |
Contains the pc relative if it exists. | |
triton::arch::Register | segmentReg |
LEA - If the operand has a segment register, this attribute is filled. | |
triton::arch::Register | baseReg |
LEA - If the operand has a base register, this attribute is filled. | |
triton::arch::Register | indexReg |
LEA - If the operand has an index register, this attribute is filled. | |
triton::arch::Immediate | displacement |
LEA - If the operand has a displacement, this attribute is filled. | |
triton::arch::Immediate | scale |
LEA - If the operand has a scale, this attribute is filled. | |
triton::ast::SharedAbstractNode | leaAst |
The AST of the memory access (LEA). | |
Protected Attributes inherited from triton::arch::BitsVector | |
triton::uint32 | high |
The highest bit of the bitvector. | |
triton::uint32 | low |
The lower bit of the bitvector. | |
This class is used to represent a memory access.
Definition at line 40 of file memoryAccess.hpp.
triton::arch::MemoryAccess::MemoryAccess | ( | ) |
Constructor.
Definition at line 17 of file memoryAccess.cpp.
triton::arch::MemoryAccess::MemoryAccess | ( | triton::uint64 | address, |
triton::uint32 | size ) |
Constructor.
Definition at line 24 of file memoryAccess.cpp.
triton::arch::MemoryAccess::MemoryAccess | ( | const MemoryAccess & | other | ) |
Constructor by copy.
Definition at line 45 of file memoryAccess.cpp.
triton::uint64 triton::arch::MemoryAccess::getAddress | ( | void | ) | const |
Returns the address of the memory.
Definition at line 51 of file memoryAccess.cpp.
triton::arch::Register & triton::arch::MemoryAccess::getBaseRegister | ( | void | ) |
LEA - Returns the base register operand.
Definition at line 86 of file memoryAccess.cpp.
triton::uint32 triton::arch::MemoryAccess::getBitSize | ( | void | ) | const |
Returns the size (in bits) of the memory vector.
Definition at line 66 of file memoryAccess.cpp.
const triton::arch::Register & triton::arch::MemoryAccess::getConstBaseRegister | ( | void | ) | const |
LEA - Returns the base register operand.
Definition at line 111 of file memoryAccess.cpp.
const triton::arch::Immediate & triton::arch::MemoryAccess::getConstDisplacement | ( | void | ) | const |
LEA - Returns the displacement operand.
Definition at line 121 of file memoryAccess.cpp.
const triton::arch::Register & triton::arch::MemoryAccess::getConstIndexRegister | ( | void | ) | const |
LEA - Returns the index register operand.
Definition at line 116 of file memoryAccess.cpp.
const triton::arch::Immediate & triton::arch::MemoryAccess::getConstScale | ( | void | ) | const |
LEA - Returns the scale operand.
Definition at line 126 of file memoryAccess.cpp.
const triton::arch::Register & triton::arch::MemoryAccess::getConstSegmentRegister | ( | void | ) | const |
LEA - Returns the segment register operand.
Definition at line 106 of file memoryAccess.cpp.
triton::arch::Immediate & triton::arch::MemoryAccess::getDisplacement | ( | void | ) |
LEA - Returns the displacement operand.
Definition at line 96 of file memoryAccess.cpp.
triton::arch::Register & triton::arch::MemoryAccess::getIndexRegister | ( | void | ) |
LEA - Returns the index register operand.
Definition at line 91 of file memoryAccess.cpp.
triton::ast::SharedAbstractNode triton::arch::MemoryAccess::getLeaAst | ( | void | ) | const |
Returns the AST of the memory access (LEA).
Definition at line 56 of file memoryAccess.cpp.
triton::uint64 triton::arch::MemoryAccess::getPcRelative | ( | void | ) | const |
LEA - Gets pc relative.
Definition at line 61 of file memoryAccess.cpp.
triton::arch::Immediate & triton::arch::MemoryAccess::getScale | ( | void | ) |
LEA - Returns the scale operand.
Definition at line 101 of file memoryAccess.cpp.
triton::arch::Register & triton::arch::MemoryAccess::getSegmentRegister | ( | void | ) |
LEA - Returns the segment register operand.
Definition at line 81 of file memoryAccess.cpp.
triton::uint32 triton::arch::MemoryAccess::getSize | ( | void | ) | const |
Returns the size (in bytes) of the memory vector.
Definition at line 71 of file memoryAccess.cpp.
triton::arch::operand_e triton::arch::MemoryAccess::getType | ( | void | ) | const |
Returns the type of the operand (triton::arch::OPERAND_MEMORY).
Definition at line 76 of file memoryAccess.cpp.
bool triton::arch::MemoryAccess::isOverlapWith | ( | const MemoryAccess & | other | ) | const |
Returns true if other
and self
overlap.
Definition at line 131 of file memoryAccess.cpp.
MemoryAccess & triton::arch::MemoryAccess::operator= | ( | const MemoryAccess & | other | ) |
Copies a MemoryAccess.
Definition at line 178 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setAddress | ( | triton::uint64 | addr | ) |
Sets the address of the memory access.
Definition at line 138 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setBaseRegister | ( | const triton::arch::Register & | base | ) |
LEA - Sets the base register operand.
Definition at line 153 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setDisplacement | ( | const triton::arch::Immediate & | displacement | ) |
LEA - Sets the displacement operand.
Definition at line 163 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setIndexRegister | ( | const triton::arch::Register & | index | ) |
LEA - Sets the index register operand.
Definition at line 158 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setLeaAst | ( | const triton::ast::SharedAbstractNode & | ast | ) |
Sets the AST of the memory access (LEA).
Definition at line 173 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setPcRelative | ( | triton::uint64 | addr | ) |
LEA - Sets pc relative.
Definition at line 143 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setScale | ( | const triton::arch::Immediate & | scale | ) |
LEA - Sets the scale operand.
Definition at line 168 of file memoryAccess.cpp.
void triton::arch::MemoryAccess::setSegmentRegister | ( | const triton::arch::Register & | segment | ) |
LEA - Sets the segment register operand.
Definition at line 148 of file memoryAccess.cpp.
|
protected |
The memory' address.
Definition at line 43 of file memoryAccess.hpp.
|
protected |
LEA - If the operand has a base register, this attribute is filled.
Definition at line 52 of file memoryAccess.hpp.
|
protected |
LEA - If the operand has a displacement, this attribute is filled.
Definition at line 58 of file memoryAccess.hpp.
|
protected |
LEA - If the operand has an index register, this attribute is filled.
Definition at line 55 of file memoryAccess.hpp.
|
protected |
The AST of the memory access (LEA).
Definition at line 64 of file memoryAccess.hpp.
|
protected |
Contains the pc relative if it exists.
Definition at line 46 of file memoryAccess.hpp.
|
protected |
LEA - If the operand has a scale, this attribute is filled.
Definition at line 61 of file memoryAccess.hpp.
|
protected |
LEA - If the operand has a segment register, this attribute is filled.
Definition at line 49 of file memoryAccess.hpp.