Class encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left
to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, class provides a mechanism to push the function parameters manually and to issue the call afterwards.
More...
#include <call.hpp>
|
enum class | WaitType { None
, Breakpoint
, Wait_Keypress
} |
|
using | CallingFunc = void(*)(Parameters::Data params, const Return *) |
|
using | HiddenParam = bool(*)(ValueType) |
|
Class encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left
to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, class provides a mechanism to push the function parameters manually and to issue the call afterwards.
Definition at line 21 of file call.hpp.
◆ JitCall() [1/2]
plugify::JitCall::JitCall |
( |
std::weak_ptr< asmjit::JitRuntime > |
rt | ) |
|
|
explicit |
Constructor.
- Parameters
-
rt | Weak pointer to the asmjit::JitRuntime. |
◆ JitCall() [2/2]
plugify::JitCall::JitCall |
( |
JitCall && |
other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
other | Another instance of Caller. |
◆ GetError()
std::string_view plugify::JitCall::GetError |
( |
| ) |
|
|
inlinenoexcept |
Get the error message, if any.
- Returns
- Error message.
Definition at line 170 of file call.hpp.
◆ GetFunction()
MemAddr plugify::JitCall::GetFunction |
( |
| ) |
const |
|
inlinenoexcept |
Get a dynamically created function.
- Returns
- Pointer to the already generated function.
- Note
- The returned pointer can be nullptr if function is not generate.
Definition at line 156 of file call.hpp.
◆ GetJitFunc() [1/2]
MemAddr plugify::JitCall::GetJitFunc |
( |
const asmjit::FuncSignature & |
sig, |
|
|
MemAddr |
target, |
|
|
WaitType |
waitType, |
|
|
bool |
hidden |
|
) |
| |
Get a dynamically created function based on the raw signature.
- Parameters
-
sig | Function signature. |
target | Target function to call. |
waitType | Optionally insert a breakpoint before the call. |
hidden | If true, return will be pass as hidden argument. |
- Returns
- Pointer to the generated function.
◆ GetJitFunc() [2/2]
Get a dynamically created function based on the method reference.
- Parameters
-
method | Reference to the method. |
target | Target function to call. |
waitType | Optionally insert a breakpoint before the call. |
hidden | If true, return will be pass as hidden argument. |
- Returns
- Pointer to the generated function.
◆ GetTargetFunc()
MemAddr plugify::JitCall::GetTargetFunc |
( |
| ) |
const |
|
inlinenoexcept |
Get the target associated with the object.
This function returns a pointer to the target function associated with the object.
- Returns
- A void pointer to the target function.
- Note
- The returned pointer can be nullptr if no target is set.
Definition at line 164 of file call.hpp.
The documentation for this class was generated from the following file: