9#ifndef TRITON_PYOBJECT_H
10#define TRITON_PYOBJECT_H
58 template <
typename T> PyObject* PyBitsVector(
const T& op);
70 PyObject*
PyBasicBlock(std::vector<triton::arch::Instruction>& insts);
268#define PyAstNode_AsAstNode(v) (((triton::bindings::python::AstNode_Object*)(v))->node)
271#define PyBitsVector_Check(v) ((v)->ob_type == &triton::bindings::python::BitsVector_Type)
274#define PyBitsVector_AsBitsVector(v) (((triton::bindings::python::BitsVector_Object*)(v))->bv)
277#define PyBasicBlock_Check(v) ((v)->ob_type == &triton::bindings::python::BasicBlock_Type)
280#define PyBasicBlock_AsBasicBlock(v) (((triton::bindings::python::BasicBlock_Object*)(v))->block)
283#define PyImmediate_Check(v) ((v)->ob_type == &triton::bindings::python::Immediate_Type)
286#define PyImmediate_AsImmediate(v) (((triton::bindings::python::Immediate_Object*)(v))->imm)
289#define PyInstruction_Check(v) ((v)->ob_type == &triton::bindings::python::Instruction_Type)
292#define PyInstruction_AsInstruction(v) (((triton::bindings::python::Instruction_Object*)(v))->inst)
295#define PyMemoryAccess_Check(v) ((v)->ob_type == &triton::bindings::python::MemoryAccess_Type)
298#define PyMemoryAccess_AsMemoryAccess(v) (((triton::bindings::python::MemoryAccess_Object*)(v))->mem)
301#define PyPathConstraint_Check(v) ((v)->ob_type == &triton::bindings::python::PathConstraint_Type)
304#define PyPathConstraint_AsPathConstraint(v) (((triton::bindings::python::PathConstraint_Object*)(v))->pc)
307#define PyTritonContext_Check(v) ((v)->ob_type == &triton::bindings::python::TritonContext_Type)
310#define PyTritonContext_AsTritonContext(v) (((triton::bindings::python::TritonContext_Object*)(v))->ctx)
313#define PyAstContext_Check(v) ((v)->ob_type == &triton::bindings::python::AstContext_Type)
316#define PyAstContext_AsAstContext(v) (((triton::bindings::python::AstContext_Object*)(v))->actx)
319#define PyRegister_Check(v) ((v)->ob_type == &triton::bindings::python::Register_Type)
322#define PyRegister_AsRegister(v) (((triton::bindings::python::Register_Object*)(v))->reg)
325#define PySolverModel_Check(v) ((v)->ob_type == &triton::bindings::python::SolverModel_Type)
328#define PySolverModel_AsSolverModel(v) (((triton::bindings::python::SolverModel_Object*)(v))->model)
331#define PyAstNode_Check(v) ((v)->ob_type == &triton::bindings::python::AstNode_Type)
334#define PySymbolicExpression_Check(v) ((v)->ob_type == &triton::bindings::python::SymbolicExpression_Type)
337#define PySymbolicExpression_AsSymbolicExpression(v) (((triton::bindings::python::SymbolicExpression_Object*)(v))->symExpr)
340#define PySymbolicVariable_Check(v) ((v)->ob_type == &triton::bindings::python::SymbolicVariable_Type)
343#define PySymbolicVariable_AsSymbolicVariable(v) (((triton::bindings::python::SymbolicVariable_Object*)(v))->symVar)
This is the main Triton Context class.
This class is used to represent a basic block.
This class is used to deal with registers and memory as bits vector.
This class is used to represent an instruction.
This class is used to represent a memory access.
This class is used when an instruction has a register operand.
This class is used to represent a constraint model solved.
The path constraint class.
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
std::shared_ptr< triton::ast::AstContext > SharedAstContext
Shared AST context.
PyTypeObject AstNode_Type
pyAstNode type.
PyObject * PyTritonContextRef(triton::Context &ctx)
Creates a TritonContext python class which is a reference to another Context.
PyObject * PyPathConstraint(const triton::engines::symbolic::PathConstraint &pc)
Creates the PathConstraint python class.
PyTypeObject BasicBlock_Type
pyBasicBlock type.
PyTypeObject SymbolicVariable_Type
pySymbolicVariable type.
PyObject * PySymbolicVariable(const triton::engines::symbolic::SharedSymbolicVariable &symVar)
Creates the SymbolicVariable python class.
PyObject * PySolverModel(const triton::engines::solver::SolverModel &model)
Creates the SolverModel python class.
PyObject * PyImmediate(const triton::arch::Immediate &imm)
Creates the Immediate python class.
PyTypeObject PathConstraint_Type
pyPathConstraint type.
PyTypeObject SymbolicExpression_Type
pySymbolicExpression type.
PyTypeObject Instruction_Type
pyInstruction type.
PyTypeObject BitsVector_Type
pyBitsVector type.
PyObject * PyAstContext(const triton::ast::SharedAstContext &actx)
Creates an AstContext python class.
PyObject * PyBasicBlock(void)
Creates the BasicBlock python class.
PyObject * PyInstruction(void)
Creates the Instruction python class.
PyTypeObject Register_Type
pyRegister type.
PyTypeObject SolverModel_Type
pySolverModel type.
PyTypeObject MemoryAccess_Type
pyMemory type.
PyObject * PyRegister(const triton::arch::Register ®)
Creates the Register python class.
PyObject * PyTritonContext(void)
Creates the new TritonContext python class.
PyObject * PySymbolicExpression(const triton::engines::symbolic::SharedSymbolicExpression &symExpr)
Creates the SymbolicExpression python class.
PyTypeObject Immediate_Type
pyImmediate type.
PyObject * PyMemoryAccess(const triton::arch::MemoryAccess &mem)
Creates the Memory python class.
PyTypeObject TritonContextObject_Type
pyRegister type.
PyObject * PyAstNode(const triton::ast::SharedAbstractNode &node)
Creates the AstNode python class.
PyTypeObject AstContextObject_Type
pyRegister type.
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
std::shared_ptr< triton::engines::symbolic::SymbolicVariable > SharedSymbolicVariable
Shared Symbolic variable.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
pySymbolicExpression object.
pySymbolicVariable object.
bool ref
Pointer to the cpp triton context.
PyObject * regAttr
Determine if this instance is a reference or not.