libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
triton::arch::MemoryAccess Class Reference

This class is used to represent a memory access. More...

#include <memoryAccess.hpp>

Inheritance diagram for triton::arch::MemoryAccess:

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::RegistergetSegmentRegister (void)
 LEA - Returns the segment register operand.
 
TRITON_EXPORT triton::arch::RegistergetBaseRegister (void)
 LEA - Returns the base register operand.
 
TRITON_EXPORT triton::arch::RegistergetIndexRegister (void)
 LEA - Returns the index register operand.
 
TRITON_EXPORT triton::arch::ImmediategetDisplacement (void)
 LEA - Returns the displacement operand.
 
TRITON_EXPORT triton::arch::ImmediategetScale (void)
 LEA - Returns the scale operand.
 
TRITON_EXPORT const triton::arch::RegistergetConstSegmentRegister (void) const
 LEA - Returns the segment register operand.
 
TRITON_EXPORT const triton::arch::RegistergetConstBaseRegister (void) const
 LEA - Returns the base register operand.
 
TRITON_EXPORT const triton::arch::RegistergetConstIndexRegister (void) const
 LEA - Returns the index register operand.
 
TRITON_EXPORT const triton::arch::ImmediategetConstDisplacement (void) const
 LEA - Returns the displacement operand.
 
TRITON_EXPORT const triton::arch::ImmediategetConstScale (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 MemoryAccessoperator= (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 BitsVectoroperator= (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.
 

Detailed Description

This class is used to represent a memory access.

Definition at line 40 of file memoryAccess.hpp.

Constructor & Destructor Documentation

◆ MemoryAccess() [1/3]

triton::arch::MemoryAccess::MemoryAccess ( )

Constructor.

Definition at line 17 of file memoryAccess.cpp.

◆ MemoryAccess() [2/3]

triton::arch::MemoryAccess::MemoryAccess ( triton::uint64 address,
triton::uint32 size )

Constructor.

Definition at line 24 of file memoryAccess.cpp.

◆ MemoryAccess() [3/3]

triton::arch::MemoryAccess::MemoryAccess ( const MemoryAccess & other)

Constructor by copy.

Definition at line 45 of file memoryAccess.cpp.

Member Function Documentation

◆ getAddress()

triton::uint64 triton::arch::MemoryAccess::getAddress ( void ) const

Returns the address of the memory.

Definition at line 51 of file memoryAccess.cpp.

◆ getBaseRegister()

triton::arch::Register & triton::arch::MemoryAccess::getBaseRegister ( void )

LEA - Returns the base register operand.

Definition at line 86 of file memoryAccess.cpp.

◆ getBitSize()

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.

◆ getConstBaseRegister()

const triton::arch::Register & triton::arch::MemoryAccess::getConstBaseRegister ( void ) const

LEA - Returns the base register operand.

Definition at line 111 of file memoryAccess.cpp.

◆ getConstDisplacement()

const triton::arch::Immediate & triton::arch::MemoryAccess::getConstDisplacement ( void ) const

LEA - Returns the displacement operand.

Definition at line 121 of file memoryAccess.cpp.

◆ getConstIndexRegister()

const triton::arch::Register & triton::arch::MemoryAccess::getConstIndexRegister ( void ) const

LEA - Returns the index register operand.

Definition at line 116 of file memoryAccess.cpp.

◆ getConstScale()

const triton::arch::Immediate & triton::arch::MemoryAccess::getConstScale ( void ) const

LEA - Returns the scale operand.

Definition at line 126 of file memoryAccess.cpp.

◆ getConstSegmentRegister()

const triton::arch::Register & triton::arch::MemoryAccess::getConstSegmentRegister ( void ) const

LEA - Returns the segment register operand.

Definition at line 106 of file memoryAccess.cpp.

◆ getDisplacement()

triton::arch::Immediate & triton::arch::MemoryAccess::getDisplacement ( void )

LEA - Returns the displacement operand.

Definition at line 96 of file memoryAccess.cpp.

◆ getIndexRegister()

triton::arch::Register & triton::arch::MemoryAccess::getIndexRegister ( void )

LEA - Returns the index register operand.

Definition at line 91 of file memoryAccess.cpp.

◆ getLeaAst()

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.

◆ getPcRelative()

triton::uint64 triton::arch::MemoryAccess::getPcRelative ( void ) const

LEA - Gets pc relative.

Definition at line 61 of file memoryAccess.cpp.

◆ getScale()

triton::arch::Immediate & triton::arch::MemoryAccess::getScale ( void )

LEA - Returns the scale operand.

Definition at line 101 of file memoryAccess.cpp.

◆ getSegmentRegister()

triton::arch::Register & triton::arch::MemoryAccess::getSegmentRegister ( void )

LEA - Returns the segment register operand.

Definition at line 81 of file memoryAccess.cpp.

◆ getSize()

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.

◆ getType()

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.

◆ isOverlapWith()

bool triton::arch::MemoryAccess::isOverlapWith ( const MemoryAccess & other) const

Returns true if other and self overlap.

Definition at line 131 of file memoryAccess.cpp.

◆ operator=()

MemoryAccess & triton::arch::MemoryAccess::operator= ( const MemoryAccess & other)

Copies a MemoryAccess.

Definition at line 178 of file memoryAccess.cpp.

◆ setAddress()

void triton::arch::MemoryAccess::setAddress ( triton::uint64 addr)

Sets the address of the memory access.

Definition at line 138 of file memoryAccess.cpp.

◆ setBaseRegister()

void triton::arch::MemoryAccess::setBaseRegister ( const triton::arch::Register & base)

LEA - Sets the base register operand.

Definition at line 153 of file memoryAccess.cpp.

◆ setDisplacement()

void triton::arch::MemoryAccess::setDisplacement ( const triton::arch::Immediate & displacement)

LEA - Sets the displacement operand.

Definition at line 163 of file memoryAccess.cpp.

◆ setIndexRegister()

void triton::arch::MemoryAccess::setIndexRegister ( const triton::arch::Register & index)

LEA - Sets the index register operand.

Definition at line 158 of file memoryAccess.cpp.

◆ setLeaAst()

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.

◆ setPcRelative()

void triton::arch::MemoryAccess::setPcRelative ( triton::uint64 addr)

LEA - Sets pc relative.

Definition at line 143 of file memoryAccess.cpp.

◆ setScale()

void triton::arch::MemoryAccess::setScale ( const triton::arch::Immediate & scale)

LEA - Sets the scale operand.

Definition at line 168 of file memoryAccess.cpp.

◆ setSegmentRegister()

void triton::arch::MemoryAccess::setSegmentRegister ( const triton::arch::Register & segment)

LEA - Sets the segment register operand.

Definition at line 148 of file memoryAccess.cpp.

Member Data Documentation

◆ address

triton::uint64 triton::arch::MemoryAccess::address
protected

The memory' address.

Definition at line 43 of file memoryAccess.hpp.

◆ baseReg

triton::arch::Register triton::arch::MemoryAccess::baseReg
protected

LEA - If the operand has a base register, this attribute is filled.

Definition at line 52 of file memoryAccess.hpp.

◆ displacement

triton::arch::Immediate triton::arch::MemoryAccess::displacement
protected

LEA - If the operand has a displacement, this attribute is filled.

Definition at line 58 of file memoryAccess.hpp.

◆ indexReg

triton::arch::Register triton::arch::MemoryAccess::indexReg
protected

LEA - If the operand has an index register, this attribute is filled.

Definition at line 55 of file memoryAccess.hpp.

◆ leaAst

triton::ast::SharedAbstractNode triton::arch::MemoryAccess::leaAst
protected

The AST of the memory access (LEA).

Definition at line 64 of file memoryAccess.hpp.

◆ pcRelative

triton::uint64 triton::arch::MemoryAccess::pcRelative
protected

Contains the pc relative if it exists.

Definition at line 46 of file memoryAccess.hpp.

◆ scale

triton::arch::Immediate triton::arch::MemoryAccess::scale
protected

LEA - If the operand has a scale, this attribute is filled.

Definition at line 61 of file memoryAccess.hpp.

◆ segmentReg

triton::arch::Register triton::arch::MemoryAccess::segmentReg
protected

LEA - If the operand has a segment register, this attribute is filled.

Definition at line 49 of file memoryAccess.hpp.


The documentation for this class was generated from the following files: