libTriton  version 1.0 build 1532
Public Member Functions | Public Attributes | Protected Attributes | List of all members
triton::API Class Reference

This is used as C++ API. More...

#include <api.hpp>

Public Member Functions

TRITON_EXPORT API ()
 Constructor of the API. More...
 
TRITON_EXPORT API (triton::arch::architecture_e arch)
 Constructor of the API. More...
 
TRITON_EXPORT ~API ()
 Destructor of the API. More...
 
TRITON_EXPORT bool isArchitectureValid (void) const
 [Architecture api] - Returns true if the architecture is valid. More...
 
TRITON_EXPORT triton::arch::architecture_e getArchitecture (void) const
 [architecture api] - Returns the architecture as triton::arch::architecture_e. More...
 
TRITON_EXPORT triton::arch::endianness_e getEndianness (void) const
 [architecture api] - Returns the endianness as triton::arch::endianness_e. More...
 
TRITON_EXPORT triton::arch::CpuInterfacegetCpuInstance (void)
 [architecture api] - Returns the instance of the current CPU used. More...
 
TRITON_EXPORT void setArchitecture (triton::arch::architecture_e arch)
 [architecture api] - Initializes an architecture. More...
 
TRITON_EXPORT void clearArchitecture (void)
 [architecture api] - Clears the architecture states (registers and memory). More...
 
TRITON_EXPORT bool isFlag (triton::arch::register_e regId) const
 [architecture api] - Returns true if the register id is a flag. More...
 
TRITON_EXPORT bool isFlag (const triton::arch::Register &reg) const
 [architecture api] - Returns true if the register id is a flag. More...
 
TRITON_EXPORT bool isRegister (triton::arch::register_e regId) const
 [architecture api] - Returns true if the regId is a register. More...
 
TRITON_EXPORT bool isRegister (const triton::arch::Register &reg) const
 [architecture api] - Returns true if the regId is a register. More...
 
TRITON_EXPORT const triton::arch::RegistergetRegister (triton::arch::register_e id) const
 [architecture api] - Returns Register from regId. More...
 
TRITON_EXPORT const triton::arch::RegistergetRegister (const std::string &name) const
 [architecture api] - Returns Register from its name. More...
 
TRITON_EXPORT const triton::arch::RegistergetParentRegister (const triton::arch::Register &reg) const
 [architecture api] - Returns parent Register from a register. More...
 
TRITON_EXPORT const triton::arch::RegistergetParentRegister (triton::arch::register_e id) const
 [architecture api] - Returns parent Register from regId. More...
 
TRITON_EXPORT bool isRegisterValid (triton::arch::register_e regId) const
 [architecture api] - Returns true if the regId is a register or a flag. More...
 
TRITON_EXPORT bool isRegisterValid (const triton::arch::Register &reg) const
 [architecture api] - Returns true if the regId is a register or a flag. More...
 
TRITON_EXPORT bool isThumb (void) const
 [architecture api] - Returns true if the execution mode is Thumb. Only useful for Arm32. More...
 
TRITON_EXPORT void setThumb (bool state)
 [architecture api] - Sets CPU state to Thumb mode. More...
 
TRITON_EXPORT triton::uint32 getGprBitSize (void) const
 [architecture api] - Returns the bit in byte of the General Purpose Registers. More...
 
TRITON_EXPORT triton::uint32 getGprSize (void) const
 [architecture api] - Returns the size in byte of the General Purpose Registers. More...
 
TRITON_EXPORT triton::uint32 getNumberOfRegisters (void) const
 [architecture api] - Returns the number of registers according to the CPU architecture. More...
 
TRITON_EXPORT const triton::arch::Instruction getNopInstruction (void) const
 Returns a NOP instruction according to the architecture. More...
 
TRITON_EXPORT const std::unordered_map< triton::arch::register_e, const triton::arch::Register > & getAllRegisters (void) const
 [architecture api] - Returns all registers. More...
 
TRITON_EXPORT std::set< const triton::arch::Register * > getParentRegisters (void) const
 [architecture api] - Returns all parent registers. More...
 
TRITON_EXPORT triton::uint8 getConcreteMemoryValue (triton::uint64 addr, bool execCallbacks=true) const
 [architecture api] - Returns the concrete value of a memory cell. More...
 
TRITON_EXPORT triton::uint512 getConcreteMemoryValue (const triton::arch::MemoryAccess &mem, bool execCallbacks=true) const
 [architecture api] - Returns the concrete value of memory cells. More...
 
TRITON_EXPORT std::vector< triton::uint8getConcreteMemoryAreaValue (triton::uint64 baseAddr, triton::usize size, bool execCallbacks=true) const
 [architecture api] - Returns the concrete value of a memory area. More...
 
TRITON_EXPORT triton::uint512 getConcreteRegisterValue (const triton::arch::Register &reg, bool execCallbacks=true) const
 [architecture api] - Returns the concrete value of a register. 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 setConcreteMemoryValue (const triton::arch::MemoryAccess &mem, const triton::uint512 &value)
 [architecture api] - Sets the concrete value of memory cells. More...
 
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 setConcreteRegisterValue (const triton::arch::Register &reg, const triton::uint512 &value)
 [architecture api] - Sets the concrete value of a register. More...
 
TRITON_EXPORT bool isConcreteMemoryValueDefined (const triton::arch::MemoryAccess &mem) const
 Returns true if memory cells have a defined concrete value. More...
 
TRITON_EXPORT bool isConcreteMemoryValueDefined (triton::uint64 baseAddr, triton::usize size=1) const
 Returns true if memory cells have a defined concrete value. More...
 
TRITON_EXPORT void clearConcreteMemoryValue (const triton::arch::MemoryAccess &mem)
 Clears concrete values assigned to the memory cells. More...
 
TRITON_EXPORT void clearConcreteMemoryValue (triton::uint64 baseAddr, triton::usize size=1)
 Clears concrete values assigned to the memory cells. More...
 
TRITON_EXPORT void disassembly (triton::arch::Instruction &inst) const
 [architecture api] - Disassembles the instruction and setup operands. More...
 
TRITON_EXPORT void disassembly (triton::arch::BasicBlock &block, triton::uint64 addr=0) const
 [architecture api] - Disassembles a block of instructions. You must define an architecture before. More...
 
TRITON_EXPORT std::vector< triton::arch::Instructiondisassembly (triton::uint64 addr, triton::usize count) const
 [architecture api] - Disassembles a concrete memory area and returns a list of at most count disassembled instructions. More...
 
TRITON_EXPORT triton::arch::BasicBlock disassembly (triton::uint64 addr) const
 [architecture api] - Disassembles a concrete memory area from addr to control flow instruction and returns a BasicBlock. More...
 
TRITON_EXPORT triton::arch::exception_e processing (triton::arch::Instruction &inst)
 [proccesing api] - Processes an instruction and updates engines according to the instruction semantics. Returns triton::arch::NO_FAULT if succeed. More...
 
TRITON_EXPORT triton::arch::exception_e processing (triton::arch::BasicBlock &block, triton::uint64 addr=0)
 [proccesing api] - Processes a block of instructions and updates engines according to instructions semantics. Returns triton::arch::NO_FAULT if succeed. More...
 
TRITON_EXPORT void initEngines (void)
 [proccesing api] - Initializes everything. More...
 
TRITON_EXPORT void removeEngines (void)
 [proccesing api] - Removes everything. More...
 
TRITON_EXPORT void reset (void)
 [proccesing api] - Resets everything. More...
 
TRITON_EXPORT triton::arch::exception_e buildSemantics (triton::arch::Instruction &inst)
 [IR builder api] - Builds the instruction semantics. Returns triton::arch::NO_FAULT if succeed. More...
 
TRITON_EXPORT triton::arch::exception_e buildSemantics (triton::arch::BasicBlock &block)
 [IR builder api] - Builds the instructions semantics of a block. Returns triton::arch::NO_FAULT if succeed. More...
 
TRITON_EXPORT triton::ast::SharedAstContext getAstContext (void)
 [IR builder api] - Returns the AST context. Used as AST builder. More...
 
TRITON_EXPORT triton::ast::representations::mode_e getAstRepresentationMode (void) const
 [AST representation api] - Returns the AST representation as triton::ast::representation_e. More...
 
TRITON_EXPORT void setAstRepresentationMode (triton::ast::representations::mode_e mode)
 [AST representation api] - Sets the AST representation. More...
 
template<typename T >
void addCallback (triton::callbacks::callback_e kind, T cb)
 [callbacks api] - Adds a callback. More...
 
template<typename T >
void removeCallback (triton::callbacks::callback_e kind, T cb)
 [callbacks api] - Removes a callback. More...
 
TRITON_EXPORT void clearCallbacks (void)
 [callbacks api] - Clears recorded callbacks. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode processCallbacks (triton::callbacks::callback_e kind, triton::ast::SharedAbstractNode node)
 [callbacks api] - Processes callbacks according to the kind and the C++ polymorphism. More...
 
TRITON_EXPORT void processCallbacks (triton::callbacks::callback_e kind, const triton::arch::MemoryAccess &mem)
 [callbacks api] - Processes callbacks according to the kind and the C++ polymorphism. More...
 
TRITON_EXPORT void processCallbacks (triton::callbacks::callback_e kind, const triton::arch::Register &reg)
 [callbacks api] - Processes callbacks according to the kind and the C++ polymorphism. More...
 
TRITON_EXPORT void setMode (triton::modes::mode_e mode, bool flag)
 [modes api] - Enables or disables a specific mode. More...
 
TRITON_EXPORT bool isModeEnabled (triton::modes::mode_e mode) const
 [modes api] - Returns true if the mode is enabled. More...
 
TRITON_EXPORT void clearModes (void)
 [modes api] - Clears recorded modes. More...
 
TRITON_EXPORT triton::engines::symbolic::SymbolicEnginegetSymbolicEngine (void)
 [symbolic api] - Returns the instance of the symbolic engine. More...
 
TRITON_EXPORT std::unordered_map< triton::arch::register_e, triton::engines::symbolic::SharedSymbolicExpressiongetSymbolicRegisters (void) const
 [symbolic api] - Returns the map of symbolic registers defined. More...
 
TRITON_EXPORT std::unordered_map< triton::uint64, triton::engines::symbolic::SharedSymbolicExpressiongetSymbolicMemory (void) const
 [symbolic api] - Returns the map (<Addr : SymExpr>) of symbolic memory defined. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicExpression getSymbolicMemory (triton::uint64 addr) const
 [symbolic api] - Returns the shared symbolic expression corresponding to the memory address. More...
 
TRITON_EXPORT const triton::engines::symbolic::SharedSymbolicExpressiongetSymbolicRegister (const triton::arch::Register &reg) const
 [symbolic api] - Returns the shared symbolic expression corresponding to the parent register. More...
 
TRITON_EXPORT triton::uint8 getSymbolicMemoryValue (triton::uint64 address)
 [symbolic api] - Returns the symbolic memory value. More...
 
TRITON_EXPORT triton::uint512 getSymbolicMemoryValue (const triton::arch::MemoryAccess &mem)
 [symbolic api] - Returns the symbolic memory value. More...
 
TRITON_EXPORT std::vector< triton::uint8getSymbolicMemoryAreaValue (triton::uint64 baseAddr, triton::usize size)
 [symbolic api] - Returns the symbolic values of a memory area. More...
 
TRITON_EXPORT triton::uint512 getSymbolicRegisterValue (const triton::arch::Register &reg)
 [symbolic api] - Returns the symbolic register value. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (const triton::arch::OperandWrapper &op)
 [symbolic api] - Returns the AST corresponding to the operand. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (triton::arch::Instruction &inst, const triton::arch::OperandWrapper &op)
 [symbolic api] - Returns the AST corresponding to the operand. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getImmediateAst (const triton::arch::Immediate &imm)
 [symbolic api] - Returns the AST corresponding to the immediate. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getImmediateAst (triton::arch::Instruction &inst, const triton::arch::Immediate &imm)
 [symbolic api] - Returns the AST corresponding to the immediate and defines the immediate as input of the instruction.. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst (const triton::arch::MemoryAccess &mem)
 [symbolic api] - Returns the AST corresponding to the memory. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst (triton::arch::Instruction &inst, const triton::arch::MemoryAccess &mem)
 [symbolic api] - Returns the AST corresponding to the memory and defines the memory cell as input of the instruction. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getRegisterAst (const triton::arch::Register &reg)
 [symbolic api] - Returns the AST corresponding to the register. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getRegisterAst (triton::arch::Instruction &inst, const triton::arch::Register &reg)
 [symbolic api] - Returns the AST corresponding to the register and defines the register as input of the instruction. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicExpression newSymbolicExpression (const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 [symbolic api] - Returns a new shared symbolic expression. Note that if there are simplification passes recorded, simplification will be applied. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable newSymbolicVariable (triton::uint32 varSize, const std::string &alias="")
 [symbolic api] - Returns a new symbolic variable. More...
 
TRITON_EXPORT void removeSymbolicExpression (const triton::engines::symbolic::SharedSymbolicExpression &expr)
 [symbolic api] - Removes the symbolic expression corresponding to the id. More...
 
TRITON_EXPORT const triton::engines::symbolic::SharedSymbolicExpressioncreateSymbolicExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::OperandWrapper &dst, const std::string &comment="")
 [symbolic api] - Returns the new shared symbolic abstract expression and links this expression to the instruction. More...
 
TRITON_EXPORT const triton::engines::symbolic::SharedSymbolicExpressioncreateSymbolicMemoryExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::MemoryAccess &mem, const std::string &comment="")
 [symbolic api] - Returns the new shared symbolic memory expression and links this expression to the instruction. More...
 
TRITON_EXPORT const triton::engines::symbolic::SharedSymbolicExpressioncreateSymbolicRegisterExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::Register &reg, const std::string &comment="")
 [symbolic api] - Returns the new shared symbolic register expression and links this expression to the instruction. More...
 
TRITON_EXPORT const triton::engines::symbolic::SharedSymbolicExpressioncreateSymbolicVolatileExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 [symbolic api] - Returns the new shared symbolic volatile expression and links this expression to the instruction. More...
 
TRITON_EXPORT void assignSymbolicExpressionToMemory (const triton::engines::symbolic::SharedSymbolicExpression &se, const triton::arch::MemoryAccess &mem)
 [symbolic api] - Assigns a symbolic expression to a memory. More...
 
TRITON_EXPORT void assignSymbolicExpressionToRegister (const triton::engines::symbolic::SharedSymbolicExpression &se, const triton::arch::Register &reg)
 [symbolic api] - Assigns a symbolic expression to a register. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode simplify (const triton::ast::SharedAbstractNode &node, bool usingSolver=false, bool usingLLVM=false) const
 [symbolic api] - Processes all recorded AST simplifications, uses solver's simplifications if usingSolver is true or LLVM is usingLLVM is true. Returns the simplified AST. More...
 
TRITON_EXPORT triton::arch::BasicBlock simplify (const triton::arch::BasicBlock &block, bool padding=false) const
 [symbolic api] - Processes a dead store elimination simplification on a given basic block. If padding is true, keep addresses aligned and padds with NOP instructions. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicExpression getSymbolicExpression (triton::usize symExprId) const
 [symbolic api] - Returns the shared symbolic expression corresponding to an id. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable getSymbolicVariable (triton::usize symVarId) const
 [symbolic api] - Returns the symbolic variable corresponding to the symbolic variable id. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable getSymbolicVariable (const std::string &symVarName) const
 [symbolic api] - Returns the symbolic variable corresponding to the symbolic variable name. More...
 
TRITON_EXPORT const std::vector< triton::engines::symbolic::PathConstraint > & getPathConstraints (void) const
 [symbolic api] - Returns the logical conjunction vector of path constraints. More...
 
TRITON_EXPORT std::vector< triton::engines::symbolic::PathConstraintgetPathConstraints (triton::usize start, triton::usize end) const
 [symbolic api] - Returns the logical conjunction vector of path constraints from a given range. More...
 
TRITON_EXPORT std::vector< triton::engines::symbolic::PathConstraintgetPathConstraintsOfThread (triton::uint32 threadId) const
 [symbolic api] - Returns the logical conjunction vector of path constraint of a given thread. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getPathPredicate (void)
 [symbolic api] - Returns the current path predicate as an AST of logical conjunction of each taken branch. More...
 
TRITON_EXPORT std::vector< triton::ast::SharedAbstractNodegetPredicatesToReachAddress (triton::uint64 addr)
 [symbolic api] - Returns path predicates which may reach the targeted address. More...
 
TRITON_EXPORT triton::usize getSizeOfPathConstraints (void) const
 [symbolic api] - Returns the size of the path constraints More...
 
TRITON_EXPORT void pushPathConstraint (const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 [symbolic api] - Pushes constraint created from node to the current path predicate. More...
 
TRITON_EXPORT void pushPathConstraint (const triton::engines::symbolic::PathConstraint &pco)
 [symbolic api] - Pushes constraint to the current path predicate. More...
 
TRITON_EXPORT void popPathConstraint (void)
 [symbolic api] - Pops the last constraints added to the path predicate. More...
 
TRITON_EXPORT void clearPathConstraints (void)
 [symbolic api] - Clears the current path predicate. More...
 
TRITON_EXPORT bool isSymbolicExpressionExists (triton::usize symExprId) const
 [symbolic api] - Returns true if the symbolic expression ID exists. More...
 
TRITON_EXPORT bool isMemorySymbolized (const triton::arch::MemoryAccess &mem) const
 [symbolic api] - Returns true if memory cell expressions contain symbolic variables. More...
 
TRITON_EXPORT bool isMemorySymbolized (triton::uint64 addr, triton::uint32 size=1) const
 [symbolic api] - Returns true if memory cell expressions contain symbolic variables. More...
 
TRITON_EXPORT bool isRegisterSymbolized (const triton::arch::Register &reg) const
 [symbolic api] - Returns true if the register expression contains a symbolic variable. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable symbolizeExpression (triton::usize exprId, triton::uint32 symVarSize, const std::string &symVarAlias="")
 [symbolic api] - Converts a symbolic expression to a symbolic variable. symVarSize must be in bits. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable symbolizeMemory (const triton::arch::MemoryAccess &mem, const std::string &symVarAlias="")
 [symbolic api] - Converts a symbolic memory expression to a symbolic variable. More...
 
TRITON_EXPORT triton::engines::symbolic::SharedSymbolicVariable symbolizeRegister (const triton::arch::Register &reg, const std::string &symVarAlias="")
 [symbolic api] - Converts a symbolic register expression to a symbolic variable. More...
 
TRITON_EXPORT void concretizeAllMemory (void)
 [symbolic api] - Concretizes all symbolic memory references. More...
 
TRITON_EXPORT void concretizeAllRegister (void)
 [symbolic api] - Concretizes all symbolic register references. More...
 
TRITON_EXPORT void concretizeMemory (const triton::arch::MemoryAccess &mem)
 [symbolic api] - Concretizes a specific symbolic memory reference. More...
 
TRITON_EXPORT void concretizeMemory (triton::uint64 addr)
 [symbolic api] - Concretizes a specific symbolic memory reference. More...
 
TRITON_EXPORT void concretizeRegister (const triton::arch::Register &reg)
 [symbolic api] - Concretizes a specific symbolic register reference. More...
 
TRITON_EXPORT std::unordered_map< triton::usize, triton::engines::symbolic::SharedSymbolicExpressionsliceExpressions (const triton::engines::symbolic::SharedSymbolicExpression &expr)
 [symbolic api] - Slices all expressions from a given one. More...
 
TRITON_EXPORT std::vector< triton::engines::symbolic::SharedSymbolicExpressiongetTaintedSymbolicExpressions (void) const
 [symbolic api] - Returns the list of the tainted symbolic expressions. More...
 
TRITON_EXPORT std::unordered_map< triton::usize, triton::engines::symbolic::SharedSymbolicExpressiongetSymbolicExpressions (void) const
 [symbolic api] - Returns all symbolic expressions as a map of <SymExprId : SymExpr> More...
 
TRITON_EXPORT std::unordered_map< triton::usize, triton::engines::symbolic::SharedSymbolicVariablegetSymbolicVariables (void) const
 [symbolic api] - Returns all symbolic variables as a map of <SymVarId : SymVar> More...
 
TRITON_EXPORT triton::uint512 getConcreteVariableValue (const triton::engines::symbolic::SharedSymbolicVariable &symVar) const
 [symbolic api] - Gets the concrete value of a symbolic variable. More...
 
TRITON_EXPORT void setConcreteVariableValue (const triton::engines::symbolic::SharedSymbolicVariable &symVar, const triton::uint512 &value)
 [symbolic api] - Sets the concrete value of a symbolic variable. More...
 
TRITON_EXPORT std::unordered_map< triton::usize, triton::engines::solver::SolverModelgetModel (const triton::ast::SharedAbstractNode &node, triton::engines::solver::status_e *status=nullptr, triton::uint32 timeout=0, triton::uint32 *solvingTime=nullptr) const
 [solver api] - Computes and returns a model from a symbolic constraint. State is returned in the status pointer as well as the solving time. A timeout can also be defined. More...
 
TRITON_EXPORT std::vector< std::unordered_map< triton::usize, triton::engines::solver::SolverModel > > getModels (const triton::ast::SharedAbstractNode &node, triton::uint32 limit, triton::engines::solver::status_e *status=nullptr, triton::uint32 timeout=0, triton::uint32 *solvingTime=nullptr) const
 [solver api] - Computes and returns several models from a symbolic constraint. The limit is the number of models returned. State is returned in the status pointer as well as the solving time. A timeout can also be defined. More...
 
TRITON_EXPORT bool isSat (const triton::ast::SharedAbstractNode &node, triton::engines::solver::status_e *status=nullptr, triton::uint32 timeout=0, triton::uint32 *solvingTime=nullptr) const
 Returns true if an expression is satisfiable. More...
 
TRITON_EXPORT triton::engines::solver::solver_e getSolver (void) const
 Returns the kind of solver as triton::engines::solver::solver_e. More...
 
TRITON_EXPORT const triton::engines::solver::SolverInterfacegetSolverInstance (void) const
 Returns the instance of the initialized solver. More...
 
TRITON_EXPORT void setSolver (triton::engines::solver::solver_e kind)
 Initializes a predefined solver. More...
 
TRITON_EXPORT void setCustomSolver (triton::engines::solver::SolverInterface *customSolver)
 Initializes a custom solver. More...
 
TRITON_EXPORT bool isSolverValid (void) const
 Returns true if the solver is valid. More...
 
TRITON_EXPORT triton::uint512 evaluateAstViaSolver (const triton::ast::SharedAbstractNode &node) const
 [solver api] - Evaluates a Triton's AST via the solver and returns a concrete value. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode simplifyAstViaSolver (const triton::ast::SharedAbstractNode &node) const
 [solver api] - Converts a Triton's AST to a solver's AST, perform a simplification and returns a Triton's AST. More...
 
TRITON_EXPORT void setSolverTimeout (triton::uint32 ms)
 [solver api] - Defines a solver timeout (in milliseconds). More...
 
TRITON_EXPORT void setSolverMemoryLimit (triton::uint32 limit)
 [solver api] - Defines a solver memory consumption limit (in megabytes). More...
 
TRITON_EXPORT triton::engines::taint::TaintEnginegetTaintEngine (void)
 [taint api] - Returns the instance of the taint engine. More...
 
TRITON_EXPORT const std::unordered_set< triton::uint64 > & getTaintedMemory (void) const
 [taint api] - Returns the tainted addresses. More...
 
TRITON_EXPORT std::unordered_set< const triton::arch::Register * > getTaintedRegisters (void) const
 [taint api] - Returns the tainted registers. More...
 
TRITON_EXPORT bool isTainted (const triton::arch::OperandWrapper &op) const
 [taint api] - Abstract taint verification. Returns true if the operand is tainted. More...
 
TRITON_EXPORT bool isMemoryTainted (triton::uint64 addr, triton::uint32 size=1) const
 [taint api] - Returns true if the address:size is tainted. More...
 
TRITON_EXPORT bool isMemoryTainted (const triton::arch::MemoryAccess &mem) const
 [taint api] - Returns true if the memory is tainted. More...
 
TRITON_EXPORT bool isRegisterTainted (const triton::arch::Register &reg) const
 [taint api] - Returns true if the register is tainted. More...
 
TRITON_EXPORT bool setTaint (const triton::arch::OperandWrapper &op, bool flag)
 [taint api] - Sets the flag (taint or untaint) to an abstract operand (Register or Memory). More...
 
TRITON_EXPORT bool setTaintMemory (const triton::arch::MemoryAccess &mem, bool flag)
 [taint api] - Sets the flag (taint or untaint) to a memory. More...
 
TRITON_EXPORT bool setTaintRegister (const triton::arch::Register &reg, bool flag)
 [taint api] - Sets the flag (taint or untaint) to a register. More...
 
TRITON_EXPORT bool taintMemory (triton::uint64 addr)
 [taint api] - Taints an address. Returns TAINTED if the address has been tainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool taintMemory (const triton::arch::MemoryAccess &mem)
 [taint api] - Taints a memory. Returns TAINTED if the memory has been tainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool taintRegister (const triton::arch::Register &reg)
 [taint api] - Taints a register. Returns TAINTED if the register has been tainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool untaintMemory (triton::uint64 addr)
 [taint api] - Untaints an address. Returns !TAINTED if the address has been untainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool untaintMemory (const triton::arch::MemoryAccess &mem)
 [taint api] - Untaints a memory. Returns !TAINTED if the memory has been untainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool untaintRegister (const triton::arch::Register &reg)
 [taint api] - Untaints a register. Returns !TAINTED if the register has been untainted correctly. Otherwise it returns the last defined state. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
 [taint api] - Abstract union tainting. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::MemoryAccess &memDst, const triton::arch::Immediate &imm)
 [taint api] - Taints MemoryImmediate with union. Returns true if the memDst is TAINTED. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::MemoryAccess &memDst, const triton::arch::MemoryAccess &memSrc)
 [taint api] - Taints MemoryMemory with union. Returns true if the memDst or memSrc are TAINTED. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::MemoryAccess &memDst, const triton::arch::Register &regSrc)
 [taint api] - Taints MemoryRegister with union. Returns true if the memDst or regSrc are TAINTED. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::Register &regDst, const triton::arch::Immediate &imm)
 [taint api] - Taints RegisterImmediate with union. Returns true if the regDst is TAINTED. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::Register &regDst, const triton::arch::MemoryAccess &memSrc)
 [taint api] - Taints RegisterMemory with union. Returns true if the regDst or memSrc are TAINTED. More...
 
TRITON_EXPORT bool taintUnion (const triton::arch::Register &regDst, const triton::arch::Register &regSrc)
 [taint api] - Taints RegisterRegister with union. Returns true if the regDst or regSrc are TAINTED. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
 [taint api] - Abstract assignment tainting. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::MemoryAccess &memDst, const triton::arch::Immediate &imm)
 [taint api] - Taints MemoryImmediate with assignment. Returns always false. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::MemoryAccess &memDst, const triton::arch::MemoryAccess &memSrc)
 [taint api] - Taints MemoryMemory with assignment. Returns true if the memDst is tainted. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::MemoryAccess &memDst, const triton::arch::Register &regSrc)
 [taint api] - Taints MemoryRegister with assignment. Returns true if the memDst is tainted. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::Register &regDst, const triton::arch::Immediate &imm)
 [taint api] - Taints RegisterImmediate with assignment. Returns always false. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::Register &regDst, const triton::arch::MemoryAccess &memSrc)
 [taint api] - Taints RegisterMemory with assignment. Returns true if the regDst is tainted. More...
 
TRITON_EXPORT bool taintAssignment (const triton::arch::Register &regDst, const triton::arch::Register &regSrc)
 [taint api] - Taints RegisterRegister with assignment. Returns true if the regDst is tainted. More...
 
TRITON_EXPORT triton::engines::synthesis::SynthesisResult synthesize (const triton::ast::SharedAbstractNode &node, bool constant=true, bool subexpr=true, bool opaque=false)
 [synthesizer api] - Synthesizes a given node. If constant is true, performa a constant synthesis. If opaque is true, perform opaque constant synthesis. If subexpr is true, analyze children AST. More...
 
TRITON_EXPORT std::ostream & liftToLLVM (std::ostream &stream, const triton::ast::SharedAbstractNode &node, const char *fname="__triton", bool optimize=false)
 [lifting api] - Lifts an AST and all its references to LLVM format. fname represents the name of the LLVM function. More...
 
TRITON_EXPORT std::ostream & liftToLLVM (std::ostream &stream, const triton::engines::symbolic::SharedSymbolicExpression &expr, const char *fname="__triton", bool optimize=false)
 [lifting api] - Lifts a symbolic expression and all its references to LLVM format. fname represents the name of the LLVM function. More...
 
TRITON_EXPORT std::ostream & liftToPython (std::ostream &stream, const triton::engines::symbolic::SharedSymbolicExpression &expr, bool icomment=false)
 [lifting api] - Lifts a symbolic expression and all its references to Python format. If icomment is true, then print instructions assembly in expression comments. More...
 
TRITON_EXPORT std::ostream & liftToSMT (std::ostream &stream, const triton::engines::symbolic::SharedSymbolicExpression &expr, bool assert_=false, bool icomment=false)
 [lifting api] - Lifts a symbolic expression and all its references to SMT format. If assert_ is true, then (assert <expr>). If icomment is true, then print instructions assembly in expression comments. More...
 
TRITON_EXPORT std::ostream & liftToDot (std::ostream &stream, const triton::ast::SharedAbstractNode &node)
 [lifting api] - Lifts an AST and all its references to Dot format. More...
 
TRITON_EXPORT std::ostream & liftToDot (std::ostream &stream, const triton::engines::symbolic::SharedSymbolicExpression &expr)
 [lifting api] - Lifts a symbolic expression and all its references to Dot format. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode simplifyAstViaLLVM (const triton::ast::SharedAbstractNode &node) const
 [lifting api] - Lifts and simplify an AST using LLVM More...
 

Public Attributes

triton::arch::ShortcutRegister registers
 A shortcut to access to a Register class from a register name. More...
 

Protected Attributes

triton::callbacks::Callbacks callbacks
 The Callbacks interface. More...
 
triton::arch::Architecture arch
 The architecture entry. More...
 
triton::modes::SharedModes modes
 The modes. More...
 
triton::engines::lifters::LiftingEnginelifting = nullptr
 The lifting engine. More...
 
triton::engines::taint::TaintEnginetaint = nullptr
 The taint engine. More...
 
triton::engines::symbolic::SymbolicEnginesymbolic = nullptr
 The symbolic engine. More...
 
triton::engines::solver::SolverEnginesolver = nullptr
 The solver engine. More...
 
triton::ast::SharedAstContext astCtxt
 The AST Context interface. More...
 
triton::arch::IrBuilderirBuilder = nullptr
 The IR builder. More...
 

Detailed Description

This is used as C++ API.

Definition at line 45 of file api.hpp.

Constructor & Destructor Documentation

◆ API() [1/2]

triton::API::API ( )

Constructor of the API.

Definition at line 167 of file api.cpp.

◆ API() [2/2]

triton::API::API ( triton::arch::architecture_e  arch)

Constructor of the API.

Definition at line 175 of file api.cpp.

◆ ~API()

triton::API::~API ( )

Destructor of the API.

Definition at line 181 of file api.cpp.

Member Function Documentation

◆ addCallback()

template<typename T >
template TRITON_EXPORT void triton::API::addCallback ( triton::callbacks::callback_e  kind,
cb 
)
inline

[callbacks api] - Adds a callback.

Definition at line 307 of file api.hpp.

◆ assignSymbolicExpressionToMemory()

void triton::API::assignSymbolicExpressionToMemory ( const triton::engines::symbolic::SharedSymbolicExpression se,
const triton::arch::MemoryAccess mem 
)

[symbolic api] - Assigns a symbolic expression to a memory.

Definition at line 777 of file api.cpp.

◆ assignSymbolicExpressionToRegister()

void triton::API::assignSymbolicExpressionToRegister ( const triton::engines::symbolic::SharedSymbolicExpression se,
const triton::arch::Register reg 
)

[symbolic api] - Assigns a symbolic expression to a register.

Definition at line 783 of file api.cpp.

◆ buildSemantics() [1/2]

triton::arch::exception_e triton::API::buildSemantics ( triton::arch::BasicBlock block)

[IR builder api] - Builds the instructions semantics of a block. Returns triton::arch::NO_FAULT if succeed.

Definition at line 575 of file api.cpp.

◆ buildSemantics() [2/2]

triton::arch::exception_e triton::API::buildSemantics ( triton::arch::Instruction inst)

[IR builder api] - Builds the instruction semantics. Returns triton::arch::NO_FAULT if succeed.

Definition at line 569 of file api.cpp.

◆ clearArchitecture()

void triton::API::clearArchitecture ( void  )

[architecture api] - Clears the architecture states (registers and memory).

Definition at line 257 of file api.cpp.

◆ clearCallbacks()

void triton::API::clearCallbacks ( void  )

[callbacks api] - Clears recorded callbacks.

Definition at line 615 of file api.cpp.

◆ clearConcreteMemoryValue() [1/2]

void triton::API::clearConcreteMemoryValue ( const triton::arch::MemoryAccess mem)

Clears concrete values assigned to the memory cells.

Definition at line 450 of file api.cpp.

◆ clearConcreteMemoryValue() [2/2]

void triton::API::clearConcreteMemoryValue ( triton::uint64  baseAddr,
triton::usize  size = 1 
)

Clears concrete values assigned to the memory cells.

Definition at line 456 of file api.cpp.

◆ clearModes()

void triton::API::clearModes ( void  )

[modes api] - Clears recorded modes.

Definition at line 655 of file api.cpp.

◆ clearPathConstraints()

void triton::API::clearPathConstraints ( void  )

[symbolic api] - Clears the current path predicate.

Definition at line 941 of file api.cpp.

◆ concretizeAllMemory()

void triton::API::concretizeAllMemory ( void  )

[symbolic api] - Concretizes all symbolic memory references.

Definition at line 971 of file api.cpp.

◆ concretizeAllRegister()

void triton::API::concretizeAllRegister ( void  )

[symbolic api] - Concretizes all symbolic register references.

Definition at line 977 of file api.cpp.

◆ concretizeMemory() [1/2]

void triton::API::concretizeMemory ( const triton::arch::MemoryAccess mem)

[symbolic api] - Concretizes a specific symbolic memory reference.

Definition at line 983 of file api.cpp.

◆ concretizeMemory() [2/2]

void triton::API::concretizeMemory ( triton::uint64  addr)

[symbolic api] - Concretizes a specific symbolic memory reference.

Definition at line 989 of file api.cpp.

◆ concretizeRegister()

void triton::API::concretizeRegister ( const triton::arch::Register reg)

[symbolic api] - Concretizes a specific symbolic register reference.

Definition at line 995 of file api.cpp.

◆ createSymbolicExpression()

const triton::engines::symbolic::SharedSymbolicExpression & triton::API::createSymbolicExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::OperandWrapper dst,
const std::string &  comment = "" 
)

[symbolic api] - Returns the new shared symbolic abstract expression and links this expression to the instruction.

Definition at line 753 of file api.cpp.

◆ createSymbolicMemoryExpression()

const triton::engines::symbolic::SharedSymbolicExpression & triton::API::createSymbolicMemoryExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::MemoryAccess mem,
const std::string &  comment = "" 
)

[symbolic api] - Returns the new shared symbolic memory expression and links this expression to the instruction.

Definition at line 759 of file api.cpp.

◆ createSymbolicRegisterExpression()

const triton::engines::symbolic::SharedSymbolicExpression & triton::API::createSymbolicRegisterExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::Register reg,
const std::string &  comment = "" 
)

[symbolic api] - Returns the new shared symbolic register expression and links this expression to the instruction.

Definition at line 765 of file api.cpp.

◆ createSymbolicVolatileExpression()

const triton::engines::symbolic::SharedSymbolicExpression & triton::API::createSymbolicVolatileExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const std::string &  comment = "" 
)

[symbolic api] - Returns the new shared symbolic volatile expression and links this expression to the instruction.

Definition at line 771 of file api.cpp.

◆ disassembly() [1/4]

void triton::API::disassembly ( triton::arch::BasicBlock block,
triton::uint64  addr = 0 
) const

[architecture api] - Disassembles a block of instructions. You must define an architecture before.

Definition at line 468 of file api.cpp.

◆ disassembly() [2/4]

void triton::API::disassembly ( triton::arch::Instruction inst) const

[architecture api] - Disassembles the instruction and setup operands.

Definition at line 462 of file api.cpp.

◆ disassembly() [3/4]

triton::arch::BasicBlock triton::API::disassembly ( triton::uint64  addr) const

[architecture api] - Disassembles a concrete memory area from addr to control flow instruction and returns a BasicBlock.

Definition at line 480 of file api.cpp.

◆ disassembly() [4/4]

std::vector< triton::arch::Instruction > triton::API::disassembly ( triton::uint64  addr,
triton::usize  count 
) const

[architecture api] - Disassembles a concrete memory area and returns a list of at most count disassembled instructions.

Definition at line 474 of file api.cpp.

◆ evaluateAstViaSolver()

triton::uint512 triton::API::evaluateAstViaSolver ( const triton::ast::SharedAbstractNode node) const

[solver api] - Evaluates a Triton's AST via the solver and returns a concrete value.

Definition at line 1076 of file api.cpp.

◆ getAllRegisters()

const std::unordered_map< triton::arch::register_e, const triton::arch::Register > & triton::API::getAllRegisters ( void  ) const

[architecture api] - Returns all registers.

See also
triton::arch::x86::register_e.

Definition at line 343 of file api.cpp.

◆ getArchitecture()

triton::arch::architecture_e triton::API::getArchitecture ( void  ) const

[architecture api] - Returns the architecture as triton::arch::architecture_e.

Definition at line 230 of file api.cpp.

◆ getAstContext()

triton::ast::SharedAstContext triton::API::getAstContext ( void  )

[IR builder api] - Returns the AST context. Used as AST builder.

Definition at line 581 of file api.cpp.

◆ getAstRepresentationMode()

triton::ast::representations::mode_e triton::API::getAstRepresentationMode ( void  ) const

[AST representation api] - Returns the AST representation as triton::ast::representation_e.

Definition at line 589 of file api.cpp.

◆ getConcreteMemoryAreaValue()

std::vector< triton::uint8 > triton::API::getConcreteMemoryAreaValue ( triton::uint64  baseAddr,
triton::usize  size,
bool  execCallbacks = true 
) const

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

Definition at line 367 of file api.cpp.

◆ getConcreteMemoryValue() [1/2]

triton::uint512 triton::API::getConcreteMemoryValue ( const triton::arch::MemoryAccess mem,
bool  execCallbacks = true 
) const

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

Definition at line 361 of file api.cpp.

◆ getConcreteMemoryValue() [2/2]

triton::uint8 triton::API::getConcreteMemoryValue ( triton::uint64  addr,
bool  execCallbacks = true 
) const

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

Definition at line 355 of file api.cpp.

◆ getConcreteRegisterValue()

triton::uint512 triton::API::getConcreteRegisterValue ( const triton::arch::Register reg,
bool  execCallbacks = true 
) const

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

Definition at line 373 of file api.cpp.

◆ getConcreteVariableValue()

triton::uint512 triton::API::getConcreteVariableValue ( const triton::engines::symbolic::SharedSymbolicVariable symVar) const

[symbolic api] - Gets the concrete value of a symbolic variable.

Definition at line 863 of file api.cpp.

◆ getCpuInstance()

triton::arch::CpuInterface * triton::API::getCpuInstance ( void  )

[architecture api] - Returns the instance of the current CPU used.

Definition at line 240 of file api.cpp.

◆ getEndianness()

triton::arch::endianness_e triton::API::getEndianness ( void  ) const

[architecture api] - Returns the endianness as triton::arch::endianness_e.

Definition at line 235 of file api.cpp.

◆ getGprBitSize()

triton::uint32 triton::API::getGprBitSize ( void  ) const

[architecture api] - Returns the bit in byte of the General Purpose Registers.

Definition at line 323 of file api.cpp.

◆ getGprSize()

triton::uint32 triton::API::getGprSize ( void  ) const

[architecture api] - Returns the size in byte of the General Purpose Registers.

Definition at line 328 of file api.cpp.

◆ getImmediateAst() [1/2]

triton::ast::SharedAbstractNode triton::API::getImmediateAst ( const triton::arch::Immediate imm)

[symbolic api] - Returns the AST corresponding to the immediate.

Definition at line 699 of file api.cpp.

◆ getImmediateAst() [2/2]

triton::ast::SharedAbstractNode triton::API::getImmediateAst ( triton::arch::Instruction inst,
const triton::arch::Immediate imm 
)

[symbolic api] - Returns the AST corresponding to the immediate and defines the immediate as input of the instruction..

Definition at line 705 of file api.cpp.

◆ getMemoryAst() [1/2]

triton::ast::SharedAbstractNode triton::API::getMemoryAst ( const triton::arch::MemoryAccess mem)

[symbolic api] - Returns the AST corresponding to the memory.

Definition at line 711 of file api.cpp.

◆ getMemoryAst() [2/2]

triton::ast::SharedAbstractNode triton::API::getMemoryAst ( triton::arch::Instruction inst,
const triton::arch::MemoryAccess mem 
)

[symbolic api] - Returns the AST corresponding to the memory and defines the memory cell as input of the instruction.

Definition at line 717 of file api.cpp.

◆ getModel()

std::unordered_map< triton::usize, triton::engines::solver::SolverModel > triton::API::getModel ( const triton::ast::SharedAbstractNode node,
triton::engines::solver::status_e status = nullptr,
triton::uint32  timeout = 0,
triton::uint32 solvingTime = nullptr 
) const

[solver api] - Computes and returns a model from a symbolic constraint. State is returned in the status pointer as well as the solving time. A timeout can also be defined.

item1: symbolic variable id
item2: model

Definition at line 1058 of file api.cpp.

◆ getModels()

std::vector< std::unordered_map< triton::usize, triton::engines::solver::SolverModel > > triton::API::getModels ( const triton::ast::SharedAbstractNode node,
triton::uint32  limit,
triton::engines::solver::status_e status = nullptr,
triton::uint32  timeout = 0,
triton::uint32 solvingTime = nullptr 
) const

[solver api] - Computes and returns several models from a symbolic constraint. The limit is the number of models returned. State is returned in the status pointer as well as the solving time. A timeout can also be defined.

item1: symbolic variable id
item2: model

Definition at line 1064 of file api.cpp.

◆ getNopInstruction()

const triton::arch::Instruction triton::API::getNopInstruction ( void  ) const

Returns a NOP instruction according to the architecture.

Definition at line 338 of file api.cpp.

◆ getNumberOfRegisters()

triton::uint32 triton::API::getNumberOfRegisters ( void  ) const

[architecture api] - Returns the number of registers according to the CPU architecture.

Definition at line 333 of file api.cpp.

◆ getOperandAst() [1/2]

triton::ast::SharedAbstractNode triton::API::getOperandAst ( const triton::arch::OperandWrapper op)

[symbolic api] - Returns the AST corresponding to the operand.

Definition at line 687 of file api.cpp.

◆ getOperandAst() [2/2]

triton::ast::SharedAbstractNode triton::API::getOperandAst ( triton::arch::Instruction inst,
const triton::arch::OperandWrapper op 
)

[symbolic api] - Returns the AST corresponding to the operand.

Definition at line 693 of file api.cpp.

◆ getParentRegister() [1/2]

const triton::arch::Register & triton::API::getParentRegister ( const triton::arch::Register reg) const

[architecture api] - Returns parent Register from a register.

Definition at line 293 of file api.cpp.

◆ getParentRegister() [2/2]

const triton::arch::Register & triton::API::getParentRegister ( triton::arch::register_e  id) const

[architecture api] - Returns parent Register from regId.

Definition at line 298 of file api.cpp.

◆ getParentRegisters()

std::set< const triton::arch::Register * > triton::API::getParentRegisters ( void  ) const

[architecture api] - Returns all parent registers.

See also
triton::arch::x86::register_e.

Definition at line 349 of file api.cpp.

◆ getPathConstraints() [1/2]

std::vector< triton::engines::symbolic::PathConstraint > triton::API::getPathConstraints ( triton::usize  start,
triton::usize  end 
) const

[symbolic api] - Returns the logical conjunction vector of path constraints from a given range.

Definition at line 893 of file api.cpp.

◆ getPathConstraints() [2/2]

const std::vector< triton::engines::symbolic::PathConstraint > & triton::API::getPathConstraints ( void  ) const

[symbolic api] - Returns the logical conjunction vector of path constraints.

Definition at line 887 of file api.cpp.

◆ getPathConstraintsOfThread()

std::vector< triton::engines::symbolic::PathConstraint > triton::API::getPathConstraintsOfThread ( triton::uint32  threadId) const

[symbolic api] - Returns the logical conjunction vector of path constraint of a given thread.

Definition at line 899 of file api.cpp.

◆ getPathPredicate()

triton::ast::SharedAbstractNode triton::API::getPathPredicate ( void  )

[symbolic api] - Returns the current path predicate as an AST of logical conjunction of each taken branch.

Definition at line 911 of file api.cpp.

◆ getPredicatesToReachAddress()

std::vector< triton::ast::SharedAbstractNode > triton::API::getPredicatesToReachAddress ( triton::uint64  addr)

[symbolic api] - Returns path predicates which may reach the targeted address.

Definition at line 917 of file api.cpp.

◆ getRegister() [1/2]

const triton::arch::Register & triton::API::getRegister ( const std::string &  name) const

[architecture api] - Returns Register from its name.

Definition at line 288 of file api.cpp.

◆ getRegister() [2/2]

const triton::arch::Register & triton::API::getRegister ( triton::arch::register_e  id) const

[architecture api] - Returns Register from regId.

Definition at line 283 of file api.cpp.

◆ getRegisterAst() [1/2]

triton::ast::SharedAbstractNode triton::API::getRegisterAst ( const triton::arch::Register reg)

[symbolic api] - Returns the AST corresponding to the register.

Definition at line 723 of file api.cpp.

◆ getRegisterAst() [2/2]

triton::ast::SharedAbstractNode triton::API::getRegisterAst ( triton::arch::Instruction inst,
const triton::arch::Register reg 
)

[symbolic api] - Returns the AST corresponding to the register and defines the register as input of the instruction.

Definition at line 729 of file api.cpp.

◆ getSizeOfPathConstraints()

triton::usize triton::API::getSizeOfPathConstraints ( void  ) const

[symbolic api] - Returns the size of the path constraints

Definition at line 905 of file api.cpp.

◆ getSolver()

triton::engines::solver::solver_e triton::API::getSolver ( void  ) const

Returns the kind of solver as triton::engines::solver::solver_e.

Definition at line 1028 of file api.cpp.

◆ getSolverInstance()

const triton::engines::solver::SolverInterface * triton::API::getSolverInstance ( void  ) const

Returns the instance of the initialized solver.

Definition at line 1034 of file api.cpp.

◆ getSymbolicEngine()

triton::engines::symbolic::SymbolicEngine * triton::API::getSymbolicEngine ( void  )

[symbolic api] - Returns the instance of the symbolic engine.

Definition at line 663 of file api.cpp.

◆ getSymbolicExpression()

triton::engines::symbolic::SharedSymbolicExpression triton::API::getSymbolicExpression ( triton::usize  symExprId) const

[symbolic api] - Returns the shared symbolic expression corresponding to an id.

Definition at line 857 of file api.cpp.

◆ getSymbolicExpressions()

std::unordered_map< triton::usize, triton::engines::symbolic::SharedSymbolicExpression > triton::API::getSymbolicExpressions ( void  ) const

[symbolic api] - Returns all symbolic expressions as a map of <SymExprId : SymExpr>

Definition at line 1013 of file api.cpp.

◆ getSymbolicMemory() [1/2]

triton::engines::symbolic::SharedSymbolicExpression triton::API::getSymbolicMemory ( triton::uint64  addr) const

[symbolic api] - Returns the shared symbolic expression corresponding to the memory address.

Definition at line 789 of file api.cpp.

◆ getSymbolicMemory() [2/2]

std::unordered_map< triton::uint64, triton::engines::symbolic::SharedSymbolicExpression > triton::API::getSymbolicMemory ( void  ) const

[symbolic api] - Returns the map (<Addr : SymExpr>) of symbolic memory defined.

Definition at line 801 of file api.cpp.

◆ getSymbolicMemoryAreaValue()

std::vector< triton::uint8 > triton::API::getSymbolicMemoryAreaValue ( triton::uint64  baseAddr,
triton::usize  size 
)

[symbolic api] - Returns the symbolic values of a memory area.

Definition at line 825 of file api.cpp.

◆ getSymbolicMemoryValue() [1/2]

triton::uint512 triton::API::getSymbolicMemoryValue ( const triton::arch::MemoryAccess mem)

[symbolic api] - Returns the symbolic memory value.

Definition at line 819 of file api.cpp.

◆ getSymbolicMemoryValue() [2/2]

triton::uint8 triton::API::getSymbolicMemoryValue ( triton::uint64  address)

[symbolic api] - Returns the symbolic memory value.

Definition at line 813 of file api.cpp.

◆ getSymbolicRegister()

const triton::engines::symbolic::SharedSymbolicExpression & triton::API::getSymbolicRegister ( const triton::arch::Register reg) const

[symbolic api] - Returns the shared symbolic expression corresponding to the parent register.

Definition at line 807 of file api.cpp.

◆ getSymbolicRegisters()

std::unordered_map< triton::arch::register_e, triton::engines::symbolic::SharedSymbolicExpression > triton::API::getSymbolicRegisters ( void  ) const

[symbolic api] - Returns the map of symbolic registers defined.

Definition at line 795 of file api.cpp.

◆ getSymbolicRegisterValue()

triton::uint512 triton::API::getSymbolicRegisterValue ( const triton::arch::Register reg)

[symbolic api] - Returns the symbolic register value.

Definition at line 831 of file api.cpp.

◆ getSymbolicVariable() [1/2]

triton::engines::symbolic::SharedSymbolicVariable triton::API::getSymbolicVariable ( const std::string &  symVarName) const

[symbolic api] - Returns the symbolic variable corresponding to the symbolic variable name.

Definition at line 881 of file api.cpp.

◆ getSymbolicVariable() [2/2]

triton::engines::symbolic::SharedSymbolicVariable triton::API::getSymbolicVariable ( triton::usize  symVarId) const

[symbolic api] - Returns the symbolic variable corresponding to the symbolic variable id.

Definition at line 875 of file api.cpp.

◆ getSymbolicVariables()

std::unordered_map< triton::usize, triton::engines::symbolic::SharedSymbolicVariable > triton::API::getSymbolicVariables ( void  ) const

[symbolic api] - Returns all symbolic variables as a map of <SymVarId : SymVar>

Definition at line 1019 of file api.cpp.

◆ getTaintedMemory()

const std::unordered_set< triton::uint64 > & triton::API::getTaintedMemory ( void  ) const

[taint api] - Returns the tainted addresses.

Definition at line 1124 of file api.cpp.

◆ getTaintedRegisters()

std::unordered_set< const triton::arch::Register * > triton::API::getTaintedRegisters ( void  ) const

[taint api] - Returns the tainted registers.

Definition at line 1130 of file api.cpp.

◆ getTaintedSymbolicExpressions()

std::vector< triton::engines::symbolic::SharedSymbolicExpression > triton::API::getTaintedSymbolicExpressions ( void  ) const

[symbolic api] - Returns the list of the tainted symbolic expressions.

Definition at line 1007 of file api.cpp.

◆ getTaintEngine()

triton::engines::taint::TaintEngine * triton::API::getTaintEngine ( void  )

[taint api] - Returns the instance of the taint engine.

Definition at line 1118 of file api.cpp.

◆ initEngines()

void triton::API::initEngines ( void  )

[proccesing api] - Initializes everything.

Definition at line 489 of file api.cpp.

◆ isArchitectureValid()

bool triton::API::isArchitectureValid ( void  ) const

[Architecture api] - Returns true if the architecture is valid.

Definition at line 225 of file api.cpp.

◆ isConcreteMemoryValueDefined() [1/2]

bool triton::API::isConcreteMemoryValueDefined ( const triton::arch::MemoryAccess mem) const

Returns true if memory cells have a defined concrete value.

Definition at line 438 of file api.cpp.

◆ isConcreteMemoryValueDefined() [2/2]

bool triton::API::isConcreteMemoryValueDefined ( triton::uint64  baseAddr,
triton::usize  size = 1 
) const

Returns true if memory cells have a defined concrete value.

Definition at line 444 of file api.cpp.

◆ isFlag() [1/2]

bool triton::API::isFlag ( const triton::arch::Register reg) const

[architecture api] - Returns true if the register id is a flag.

Definition at line 268 of file api.cpp.

◆ isFlag() [2/2]

bool triton::API::isFlag ( triton::arch::register_e  regId) const

[architecture api] - Returns true if the register id is a flag.

See also
triton::arch::x86::register_e.

Definition at line 263 of file api.cpp.

◆ isMemorySymbolized() [1/2]

bool triton::API::isMemorySymbolized ( const triton::arch::MemoryAccess mem) const

[symbolic api] - Returns true if memory cell expressions contain symbolic variables.

Definition at line 953 of file api.cpp.

◆ isMemorySymbolized() [2/2]

bool triton::API::isMemorySymbolized ( triton::uint64  addr,
triton::uint32  size = 1 
) const

[symbolic api] - Returns true if memory cell expressions contain symbolic variables.

Definition at line 959 of file api.cpp.

◆ isMemoryTainted() [1/2]

bool triton::API::isMemoryTainted ( const triton::arch::MemoryAccess mem) const

[taint api] - Returns true if the memory is tainted.

Definition at line 1148 of file api.cpp.

◆ isMemoryTainted() [2/2]

bool triton::API::isMemoryTainted ( triton::uint64  addr,
triton::uint32  size = 1 
) const

[taint api] - Returns true if the address:size is tainted.

Definition at line 1142 of file api.cpp.

◆ isModeEnabled()

bool triton::API::isModeEnabled ( triton::modes::mode_e  mode) const

[modes api] - Returns true if the mode is enabled.

Definition at line 650 of file api.cpp.

◆ isRegister() [1/2]

bool triton::API::isRegister ( const triton::arch::Register reg) const

[architecture api] - Returns true if the regId is a register.

Definition at line 278 of file api.cpp.

◆ isRegister() [2/2]

bool triton::API::isRegister ( triton::arch::register_e  regId) const

[architecture api] - Returns true if the regId is a register.

See also
triton::arch::x86::register_e.

Definition at line 273 of file api.cpp.

◆ isRegisterSymbolized()

bool triton::API::isRegisterSymbolized ( const triton::arch::Register reg) const

[symbolic api] - Returns true if the register expression contains a symbolic variable.

Definition at line 965 of file api.cpp.

◆ isRegisterTainted()

bool triton::API::isRegisterTainted ( const triton::arch::Register reg) const

[taint api] - Returns true if the register is tainted.

Definition at line 1154 of file api.cpp.

◆ isRegisterValid() [1/2]

bool triton::API::isRegisterValid ( const triton::arch::Register reg) const

[architecture api] - Returns true if the regId is a register or a flag.

Definition at line 308 of file api.cpp.

◆ isRegisterValid() [2/2]

bool triton::API::isRegisterValid ( triton::arch::register_e  regId) const

[architecture api] - Returns true if the regId is a register or a flag.

See also
triton::arch::x86::register_e.

Definition at line 303 of file api.cpp.

◆ isSat()

bool triton::API::isSat ( const triton::ast::SharedAbstractNode node,
triton::engines::solver::status_e status = nullptr,
triton::uint32  timeout = 0,
triton::uint32 solvingTime = nullptr 
) const

Returns true if an expression is satisfiable.

Definition at line 1070 of file api.cpp.

◆ isSolverValid()

bool triton::API::isSolverValid ( void  ) const

Returns true if the solver is valid.

Definition at line 1052 of file api.cpp.

◆ isSymbolicExpressionExists()

bool triton::API::isSymbolicExpressionExists ( triton::usize  symExprId) const

[symbolic api] - Returns true if the symbolic expression ID exists.

Definition at line 947 of file api.cpp.

◆ isTainted()

bool triton::API::isTainted ( const triton::arch::OperandWrapper op) const

[taint api] - Abstract taint verification. Returns true if the operand is tainted.

Definition at line 1136 of file api.cpp.

◆ isThumb()

bool triton::API::isThumb ( void  ) const

[architecture api] - Returns true if the execution mode is Thumb. Only useful for Arm32.

Definition at line 313 of file api.cpp.

◆ liftToDot() [1/2]

std::ostream & triton::API::liftToDot ( std::ostream &  stream,
const triton::ast::SharedAbstractNode node 
)

[lifting api] - Lifts an AST and all its references to Dot format.

Definition at line 1339 of file api.cpp.

◆ liftToDot() [2/2]

std::ostream & triton::API::liftToDot ( std::ostream &  stream,
const triton::engines::symbolic::SharedSymbolicExpression expr 
)

[lifting api] - Lifts a symbolic expression and all its references to Dot format.

Definition at line 1345 of file api.cpp.

◆ liftToLLVM() [1/2]

std::ostream & triton::API::liftToLLVM ( std::ostream &  stream,
const triton::ast::SharedAbstractNode node,
const char *  fname = "__triton",
bool  optimize = false 
)

[lifting api] - Lifts an AST and all its references to LLVM format. fname represents the name of the LLVM function.

Definition at line 1313 of file api.cpp.

◆ liftToLLVM() [2/2]

std::ostream & triton::API::liftToLLVM ( std::ostream &  stream,
const triton::engines::symbolic::SharedSymbolicExpression expr,
const char *  fname = "__triton",
bool  optimize = false 
)

[lifting api] - Lifts a symbolic expression and all its references to LLVM format. fname represents the name of the LLVM function.

Definition at line 1322 of file api.cpp.

◆ liftToPython()

std::ostream & triton::API::liftToPython ( std::ostream &  stream,
const triton::engines::symbolic::SharedSymbolicExpression expr,
bool  icomment = false 
)

[lifting api] - Lifts a symbolic expression and all its references to Python format. If icomment is true, then print instructions assembly in expression comments.

Definition at line 1327 of file api.cpp.

◆ liftToSMT()

std::ostream & triton::API::liftToSMT ( std::ostream &  stream,
const triton::engines::symbolic::SharedSymbolicExpression expr,
bool  assert_ = false,
bool  icomment = false 
)

[lifting api] - Lifts a symbolic expression and all its references to SMT format. If assert_ is true, then (assert <expr>). If icomment is true, then print instructions assembly in expression comments.

Definition at line 1333 of file api.cpp.

◆ newSymbolicExpression()

triton::engines::symbolic::SharedSymbolicExpression triton::API::newSymbolicExpression ( const triton::ast::SharedAbstractNode node,
const std::string &  comment = "" 
)

[symbolic api] - Returns a new shared symbolic expression. Note that if there are simplification passes recorded, simplification will be applied.

Definition at line 735 of file api.cpp.

◆ newSymbolicVariable()

triton::engines::symbolic::SharedSymbolicVariable triton::API::newSymbolicVariable ( triton::uint32  varSize,
const std::string &  alias = "" 
)

[symbolic api] - Returns a new symbolic variable.

Definition at line 741 of file api.cpp.

◆ popPathConstraint()

void triton::API::popPathConstraint ( void  )

[symbolic api] - Pops the last constraints added to the path predicate.

Definition at line 935 of file api.cpp.

◆ processCallbacks() [1/3]

void triton::API::processCallbacks ( triton::callbacks::callback_e  kind,
const triton::arch::MemoryAccess mem 
)

[callbacks api] - Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 628 of file api.cpp.

◆ processCallbacks() [2/3]

void triton::API::processCallbacks ( triton::callbacks::callback_e  kind,
const triton::arch::Register reg 
)

[callbacks api] - Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 635 of file api.cpp.

◆ processCallbacks() [3/3]

[callbacks api] - Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 620 of file api.cpp.

◆ processing() [1/2]

triton::arch::exception_e triton::API::processing ( triton::arch::BasicBlock block,
triton::uint64  addr = 0 
)

[proccesing api] - Processes a block of instructions and updates engines according to instructions semantics. Returns triton::arch::NO_FAULT if succeed.

Definition at line 559 of file api.cpp.

◆ processing() [2/2]

triton::arch::exception_e triton::API::processing ( triton::arch::Instruction inst)

[proccesing api] - Processes an instruction and updates engines according to the instruction semantics. Returns triton::arch::NO_FAULT if succeed.

Definition at line 552 of file api.cpp.

◆ pushPathConstraint() [1/2]

void triton::API::pushPathConstraint ( const triton::ast::SharedAbstractNode node,
const std::string &  comment = "" 
)

[symbolic api] - Pushes constraint created from node to the current path predicate.

Definition at line 923 of file api.cpp.

◆ pushPathConstraint() [2/2]

void triton::API::pushPathConstraint ( const triton::engines::symbolic::PathConstraint pco)

[symbolic api] - Pushes constraint to the current path predicate.

Definition at line 929 of file api.cpp.

◆ removeCallback()

template<typename T >
template TRITON_EXPORT void triton::API::removeCallback ( triton::callbacks::callback_e  kind,
cb 
)
inline

[callbacks api] - Removes a callback.

Definition at line 312 of file api.hpp.

◆ removeEngines()

void triton::API::removeEngines ( void  )

[proccesing api] - Removes everything.

Definition at line 517 of file api.cpp.

◆ removeSymbolicExpression()

void triton::API::removeSymbolicExpression ( const triton::engines::symbolic::SharedSymbolicExpression expr)

[symbolic api] - Removes the symbolic expression corresponding to the id.

Definition at line 747 of file api.cpp.

◆ reset()

void triton::API::reset ( void  )

[proccesing api] - Resets everything.

Definition at line 541 of file api.cpp.

◆ setArchitecture()

void triton::API::setArchitecture ( triton::arch::architecture_e  arch)

[architecture api] - Initializes an architecture.

See also
triton::arch::architecture_e.

Definition at line 247 of file api.cpp.

◆ setAstRepresentationMode()

void triton::API::setAstRepresentationMode ( triton::ast::representations::mode_e  mode)

[AST representation api] - Sets the AST representation.

Definition at line 594 of file api.cpp.

◆ setConcreteMemoryAreaValue() [1/2]

void triton::API::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const std::vector< triton::uint8 > &  values 
)

[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.

Definition at line 401 of file api.cpp.

◆ setConcreteMemoryAreaValue() [2/2]

void triton::API::setConcreteMemoryAreaValue ( triton::uint64  baseAddr,
const triton::uint8 area,
triton::usize  size 
)

[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.

Definition at line 414 of file api.cpp.

◆ setConcreteMemoryValue() [1/2]

void triton::API::setConcreteMemoryValue ( const triton::arch::MemoryAccess mem,
const triton::uint512 value 
)

[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.

Definition at line 390 of file api.cpp.

◆ setConcreteMemoryValue() [2/2]

void triton::API::setConcreteMemoryValue ( triton::uint64  addr,
triton::uint8  value 
)

[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.

Definition at line 379 of file api.cpp.

◆ setConcreteRegisterValue()

void triton::API::setConcreteRegisterValue ( const triton::arch::Register reg,
const triton::uint512 value 
)

[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.

Definition at line 427 of file api.cpp.

◆ setConcreteVariableValue()

void triton::API::setConcreteVariableValue ( const triton::engines::symbolic::SharedSymbolicVariable symVar,
const triton::uint512 value 
)

[symbolic api] - Sets the concrete value of a symbolic variable.

Definition at line 869 of file api.cpp.

◆ setCustomSolver()

void triton::API::setCustomSolver ( triton::engines::solver::SolverInterface customSolver)

Initializes a custom solver.

Definition at line 1046 of file api.cpp.

◆ setMode()

void triton::API::setMode ( triton::modes::mode_e  mode,
bool  flag 
)

[modes api] - Enables or disables a specific mode.

Definition at line 645 of file api.cpp.

◆ setSolver()

void triton::API::setSolver ( triton::engines::solver::solver_e  kind)

Initializes a predefined solver.

Definition at line 1040 of file api.cpp.

◆ setSolverMemoryLimit()

void triton::API::setSolverMemoryLimit ( triton::uint32  limit)

[solver api] - Defines a solver memory consumption limit (in megabytes).

Definition at line 1109 of file api.cpp.

◆ setSolverTimeout()

void triton::API::setSolverTimeout ( triton::uint32  ms)

[solver api] - Defines a solver timeout (in milliseconds).

Definition at line 1103 of file api.cpp.

◆ setTaint()

bool triton::API::setTaint ( const triton::arch::OperandWrapper op,
bool  flag 
)

[taint api] - Sets the flag (taint or untaint) to an abstract operand (Register or Memory).

Definition at line 1160 of file api.cpp.

◆ setTaintMemory()

bool triton::API::setTaintMemory ( const triton::arch::MemoryAccess mem,
bool  flag 
)

[taint api] - Sets the flag (taint or untaint) to a memory.

Definition at line 1166 of file api.cpp.

◆ setTaintRegister()

bool triton::API::setTaintRegister ( const triton::arch::Register reg,
bool  flag 
)

[taint api] - Sets the flag (taint or untaint) to a register.

Definition at line 1173 of file api.cpp.

◆ setThumb()

void triton::API::setThumb ( bool  state)

[architecture api] - Sets CPU state to Thumb mode.

Definition at line 318 of file api.cpp.

◆ simplify() [1/2]

triton::arch::BasicBlock triton::API::simplify ( const triton::arch::BasicBlock block,
bool  padding = false 
) const

[symbolic api] - Processes a dead store elimination simplification on a given basic block. If padding is true, keep addresses aligned and padds with NOP instructions.

Definition at line 851 of file api.cpp.

◆ simplify() [2/2]

triton::ast::SharedAbstractNode triton::API::simplify ( const triton::ast::SharedAbstractNode node,
bool  usingSolver = false,
bool  usingLLVM = false 
) const

[symbolic api] - Processes all recorded AST simplifications, uses solver's simplifications if usingSolver is true or LLVM is usingLLVM is true. Returns the simplified AST.

Definition at line 837 of file api.cpp.

◆ simplifyAstViaLLVM()

triton::ast::SharedAbstractNode triton::API::simplifyAstViaLLVM ( const triton::ast::SharedAbstractNode node) const

[lifting api] - Lifts and simplify an AST using LLVM

Definition at line 1351 of file api.cpp.

◆ simplifyAstViaSolver()

triton::ast::SharedAbstractNode triton::API::simplifyAstViaSolver ( const triton::ast::SharedAbstractNode node) const

[solver api] - Converts a Triton's AST to a solver's AST, perform a simplification and returns a Triton's AST.

Definition at line 1092 of file api.cpp.

◆ sliceExpressions()

[symbolic api] - Slices all expressions from a given one.

Definition at line 1001 of file api.cpp.

◆ symbolizeExpression()

triton::engines::symbolic::SharedSymbolicVariable triton::API::symbolizeExpression ( triton::usize  exprId,
triton::uint32  symVarSize,
const std::string &  symVarAlias = "" 
)

[symbolic api] - Converts a symbolic expression to a symbolic variable. symVarSize must be in bits.

Definition at line 669 of file api.cpp.

◆ symbolizeMemory()

triton::engines::symbolic::SharedSymbolicVariable triton::API::symbolizeMemory ( const triton::arch::MemoryAccess mem,
const std::string &  symVarAlias = "" 
)

[symbolic api] - Converts a symbolic memory expression to a symbolic variable.

Definition at line 675 of file api.cpp.

◆ symbolizeRegister()

triton::engines::symbolic::SharedSymbolicVariable triton::API::symbolizeRegister ( const triton::arch::Register reg,
const std::string &  symVarAlias = "" 
)

[symbolic api] - Converts a symbolic register expression to a symbolic variable.

Definition at line 681 of file api.cpp.

◆ synthesize()

triton::engines::synthesis::SynthesisResult triton::API::synthesize ( const triton::ast::SharedAbstractNode node,
bool  constant = true,
bool  subexpr = true,
bool  opaque = false 
)

[synthesizer api] - Synthesizes a given node. If constant is true, performa a constant synthesis. If opaque is true, perform opaque constant synthesis. If subexpr is true, analyze children AST.

Definition at line 1303 of file api.cpp.

◆ taintAssignment() [1/7]

bool triton::API::taintAssignment ( const triton::arch::MemoryAccess memDst,
const triton::arch::Immediate imm 
)

[taint api] - Taints MemoryImmediate with assignment. Returns always false.

Definition at line 1264 of file api.cpp.

◆ taintAssignment() [2/7]

bool triton::API::taintAssignment ( const triton::arch::MemoryAccess memDst,
const triton::arch::MemoryAccess memSrc 
)

[taint api] - Taints MemoryMemory with assignment. Returns true if the memDst is tainted.

Definition at line 1270 of file api.cpp.

◆ taintAssignment() [3/7]

bool triton::API::taintAssignment ( const triton::arch::MemoryAccess memDst,
const triton::arch::Register regSrc 
)

[taint api] - Taints MemoryRegister with assignment. Returns true if the memDst is tainted.

Definition at line 1276 of file api.cpp.

◆ taintAssignment() [4/7]

bool triton::API::taintAssignment ( const triton::arch::OperandWrapper op1,
const triton::arch::OperandWrapper op2 
)

[taint api] - Abstract assignment tainting.

Definition at line 1258 of file api.cpp.

◆ taintAssignment() [5/7]

bool triton::API::taintAssignment ( const triton::arch::Register regDst,
const triton::arch::Immediate imm 
)

[taint api] - Taints RegisterImmediate with assignment. Returns always false.

Definition at line 1282 of file api.cpp.

◆ taintAssignment() [6/7]

bool triton::API::taintAssignment ( const triton::arch::Register regDst,
const triton::arch::MemoryAccess memSrc 
)

[taint api] - Taints RegisterMemory with assignment. Returns true if the regDst is tainted.

Definition at line 1288 of file api.cpp.

◆ taintAssignment() [7/7]

bool triton::API::taintAssignment ( const triton::arch::Register regDst,
const triton::arch::Register regSrc 
)

[taint api] - Taints RegisterRegister with assignment. Returns true if the regDst is tainted.

Definition at line 1294 of file api.cpp.

◆ taintMemory() [1/2]

bool triton::API::taintMemory ( const triton::arch::MemoryAccess mem)

[taint api] - Taints a memory. Returns TAINTED if the memory has been tainted correctly. Otherwise it returns the last defined state.

Definition at line 1186 of file api.cpp.

◆ taintMemory() [2/2]

bool triton::API::taintMemory ( triton::uint64  addr)

[taint api] - Taints an address. Returns TAINTED if the address has been tainted correctly. Otherwise it returns the last defined state.

Definition at line 1180 of file api.cpp.

◆ taintRegister()

bool triton::API::taintRegister ( const triton::arch::Register reg)

[taint api] - Taints a register. Returns TAINTED if the register has been tainted correctly. Otherwise it returns the last defined state.

Definition at line 1192 of file api.cpp.

◆ taintUnion() [1/7]

bool triton::API::taintUnion ( const triton::arch::MemoryAccess memDst,
const triton::arch::Immediate imm 
)

[taint api] - Taints MemoryImmediate with union. Returns true if the memDst is TAINTED.

Definition at line 1222 of file api.cpp.

◆ taintUnion() [2/7]

bool triton::API::taintUnion ( const triton::arch::MemoryAccess memDst,
const triton::arch::MemoryAccess memSrc 
)

[taint api] - Taints MemoryMemory with union. Returns true if the memDst or memSrc are TAINTED.

Definition at line 1228 of file api.cpp.

◆ taintUnion() [3/7]

bool triton::API::taintUnion ( const triton::arch::MemoryAccess memDst,
const triton::arch::Register regSrc 
)

[taint api] - Taints MemoryRegister with union. Returns true if the memDst or regSrc are TAINTED.

Definition at line 1234 of file api.cpp.

◆ taintUnion() [4/7]

bool triton::API::taintUnion ( const triton::arch::OperandWrapper op1,
const triton::arch::OperandWrapper op2 
)

[taint api] - Abstract union tainting.

Definition at line 1216 of file api.cpp.

◆ taintUnion() [5/7]

bool triton::API::taintUnion ( const triton::arch::Register regDst,
const triton::arch::Immediate imm 
)

[taint api] - Taints RegisterImmediate with union. Returns true if the regDst is TAINTED.

Definition at line 1240 of file api.cpp.

◆ taintUnion() [6/7]

bool triton::API::taintUnion ( const triton::arch::Register regDst,
const triton::arch::MemoryAccess memSrc 
)

[taint api] - Taints RegisterMemory with union. Returns true if the regDst or memSrc are TAINTED.

Definition at line 1246 of file api.cpp.

◆ taintUnion() [7/7]

bool triton::API::taintUnion ( const triton::arch::Register regDst,
const triton::arch::Register regSrc 
)

[taint api] - Taints RegisterRegister with union. Returns true if the regDst or regSrc are TAINTED.

Definition at line 1252 of file api.cpp.

◆ untaintMemory() [1/2]

bool triton::API::untaintMemory ( const triton::arch::MemoryAccess mem)

[taint api] - Untaints a memory. Returns !TAINTED if the memory has been untainted correctly. Otherwise it returns the last defined state.

Definition at line 1204 of file api.cpp.

◆ untaintMemory() [2/2]

bool triton::API::untaintMemory ( triton::uint64  addr)

[taint api] - Untaints an address. Returns !TAINTED if the address has been untainted correctly. Otherwise it returns the last defined state.

Definition at line 1198 of file api.cpp.

◆ untaintRegister()

bool triton::API::untaintRegister ( const triton::arch::Register reg)

[taint api] - Untaints a register. Returns !TAINTED if the register has been untainted correctly. Otherwise it returns the last defined state.

Definition at line 1210 of file api.cpp.

Member Data Documentation

◆ arch

triton::arch::Architecture triton::API::arch
protected

The architecture entry.

Definition at line 71 of file api.hpp.

◆ astCtxt

triton::ast::SharedAstContext triton::API::astCtxt
protected

The AST Context interface.

Definition at line 89 of file api.hpp.

◆ callbacks

triton::callbacks::Callbacks triton::API::callbacks
protected

The Callbacks interface.

Definition at line 68 of file api.hpp.

◆ irBuilder

triton::arch::IrBuilder* triton::API::irBuilder = nullptr
protected

The IR builder.

Definition at line 92 of file api.hpp.

◆ lifting

triton::engines::lifters::LiftingEngine* triton::API::lifting = nullptr
protected

The lifting engine.

Definition at line 77 of file api.hpp.

◆ modes

triton::modes::SharedModes triton::API::modes
protected

The modes.

Definition at line 74 of file api.hpp.

◆ registers

triton::arch::ShortcutRegister triton::API::registers

A shortcut to access to a Register class from a register name.

Definition at line 97 of file api.hpp.

◆ solver

triton::engines::solver::SolverEngine* triton::API::solver = nullptr
protected

The solver engine.

Definition at line 86 of file api.hpp.

◆ symbolic

triton::engines::symbolic::SymbolicEngine* triton::API::symbolic = nullptr
protected

The symbolic engine.

Definition at line 83 of file api.hpp.

◆ taint

triton::engines::taint::TaintEngine* triton::API::taint = nullptr
protected

The taint engine.

Definition at line 80 of file api.hpp.


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