libTriton version 1.0 build 1588
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
triton::callbacks::Callbacks Class Reference

The callbacks class. More...

#include <callbacks.hpp>

Public Member Functions

TRITON_EXPORT Callbacks (triton::Context &ctx)
 Constructor. More...
 
TRITON_EXPORT void addCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &)> cb)
 Adds a GET_CONCRETE_MEMORY_VALUE callback. More...
 
TRITON_EXPORT void addCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::Register &)> cb)
 Adds a GET_CONCRETE_REGISTER_VALUE callback. More...
 
TRITON_EXPORT void addCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &, const triton::uint512 &value)> cb)
 Adds a SET_CONCRETE_MEMORY_VALUE callback. More...
 
TRITON_EXPORT void addCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::Register &, const triton::uint512 &value)> cb)
 Adds a SET_CONCRETE_REGISTER_VALUE callback. More...
 
TRITON_EXPORT void addCallback (triton::callbacks::callback_e kind, ComparableFunctor< triton::ast::SharedAbstractNode(triton::Context &, const triton::ast::SharedAbstractNode &)> cb)
 Adds a SYMBOLIC_SIMPLIFICATION callback. More...
 
TRITON_EXPORT void clearCallbacks (void)
 Clears recorded callbacks. More...
 
TRITON_EXPORT void removeCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &)> cb)
 Deletes a GET_CONCRETE_MEMORY_VALUE callback. More...
 
TRITON_EXPORT void removeCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::Register &)> cb)
 Deletes a GET_CONCRETE_REGISTER_VALUE callback. More...
 
TRITON_EXPORT void removeCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &, const triton::uint512 &value)> cb)
 Deletes a SET_CONCRETE_MEMORY_VALUE callback. More...
 
TRITON_EXPORT void removeCallback (triton::callbacks::callback_e kind, ComparableFunctor< void(triton::Context &, const triton::arch::Register &, const triton::uint512 &value)> cb)
 Deletes a SET_CONCRETE_REGISTER_VALUE callback. More...
 
TRITON_EXPORT void removeCallback (triton::callbacks::callback_e kind, ComparableFunctor< triton::ast::SharedAbstractNode(triton::Context &, const triton::ast::SharedAbstractNode &)> cb)
 Deletes a SYMBOLIC_SIMPLIFICATION callback. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode processCallbacks (triton::callbacks::callback_e kind, triton::ast::SharedAbstractNode node)
 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)
 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, const triton::uint512 &value)
 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)
 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, const triton::uint512 &value)
 Processes callbacks according to the kind and the C++ polymorphism. More...
 
TRITON_EXPORT bool isDefined (triton::callbacks::callback_e kind) const
 Returns true if the callback is defined. More...
 
TRITON_EXPORT bool isDefined (void) const
 Returns true if at least one callback is defined. More...
 

Protected Member Functions

triton::usize countCallbacks (void) const
 Returns the number of callbacks recorded. More...
 
template<typename T >
void removeSingleCallback (std::list< T > &container, T cb)
 Trys to find and remove the callback, raises an exception if not able. More...
 

Protected Attributes

std::list< triton::callbacks::getConcreteMemoryValueCallbackgetConcreteMemoryValueCallbacks
 [c++] Callbacks for all concrete memory needs (LOAD). More...
 
std::list< triton::callbacks::getConcreteRegisterValueCallbackgetConcreteRegisterValueCallbacks
 [c++] Callbacks for all concrete register needs (GET). More...
 
std::list< triton::callbacks::setConcreteMemoryValueCallbacksetConcreteMemoryValueCallbacks
 [c++] Callbacks for all concrete memory needs (STORE). More...
 
std::list< triton::callbacks::setConcreteRegisterValueCallbacksetConcreteRegisterValueCallbacks
 [c++] Callbacks for all concrete register needs (PUT). More...
 
std::list< triton::callbacks::symbolicSimplificationCallbacksymbolicSimplificationCallbacks
 [c++] Callbacks for all symbolic simplifications. More...
 

Detailed Description

The callbacks class.

Definition at line 79 of file callbacks.hpp.

Constructor & Destructor Documentation

◆ Callbacks()

triton::callbacks::Callbacks::Callbacks ( triton::Context ctx)

Constructor.

Definition at line 17 of file callbacks.cpp.

Member Function Documentation

◆ addCallback() [1/5]

void triton::callbacks::Callbacks::addCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< triton::ast::SharedAbstractNode(triton::Context &, const triton::ast::SharedAbstractNode &)>  cb 
)

Adds a SYMBOLIC_SIMPLIFICATION callback.

Definition at line 78 of file callbacks.cpp.

◆ addCallback() [2/5]

void triton::callbacks::Callbacks::addCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &)>  cb 
)

Adds a GET_CONCRETE_MEMORY_VALUE callback.

Definition at line 26 of file callbacks.cpp.

◆ addCallback() [3/5]

void triton::callbacks::Callbacks::addCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &, const triton::uint512 &value)>  cb 
)

Adds a SET_CONCRETE_MEMORY_VALUE callback.

Definition at line 52 of file callbacks.cpp.

◆ addCallback() [4/5]

void triton::callbacks::Callbacks::addCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::Register &)>  cb 
)

Adds a GET_CONCRETE_REGISTER_VALUE callback.

Definition at line 39 of file callbacks.cpp.

◆ addCallback() [5/5]

void triton::callbacks::Callbacks::addCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::Register &, const triton::uint512 &value)>  cb 
)

Adds a SET_CONCRETE_REGISTER_VALUE callback.

Definition at line 65 of file callbacks.cpp.

◆ clearCallbacks()

void triton::callbacks::Callbacks::clearCallbacks ( void  )

Clears recorded callbacks.

Definition at line 91 of file callbacks.cpp.

◆ countCallbacks()

triton::usize triton::callbacks::Callbacks::countCallbacks ( void  ) const
protected

Returns the number of callbacks recorded.

Definition at line 306 of file callbacks.cpp.

◆ isDefined() [1/2]

bool triton::callbacks::Callbacks::isDefined ( triton::callbacks::callback_e  kind) const

Returns true if the callback is defined.

Definition at line 319 of file callbacks.cpp.

◆ isDefined() [2/2]

bool triton::callbacks::Callbacks::isDefined ( void  ) const

Returns true if at least one callback is defined.

Definition at line 333 of file callbacks.cpp.

◆ processCallbacks() [1/5]

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

Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 211 of file callbacks.cpp.

◆ processCallbacks() [2/5]

void triton::callbacks::Callbacks::processCallbacks ( triton::callbacks::callback_e  kind,
const triton::arch::MemoryAccess mem,
const triton::uint512 value 
)

Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 260 of file callbacks.cpp.

◆ processCallbacks() [3/5]

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

Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 237 of file callbacks.cpp.

◆ processCallbacks() [4/5]

void triton::callbacks::Callbacks::processCallbacks ( triton::callbacks::callback_e  kind,
const triton::arch::Register reg,
const triton::uint512 value 
)

Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 283 of file callbacks.cpp.

◆ processCallbacks() [5/5]

triton::ast::SharedAbstractNode triton::callbacks::Callbacks::processCallbacks ( triton::callbacks::callback_e  kind,
triton::ast::SharedAbstractNode  node 
)

Processes callbacks according to the kind and the C++ polymorphism.

Definition at line 193 of file callbacks.cpp.

◆ removeCallback() [1/5]

void triton::callbacks::Callbacks::removeCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< triton::ast::SharedAbstractNode(triton::Context &, const triton::ast::SharedAbstractNode &)>  cb 
)

Deletes a SYMBOLIC_SIMPLIFICATION callback.

Definition at line 177 of file callbacks.cpp.

◆ removeCallback() [2/5]

void triton::callbacks::Callbacks::removeCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &)>  cb 
)

Deletes a GET_CONCRETE_MEMORY_VALUE callback.

Definition at line 113 of file callbacks.cpp.

◆ removeCallback() [3/5]

void triton::callbacks::Callbacks::removeCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::MemoryAccess &, const triton::uint512 &value)>  cb 
)

Deletes a SET_CONCRETE_MEMORY_VALUE callback.

Definition at line 145 of file callbacks.cpp.

◆ removeCallback() [4/5]

void triton::callbacks::Callbacks::removeCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::Register &)>  cb 
)

Deletes a GET_CONCRETE_REGISTER_VALUE callback.

Definition at line 129 of file callbacks.cpp.

◆ removeCallback() [5/5]

void triton::callbacks::Callbacks::removeCallback ( triton::callbacks::callback_e  kind,
ComparableFunctor< void(triton::Context &, const triton::arch::Register &, const triton::uint512 &value)>  cb 
)

Deletes a SET_CONCRETE_REGISTER_VALUE callback.

Definition at line 161 of file callbacks.cpp.

◆ removeSingleCallback()

template<typename T >
void triton::callbacks::Callbacks::removeSingleCallback ( std::list< T > &  container,
cb 
)
protected

Trys to find and remove the callback, raises an exception if not able.

Definition at line 102 of file callbacks.cpp.

Member Data Documentation

◆ getConcreteMemoryValueCallbacks

std::list<triton::callbacks::getConcreteMemoryValueCallback> triton::callbacks::Callbacks::getConcreteMemoryValueCallbacks
protected

[c++] Callbacks for all concrete memory needs (LOAD).

Definition at line 101 of file callbacks.hpp.

◆ getConcreteRegisterValueCallbacks

std::list<triton::callbacks::getConcreteRegisterValueCallback> triton::callbacks::Callbacks::getConcreteRegisterValueCallbacks
protected

[c++] Callbacks for all concrete register needs (GET).

Definition at line 104 of file callbacks.hpp.

◆ setConcreteMemoryValueCallbacks

std::list<triton::callbacks::setConcreteMemoryValueCallback> triton::callbacks::Callbacks::setConcreteMemoryValueCallbacks
protected

[c++] Callbacks for all concrete memory needs (STORE).

Definition at line 107 of file callbacks.hpp.

◆ setConcreteRegisterValueCallbacks

std::list<triton::callbacks::setConcreteRegisterValueCallback> triton::callbacks::Callbacks::setConcreteRegisterValueCallbacks
protected

[c++] Callbacks for all concrete register needs (PUT).

Definition at line 110 of file callbacks.hpp.

◆ symbolicSimplificationCallbacks

std::list<triton::callbacks::symbolicSimplificationCallback> triton::callbacks::Callbacks::symbolicSimplificationCallbacks
protected

[c++] Callbacks for all symbolic simplifications.

Definition at line 113 of file callbacks.hpp.


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