libTriton version 1.0 build 1592
|
This class is used to describe the ARM (32-bits) spec. More...
#include <arm32Cpu.hpp>
Public Member Functions | |
TRITON_EXPORT | Arm32Cpu (triton::callbacks::Callbacks *callbacks=nullptr) |
Constructor. | |
TRITON_EXPORT | Arm32Cpu (const Arm32Cpu &other) |
Constructor. | |
virtual TRITON_EXPORT | ~Arm32Cpu () |
Destructor. | |
TRITON_EXPORT Arm32Cpu & | operator= (const Arm32Cpu &other) |
Copies a Arm32Cpu 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 | 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. | |
TRITON_EXPORT bool | isThumb (void) const |
Returns true if the execution mode is Thumb. Only useful for Arm32. | |
TRITON_EXPORT bool | isMemoryExclusive (const triton::arch::MemoryAccess &mem) const |
Returns true if the given memory access is tagged as exclusive. Only valid for Arm32 and AArch64. | |
TRITON_EXPORT const std::unordered_map< triton::arch::register_e, const triton::arch::Register > & | getAllRegisters (void) const |
Returns all registers. | |
TRITON_EXPORT const std::unordered_map< triton::uint64, triton::uint8, IdentityHash< triton::uint64 > > & | getConcreteMemory (void) const |
Return all memory. | |
TRITON_EXPORT const triton::arch::Register & | getParentRegister (const triton::arch::Register ®) const |
Returns parent register from a given one. | |
TRITON_EXPORT const triton::arch::Register & | getParentRegister (triton::arch::register_e id) const |
Returns parent register from a given one. | |
TRITON_EXPORT const triton::arch::Register & | getProgramCounter (void) const |
Returns the program counter register. | |
TRITON_EXPORT const triton::arch::Register & | getRegister (triton::arch::register_e id) const |
Returns register from id. | |
TRITON_EXPORT const triton::arch::Register & | getRegister (const std::string &name) const |
Returns register from name. | |
TRITON_EXPORT const triton::arch::Register & | getStackPointer (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::uint8 > | getConcreteMemoryAreaValue (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 ®, 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) |
Disassembles the instruction according to the architecture. | |
TRITON_EXPORT void | setConcreteMemoryAreaValue (triton::uint64 baseAddr, const std::vector< triton::uint8 > &values, bool execCallbacks=true) |
[architecture api] - Sets the concrete value of a memory area. | |
TRITON_EXPORT void | setConcreteMemoryAreaValue (triton::uint64 baseAddr, const void *area, triton::usize size, bool execCallbacks=true) |
[architecture api] - Sets the concrete value of a memory area. | |
TRITON_EXPORT void | setConcreteMemoryValue (const triton::arch::MemoryAccess &mem, const triton::uint512 &value, bool execCallbacks=true) |
[architecture api] - Sets the concrete value of memory cells. | |
TRITON_EXPORT void | setConcreteMemoryValue (triton::uint64 addr, triton::uint8 value, bool execCallbacks=true) |
[architecture api] - Sets the concrete value of a memory cell. | |
TRITON_EXPORT void | setConcreteRegisterValue (const triton::arch::Register ®, const triton::uint512 &value, bool execCallbacks=true) |
[architecture api] - Sets the concrete value of a register. | |
TRITON_EXPORT void | setThumb (bool state) |
Sets CPU state to Thumb mode. | |
TRITON_EXPORT void | setMemoryExclusiveTag (const triton::arch::MemoryAccess &mem, bool tag) |
Sets exclusive memory access tag. Only valid for Arm32 and AArch64. | |
TRITON_EXPORT bool | isConcreteMemoryValueDefined (const triton::arch::MemoryAccess &mem) const |
Returns true if memory cells have a defined concrete value. | |
TRITON_EXPORT bool | isConcreteMemoryValueDefined (triton::uint64 baseAddr, triton::usize size=1) const |
Returns true if memory cells have a defined concrete value. | |
TRITON_EXPORT void | clearConcreteMemoryValue (const triton::arch::MemoryAccess &mem) |
Clears concrete values assigned to the memory cells. | |
TRITON_EXPORT void | clearConcreteMemoryValue (triton::uint64 baseAddr, triton::usize size=1) |
Clears concrete values assigned to the memory cells. | |
Public Member Functions inherited from triton::arch::CpuInterface | |
virtual TRITON_EXPORT | ~CpuInterface () |
Destructor. | |
Public Member Functions inherited from triton::arch::arm::arm32::Arm32Specifications | |
TRITON_EXPORT | Arm32Specifications (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::arm::shift_e | capstoneShiftToTritonShift (triton::uint32 id) const |
Converts a capstone's shift id to a triton's shift id. | |
TRITON_EXPORT triton::arch::arm::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. | |
TRITON_EXPORT triton::uint32 | getMemoryOperandSpecialSize (triton::uint32 id) const |
Returns memory access size if it is specified by instruction. | |
This class is used to describe the ARM (32-bits) spec.
Definition at line 61 of file arm32Cpu.hpp.
triton::arch::arm::arm32::Arm32Cpu::Arm32Cpu | ( | triton::callbacks::Callbacks * | callbacks = nullptr | ) |
Constructor.
Definition at line 27 of file arm32Cpu.cpp.
triton::arch::arm::arm32::Arm32Cpu::Arm32Cpu | ( | const Arm32Cpu & | other | ) |
Constructor.
Definition at line 42 of file arm32Cpu.cpp.
|
virtual |
Destructor.
Definition at line 47 of file arm32Cpu.cpp.
|
virtual |
Clears the architecture states (registers and memory).
Implements triton::arch::CpuInterface.
Definition at line 109 of file arm32Cpu.cpp.
|
virtual |
Clears concrete values assigned to the memory cells.
Implements triton::arch::CpuInterface.
Definition at line 831 of file arm32Cpu.cpp.
|
virtual |
Clears concrete values assigned to the memory cells.
Implements triton::arch::CpuInterface.
Definition at line 836 of file arm32Cpu.cpp.
|
virtual |
Disassembles the instruction according to the architecture.
Implements triton::arch::CpuInterface.
Definition at line 249 of file arm32Cpu.cpp.
|
virtual |
Returns all registers.
Implements triton::arch::CpuInterface.
Definition at line 180 of file arm32Cpu.cpp.
|
virtual |
Return all memory.
Implements triton::arch::CpuInterface.
Definition at line 184 of file arm32Cpu.cpp.
|
virtual |
Returns the concrete value of a memory area.
Implements triton::arch::CpuInterface.
Definition at line 625 of file arm32Cpu.cpp.
|
virtual |
Returns the concrete value of memory cells.
Implements triton::arch::CpuInterface.
Definition at line 604 of file arm32Cpu.cpp.
|
virtual |
Returns the concrete value of a memory cell.
Implements triton::arch::CpuInterface.
Definition at line 592 of file arm32Cpu.cpp.
|
virtual |
Returns the concrete value of a register.
Implements triton::arch::CpuInterface.
Definition at line 635 of file arm32Cpu.cpp.
|
virtual |
Returns the kind of endianness as triton::arch::endianness_e.
Implements triton::arch::CpuInterface.
Definition at line 140 of file arm32Cpu.cpp.
|
virtual |
Returns parent register from a given one.
Implements triton::arch::CpuInterface.
Definition at line 229 of file arm32Cpu.cpp.
|
virtual |
Returns parent register from a given one.
Implements triton::arch::CpuInterface.
Definition at line 234 of file arm32Cpu.cpp.
|
virtual |
Returns all parent registers.
Implements triton::arch::CpuInterface.
Definition at line 189 of file arm32Cpu.cpp.
|
virtual |
Returns the program counter register.
Implements triton::arch::CpuInterface.
Definition at line 239 of file arm32Cpu.cpp.
|
virtual |
Returns register from name.
Implements triton::arch::CpuInterface.
Definition at line 218 of file arm32Cpu.cpp.
|
virtual |
Returns register from id.
Implements triton::arch::CpuInterface.
Definition at line 209 of file arm32Cpu.cpp.
|
virtual |
Returns the stack pointer register.
Implements triton::arch::CpuInterface.
Definition at line 244 of file arm32Cpu.cpp.
|
virtual |
Returns the bit in bit of the General Purpose Registers.
Implements triton::arch::CpuInterface.
Definition at line 175 of file arm32Cpu.cpp.
|
virtual |
Returns the bit in byte of the General Purpose Registers.
Implements triton::arch::CpuInterface.
Definition at line 170 of file arm32Cpu.cpp.
|
virtual |
Returns true if memory cells have a defined concrete value.
Implements triton::arch::CpuInterface.
Definition at line 817 of file arm32Cpu.cpp.
|
virtual |
Returns true if memory cells have a defined concrete value.
Implements triton::arch::CpuInterface.
Definition at line 822 of file arm32Cpu.cpp.
|
virtual |
Returns true if the register ID is a flag.
Implements triton::arch::CpuInterface.
Definition at line 145 of file arm32Cpu.cpp.
bool triton::arch::arm::arm32::Arm32Cpu::isGPR | ( | triton::arch::register_e | regId | ) | const |
Returns true if regId is a GRP.
Definition at line 160 of file arm32Cpu.cpp.
|
virtual |
Returns true if the given memory access is tagged as exclusive. Only valid for Arm32 and AArch64.
Implements triton::arch::CpuInterface.
Definition at line 790 of file arm32Cpu.cpp.
|
virtual |
Returns true if the register ID is a register.
Implements triton::arch::CpuInterface.
Definition at line 150 of file arm32Cpu.cpp.
|
virtual |
Returns true if the register ID is valid.
Implements triton::arch::CpuInterface.
Definition at line 155 of file arm32Cpu.cpp.
|
virtual |
Returns true if the execution mode is Thumb. Only useful for Arm32.
Implements triton::arch::CpuInterface.
Definition at line 780 of file arm32Cpu.cpp.
|
virtual |
Returns the number of registers according to the CPU architecture.
Implements triton::arch::CpuInterface.
Definition at line 165 of file arm32Cpu.cpp.
Copies a Arm32Cpu class.
Definition at line 134 of file arm32Cpu.cpp.
|
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 699 of file arm32Cpu.cpp.
|
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 707 of file arm32Cpu.cpp.
|
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 678 of file arm32Cpu.cpp.
|
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 671 of file arm32Cpu.cpp.
|
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 715 of file arm32Cpu.cpp.
|
virtual |
Sets exclusive memory access tag. Only valid for Arm32 and AArch64.
Implements triton::arch::CpuInterface.
Definition at line 803 of file arm32Cpu.cpp.
|
virtual |
Sets CPU state to Thumb mode.
Implements triton::arch::CpuInterface.
Definition at line 785 of file arm32Cpu.cpp.
|
protected |
Definition at line 149 of file arm32Cpu.hpp.
|
protected |
map of address -> concrete value
item1: memory address
item2: concrete value
Definition at line 114 of file arm32Cpu.hpp.
|
protected |
Concrete value of pc.
Definition at line 147 of file arm32Cpu.hpp.
|
protected |
Concrete value of r0.
Definition at line 117 of file arm32Cpu.hpp.
|
protected |
Concrete value of r1.
Definition at line 119 of file arm32Cpu.hpp.
|
protected |
Concrete value of r10.
Definition at line 137 of file arm32Cpu.hpp.
|
protected |
Concrete value of r11.
Definition at line 139 of file arm32Cpu.hpp.
|
protected |
Concrete value of r12.
Definition at line 141 of file arm32Cpu.hpp.
|
protected |
Concrete value of r14.
Definition at line 145 of file arm32Cpu.hpp.
|
protected |
Concrete value of r2.
Definition at line 121 of file arm32Cpu.hpp.
|
protected |
Concrete value of r3.
Definition at line 123 of file arm32Cpu.hpp.
|
protected |
Concrete value of r4.
Definition at line 125 of file arm32Cpu.hpp.
|
protected |
Concrete value of r5.
Definition at line 127 of file arm32Cpu.hpp.
|
protected |
Concrete value of r6.
Definition at line 129 of file arm32Cpu.hpp.
|
protected |
Concrete value of r7.
Definition at line 131 of file arm32Cpu.hpp.
|
protected |
Concrete value of r8.
Definition at line 133 of file arm32Cpu.hpp.
|
protected |
Concrete value of r9.
Definition at line 135 of file arm32Cpu.hpp.
|
protected |
Concrete value of sp.
Definition at line 143 of file arm32Cpu.hpp.
|
protected |
Thumb mode flag.
Definition at line 152 of file arm32Cpu.hpp.