libTriton version 1.0 build 1592
|
The callbacks class. More...
#include <callbacks.hpp>
Public Member Functions | |
TRITON_EXPORT | Callbacks (triton::Context &ctx) |
Constructor. | |
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. | |
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. | |
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. | |
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. | |
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. | |
TRITON_EXPORT void | clearCallbacks (void) |
Clears recorded callbacks. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
TRITON_EXPORT void | processCallbacks (triton::callbacks::callback_e kind, const triton::arch::MemoryAccess &mem) |
Processes callbacks according to the kind and the C++ polymorphism. | |
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. | |
TRITON_EXPORT void | processCallbacks (triton::callbacks::callback_e kind, const triton::arch::Register ®) |
Processes callbacks according to the kind and the C++ polymorphism. | |
TRITON_EXPORT void | processCallbacks (triton::callbacks::callback_e kind, const triton::arch::Register ®, const triton::uint512 &value) |
Processes callbacks according to the kind and the C++ polymorphism. | |
TRITON_EXPORT bool | isDefined (triton::callbacks::callback_e kind) const |
Returns true if the callback is defined. | |
TRITON_EXPORT bool | isDefined (void) const |
Returns true if at least one callback is defined. | |
Protected Member Functions | |
triton::usize | countCallbacks (void) const |
Returns the number of callbacks recorded. | |
template<typename T > | |
void | removeSingleCallback (std::list< T > &container, T cb) |
Trys to find and remove the callback, raises an exception if not able. | |
Protected Attributes | |
std::list< triton::callbacks::getConcreteMemoryValueCallback > | getConcreteMemoryValueCallbacks |
[c++] Callbacks for all concrete memory needs (LOAD). | |
std::list< triton::callbacks::getConcreteRegisterValueCallback > | getConcreteRegisterValueCallbacks |
[c++] Callbacks for all concrete register needs (GET). | |
std::list< triton::callbacks::setConcreteMemoryValueCallback > | setConcreteMemoryValueCallbacks |
[c++] Callbacks for all concrete memory needs (STORE). | |
std::list< triton::callbacks::setConcreteRegisterValueCallback > | setConcreteRegisterValueCallbacks |
[c++] Callbacks for all concrete register needs (PUT). | |
std::list< triton::callbacks::symbolicSimplificationCallback > | symbolicSimplificationCallbacks |
[c++] Callbacks for all symbolic simplifications. | |
The callbacks class.
Definition at line 79 of file callbacks.hpp.
triton::callbacks::Callbacks::Callbacks | ( | triton::Context & | ctx | ) |
Constructor.
Definition at line 17 of file callbacks.cpp.
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.
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.
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.
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.
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.
void triton::callbacks::Callbacks::clearCallbacks | ( | void | ) |
Clears recorded callbacks.
Definition at line 91 of file callbacks.cpp.
|
protected |
Returns the number of callbacks recorded.
Definition at line 306 of file callbacks.cpp.
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.
bool triton::callbacks::Callbacks::isDefined | ( | void | ) | const |
Returns true if at least one callback is defined.
Definition at line 333 of file callbacks.cpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
|
protected |
Trys to find and remove the callback, raises an exception if not able.
Definition at line 102 of file callbacks.cpp.
|
protected |
[c++] Callbacks for all concrete memory needs (LOAD).
Definition at line 101 of file callbacks.hpp.
|
protected |
[c++] Callbacks for all concrete register needs (GET).
Definition at line 104 of file callbacks.hpp.
|
protected |
[c++] Callbacks for all concrete memory needs (STORE).
Definition at line 107 of file callbacks.hpp.
|
protected |
[c++] Callbacks for all concrete register needs (PUT).
Definition at line 110 of file callbacks.hpp.
|
protected |
[c++] Callbacks for all symbolic simplifications.
Definition at line 113 of file callbacks.hpp.