libTriton  version 0.6 build 1382
Public Member Functions | List of all members
triton::arch::CpuInterface Interface Referenceabstract

This interface is used as abstract CPU interface. All CPU must use this interface. More...

#include <cpuInterface.hpp>

Inheritance diagram for triton::arch::CpuInterface:

Public Member Functions

virtual TRITON_EXPORT ~CpuInterface ()
 Destructor.
 
virtual TRITON_EXPORT void clear (void)=0
 Clears the architecture states (registers and memory).
 
virtual TRITON_EXPORT bool isFlag (triton::arch::registers_e regId) const =0
 Returns true if the register ID is a flag.
 
virtual TRITON_EXPORT bool isRegister (triton::arch::registers_e regId) const =0
 Returns true if the register ID is a register.
 
virtual TRITON_EXPORT bool isRegisterValid (triton::arch::registers_e regId) const =0
 Returns true if the register ID is valid.
 
virtual TRITON_EXPORT triton::uint32 gprSize (void) const =0
 Returns the bit in byte of the General Purpose Registers.
 
virtual TRITON_EXPORT triton::uint32 gprBitSize (void) const =0
 Returns the bit in bit of the General Purpose Registers.
 
virtual TRITON_EXPORT triton::uint32 numberOfRegisters (void) const =0
 Returns the number of registers according to the CPU architecture.
 
virtual TRITON_EXPORT std::set< const triton::arch::Register * > getParentRegisters (void) const =0
 Returns all parent registers.
 
virtual TRITON_EXPORT const std::unordered_map< registers_e, const triton::arch::Register > & getAllRegisters (void) const =0
 Returns all registers.
 
virtual TRITON_EXPORT const triton::arch::RegistergetParentRegister (const triton::arch::Register &reg) const =0
 Returns parent register from a given one.
 
virtual TRITON_EXPORT const triton::arch::RegistergetParentRegister (triton::arch::registers_e id) const =0
 Returns parent register from a given one.
 
virtual TRITON_EXPORT const triton::arch::RegistergetRegister (triton::arch::registers_e id) const =0
 Returns register from id.
 
virtual TRITON_EXPORT void disassembly (triton::arch::Instruction &inst) const =0
 Disassembles the instruction according to the architecture.
 
virtual TRITON_EXPORT triton::uint8 getConcreteMemoryValue (triton::uint64 addr, bool execCallbacks=true) const =0
 Returns the concrete value of a memory cell.
 
virtual TRITON_EXPORT triton::uint512 getConcreteMemoryValue (const triton::arch::MemoryAccess &mem, bool execCallbacks=true) const =0
 Returns the concrete value of memory cells.
 
virtual TRITON_EXPORT std::vector< triton::uint8getConcreteMemoryAreaValue (triton::uint64 baseAddr, triton::usize size, bool execCallbacks=true) const =0
 Returns the concrete value of a memory area.
 
virtual TRITON_EXPORT triton::uint512 getConcreteRegisterValue (const triton::arch::Register &reg, bool execCallbacks=true) const =0
 Returns the concrete value of a register.
 
virtual TRITON_EXPORT void setConcreteMemoryValue (triton::uint64 addr, triton::uint8 value)=0
 [architecture api] - Sets the concrete value of a memory cell. More...
 
virtual TRITON_EXPORT void setConcreteMemoryValue (const triton::arch::MemoryAccess &mem, const triton::uint512 &value)=0
 [architecture api] - Sets the concrete value of memory cells. More...
 
virtual TRITON_EXPORT void setConcreteMemoryAreaValue (triton::uint64 baseAddr, const std::vector< triton::uint8 > &values)=0
 [architecture api] - Sets the concrete value of a memory area. More...
 
virtual TRITON_EXPORT void setConcreteMemoryAreaValue (triton::uint64 baseAddr, const triton::uint8 *area, triton::usize size)=0
 [architecture api] - Sets the concrete value of a memory area. More...
 
virtual TRITON_EXPORT void setConcreteRegisterValue (const triton::arch::Register &reg, const triton::uint512 &value)=0
 [architecture api] - Sets the concrete value of a register. More...
 
virtual TRITON_EXPORT bool isMemoryMapped (triton::uint64 baseAddr, triton::usize size=1)=0
 Returns true if the range [baseAddr:size] is mapped into the internal memory representation. More...
 
virtual TRITON_EXPORT void unmapMemory (triton::uint64 baseAddr, triton::usize size=1)=0
 Removes the range [baseAddr:size] from the internal memory representation. More...
 

Detailed Description

This interface is used as abstract CPU interface. All CPU must use this interface.

Definition at line 41 of file cpuInterface.hpp.

Member Function Documentation

◆ isMemoryMapped()

virtual TRITON_EXPORT bool triton::arch::CpuInterface::isMemoryMapped ( triton::uint64  baseAddr,
triton::usize  size = 1 
)
pure virtual

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

See also
getConcreteMemoryValue() and getConcreteMemoryAreaValue().

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ setConcreteMemoryAreaValue() [1/2]

virtual TRITON_EXPORT void triton::arch::CpuInterface::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const std::vector< triton::uint8 > &  values 
)
pure 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.

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ setConcreteMemoryAreaValue() [2/2]

virtual TRITON_EXPORT void triton::arch::CpuInterface::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const triton::uint8 area,
triton::usize  size 
)
pure 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.

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ setConcreteMemoryValue() [1/2]

virtual TRITON_EXPORT void triton::arch::CpuInterface::setConcreteMemoryValue ( triton::uint64  addr,
triton::uint8  value 
)
pure 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.

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ setConcreteMemoryValue() [2/2]

virtual TRITON_EXPORT void triton::arch::CpuInterface::setConcreteMemoryValue ( const triton::arch::MemoryAccess mem,
const triton::uint512 value 
)
pure 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.

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ setConcreteRegisterValue()

virtual TRITON_EXPORT void triton::arch::CpuInterface::setConcreteRegisterValue ( const triton::arch::Register reg,
const triton::uint512 value 
)
pure 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.

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.

◆ unmapMemory()

virtual TRITON_EXPORT void triton::arch::CpuInterface::unmapMemory ( triton::uint64  baseAddr,
triton::usize  size = 1 
)
pure virtual

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

See also
isMemoryMapped().

Implemented in triton::arch::x86::x8664Cpu, and triton::arch::x86::x86Cpu.


The documentation for this interface was generated from the following file: