libTriton  version 0.8 build 1439
Public Member Functions | Protected Attributes | List of all members
triton::arch::aarch64::AArch64Cpu Class Reference

This class is used to describe the ARM (64-bits) spec. More...

#include <aarch64Cpu.hpp>

Inheritance diagram for triton::arch::aarch64::AArch64Cpu:

Public Member Functions

TRITON_EXPORT AArch64Cpu (triton::callbacks::Callbacks *callbacks=nullptr)
 Constructor.
 
TRITON_EXPORT AArch64Cpu (const AArch64Cpu &other)
 Constructor.
 
virtual TRITON_EXPORT ~AArch64Cpu ()
 Destructor.
 
TRITON_EXPORT AArch64Cpuoperator= (const AArch64Cpu &other)
 Copies a AArch64Cpu class.
 
TRITON_EXPORT bool isGPR (triton::arch::register_e regId) const
 Returns true if regId is a GRP.
 
TRITON_EXPORT bool isFlag (triton::arch::register_e regId) const
 Returns true if the register ID is a flag.
 
TRITON_EXPORT bool isMemoryMapped (triton::uint64 baseAddr, triton::usize size=1)
 Returns true if the range [baseAddr:size] is mapped into the internal memory representation. More...
 
TRITON_EXPORT bool isRegister (triton::arch::register_e regId) const
 Returns true if the register ID is a register.
 
TRITON_EXPORT bool isRegisterValid (triton::arch::register_e regId) const
 Returns true if the register ID is valid.
 
const TRITON_EXPORT std::unordered_map< triton::arch::register_e, const triton::arch::Register > & getAllRegisters (void) const
 Returns all registers.
 
const TRITON_EXPORT triton::arch::RegistergetParentRegister (const triton::arch::Register &reg) const
 Returns parent register from a given one.
 
const TRITON_EXPORT triton::arch::RegistergetParentRegister (triton::arch::register_e id) const
 Returns parent register from a given one.
 
const TRITON_EXPORT triton::arch::RegistergetProgramCounter (void) const
 Returns the program counter register.
 
const TRITON_EXPORT triton::arch::RegistergetRegister (triton::arch::register_e id) const
 Returns register from id.
 
const TRITON_EXPORT triton::arch::RegistergetStackPointer (void) const
 Returns the stack pointer register.
 
TRITON_EXPORT std::set< const triton::arch::Register * > getParentRegisters (void) const
 Returns all parent registers.
 
TRITON_EXPORT std::vector< triton::uint8getConcreteMemoryAreaValue (triton::uint64 baseAddr, triton::usize size, bool execCallbacks=true) const
 Returns the concrete value of a memory area.
 
TRITON_EXPORT triton::arch::endianness_e getEndianness (void) const
 Returns the kind of endianness as triton::arch::endianness_e.
 
TRITON_EXPORT triton::uint32 gprBitSize (void) const
 Returns the bit in bit of the General Purpose Registers.
 
TRITON_EXPORT triton::uint32 gprSize (void) const
 Returns the bit in byte of the General Purpose Registers.
 
TRITON_EXPORT triton::uint32 numberOfRegisters (void) const
 Returns the number of registers according to the CPU architecture.
 
TRITON_EXPORT triton::uint512 getConcreteMemoryValue (const triton::arch::MemoryAccess &mem, bool execCallbacks=true) const
 Returns the concrete value of memory cells.
 
TRITON_EXPORT triton::uint512 getConcreteRegisterValue (const triton::arch::Register &reg, bool execCallbacks=true) const
 Returns the concrete value of a register.
 
TRITON_EXPORT triton::uint8 getConcreteMemoryValue (triton::uint64 addr, bool execCallbacks=true) const
 Returns the concrete value of a memory cell.
 
TRITON_EXPORT void clear (void)
 Clears the architecture states (registers and memory).
 
TRITON_EXPORT void disassembly (triton::arch::Instruction &inst) const
 Disassembles the instruction according to the architecture.
 
TRITON_EXPORT void setConcreteMemoryAreaValue (triton::uint64 baseAddr, const std::vector< triton::uint8 > &values)
 [architecture api] - Sets the concrete value of a memory area. More...
 
TRITON_EXPORT void setConcreteMemoryAreaValue (triton::uint64 baseAddr, const triton::uint8 *area, triton::usize size)
 [architecture api] - Sets the concrete value of a memory area. More...
 
TRITON_EXPORT void setConcreteMemoryValue (const triton::arch::MemoryAccess &mem, const triton::uint512 &value)
 [architecture api] - Sets the concrete value of memory cells. More...
 
TRITON_EXPORT void setConcreteMemoryValue (triton::uint64 addr, triton::uint8 value)
 [architecture api] - Sets the concrete value of a memory cell. More...
 
TRITON_EXPORT void setConcreteRegisterValue (const triton::arch::Register &reg, const triton::uint512 &value)
 [architecture api] - Sets the concrete value of a register. More...
 
TRITON_EXPORT void unmapMemory (triton::uint64 baseAddr, triton::usize size=1)
 Removes the range [baseAddr:size] from the internal memory representation. More...
 
- Public Member Functions inherited from triton::arch::CpuInterface
virtual TRITON_EXPORT ~CpuInterface ()
 Destructor.
 
- Public Member Functions inherited from triton::arch::aarch64::AArch64Specifications
TRITON_EXPORT AArch64Specifications (triton::arch::architecture_e)
 Constructor.
 
TRITON_EXPORT triton::arch::register_e capstoneRegisterToTritonRegister (triton::uint32 id) const
 Converts a capstone's register id to a triton's register id.
 
TRITON_EXPORT triton::arch::aarch64::shift_e capstoneShiftToTritonShift (triton::uint32 id) const
 Converts a capstone's shift id to a triton's shift id.
 
TRITON_EXPORT triton::arch::aarch64::extend_e capstoneExtendToTritonExtend (triton::uint32 id) const
 Converts a capstone's extend id to a triton's extend id.
 
TRITON_EXPORT triton::arch::aarch64::condition_e capstoneConditionToTritonCondition (triton::uint32 id) const
 Converts a capstone's condition id to a triton's condition id.
 
TRITON_EXPORT triton::uint32 capstoneInstructionToTritonInstruction (triton::uint32 id) const
 Converts a capstone's instruction id to a triton's instruction id.
 

Protected Attributes

std::map< triton::uint64, triton::uint8memory
 map of address -> concrete value More...
 
triton::uint8 x0 [QWORD_SIZE]
 Concrete value of x0.
 
triton::uint8 x1 [QWORD_SIZE]
 Concrete value of x1.
 
triton::uint8 x2 [QWORD_SIZE]
 Concrete value of x2.
 
triton::uint8 x3 [QWORD_SIZE]
 Concrete value of x3.
 
triton::uint8 x4 [QWORD_SIZE]
 Concrete value of x4.
 
triton::uint8 x5 [QWORD_SIZE]
 Concrete value of x5.
 
triton::uint8 x6 [QWORD_SIZE]
 Concrete value of x6.
 
triton::uint8 x7 [QWORD_SIZE]
 Concrete value of x7.
 
triton::uint8 x8 [QWORD_SIZE]
 Concrete value of x8.
 
triton::uint8 x9 [QWORD_SIZE]
 Concrete value of x9.
 
triton::uint8 x10 [QWORD_SIZE]
 Concrete value of x10.
 
triton::uint8 x11 [QWORD_SIZE]
 Concrete value of x11.
 
triton::uint8 x12 [QWORD_SIZE]
 Concrete value of x12.
 
triton::uint8 x13 [QWORD_SIZE]
 Concrete value of x13.
 
triton::uint8 x14 [QWORD_SIZE]
 Concrete value of x14.
 
triton::uint8 x15 [QWORD_SIZE]
 Concrete value of x15.
 
triton::uint8 x16 [QWORD_SIZE]
 Concrete value of x16.
 
triton::uint8 x17 [QWORD_SIZE]
 Concrete value of x17.
 
triton::uint8 x18 [QWORD_SIZE]
 Concrete value of x18.
 
triton::uint8 x19 [QWORD_SIZE]
 Concrete value of x19.
 
triton::uint8 x20 [QWORD_SIZE]
 Concrete value of x20.
 
triton::uint8 x21 [QWORD_SIZE]
 Concrete value of x21.
 
triton::uint8 x22 [QWORD_SIZE]
 Concrete value of x22.
 
triton::uint8 x23 [QWORD_SIZE]
 Concrete value of x23.
 
triton::uint8 x24 [QWORD_SIZE]
 Concrete value of x24.
 
triton::uint8 x25 [QWORD_SIZE]
 Concrete value of x25.
 
triton::uint8 x26 [QWORD_SIZE]
 Concrete value of x26.
 
triton::uint8 x27 [QWORD_SIZE]
 Concrete value of x27.
 
triton::uint8 x28 [QWORD_SIZE]
 Concrete value of x28.
 
triton::uint8 x29 [QWORD_SIZE]
 Concrete value of x29.
 
triton::uint8 x30 [QWORD_SIZE]
 Concrete value of x30.
 
triton::uint8 sp [QWORD_SIZE]
 Concrete value of sp.
 
triton::uint8 pc [QWORD_SIZE]
 Concrete value of pc.
 
triton::uint8 spsr [DWORD_SIZE]
 Concrete value of spsr.
 
- Protected Attributes inherited from triton::arch::aarch64::AArch64Specifications
std::unordered_map< triton::arch::register_e, const triton::arch::Registerregisters_
 List of registers specification available for this architecture.
 

Detailed Description

This class is used to describe the ARM (64-bits) spec.

Definition at line 52 of file aarch64Cpu.hpp.

Member Function Documentation

◆ isMemoryMapped()

bool triton::arch::aarch64::AArch64Cpu::isMemoryMapped ( triton::uint64  baseAddr,
triton::usize  size = 1 
)
virtual

Returns true if the range [baseAddr:size] is mapped into the internal memory representation.

See also
getConcreteMemoryValue() and getConcreteMemoryAreaValue().

Implements triton::arch::CpuInterface.

Definition at line 671 of file aarch64Cpu.cpp.

◆ setConcreteMemoryAreaValue() [1/2]

void triton::arch::aarch64::AArch64Cpu::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const std::vector< triton::uint8 > &  values 
)
virtual

[architecture api] - Sets the concrete value of a memory area.

Note that by setting a concrete value will probably imply a desynchronization with the symbolic state (if it exists). You should probably use the concretize functions after this.

Implements triton::arch::CpuInterface.

Definition at line 555 of file aarch64Cpu.cpp.

◆ setConcreteMemoryAreaValue() [2/2]

void triton::arch::aarch64::AArch64Cpu::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const triton::uint8 area,
triton::usize  size 
)
virtual

[architecture api] - Sets the concrete value of a memory area.

Note that by setting a concrete value will probably imply a desynchronization with the symbolic state (if it exists). You should probably use the concretize functions after this.

Implements triton::arch::CpuInterface.

Definition at line 562 of file aarch64Cpu.cpp.

◆ setConcreteMemoryValue() [1/2]

void triton::arch::aarch64::AArch64Cpu::setConcreteMemoryValue ( const triton::arch::MemoryAccess mem,
const triton::uint512 value 
)
virtual

[architecture api] - Sets the concrete value of memory cells.

Note that by setting a concrete value will probably imply a desynchronization with the symbolic state (if it exists). You should probably use the concretize functions after this.

Implements triton::arch::CpuInterface.

Definition at line 534 of file aarch64Cpu.cpp.

◆ setConcreteMemoryValue() [2/2]

void triton::arch::aarch64::AArch64Cpu::setConcreteMemoryValue ( triton::uint64  addr,
triton::uint8  value 
)
virtual

[architecture api] - Sets the concrete value of a memory cell.

Note that by setting a concrete value will probably imply a desynchronization with the symbolic state (if it exists). You should probably use the concretize functions after this.

Implements triton::arch::CpuInterface.

Definition at line 527 of file aarch64Cpu.cpp.

◆ setConcreteRegisterValue()

void triton::arch::aarch64::AArch64Cpu::setConcreteRegisterValue ( const triton::arch::Register reg,
const triton::uint512 value 
)
virtual

[architecture api] - Sets the concrete value of a register.

Note that by setting a concrete value will probably imply a desynchronization with the symbolic state (if it exists). You should probably use the concretize functions after this.

Implements triton::arch::CpuInterface.

Definition at line 569 of file aarch64Cpu.cpp.

◆ unmapMemory()

void triton::arch::aarch64::AArch64Cpu::unmapMemory ( triton::uint64  baseAddr,
triton::usize  size = 1 
)
virtual

Removes the range [baseAddr:size] from the internal memory representation.

See also
isMemoryMapped().

Implements triton::arch::CpuInterface.

Definition at line 680 of file aarch64Cpu.cpp.

Member Data Documentation

◆ memory

std::map<triton::uint64, triton::uint8> triton::arch::aarch64::AArch64Cpu::memory
protected

map of address -> concrete value

item1: memory address
item2: concrete value

Definition at line 71 of file aarch64Cpu.hpp.


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