Error type for InlineHook.
More...
#include <inline_hook.hpp>
|
enum safetyhook::InlineHook::Error:: { ... } | type |
| The type of error.
|
union { | |
Allocator::Error allocator_error | |
| Allocator error information.
|
uint8_t * ip | |
| IP of the problematic instruction.
|
}; | |
| Extra information about the error.
|
◆ anonymous enum
The type of error.
Enumerator |
---|
BAD_ALLOCATION | An error occurred when allocating memory.
|
FAILED_TO_DECODE_INSTRUCTION | Failed to decode an instruction.
|
SHORT_JUMP_IN_TRAMPOLINE | The trampoline contains a short jump.
|
IP_RELATIVE_INSTRUCTION_OUT_OF_RANGE | An IP-relative instruction is out of range.
|
UNSUPPORTED_INSTRUCTION_IN_TRAMPOLINE | An unsupported instruction was found in the trampoline.
|
FAILED_TO_UNPROTECT | Failed to unprotect memory.
|
NOT_ENOUGH_SPACE | Not enough space to create the hook.
|
◆ bad_allocation()
Create a BAD_ALLOCATION error.
- Parameters
-
- Returns
- The new BAD_ALLOCATION error.
◆ failed_to_decode_instruction()
Error safetyhook::InlineHook::Error::failed_to_decode_instruction |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a FAILED_TO_DECODE_INSTRUCTION error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new FAILED_TO_DECODE_INSTRUCTION error.
◆ failed_to_unprotect()
Error safetyhook::InlineHook::Error::failed_to_unprotect |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a FAILED_TO_UNPROTECT error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new FAILED_TO_UNPROTECT error.
◆ ip_relative_instruction_out_of_range()
Error safetyhook::InlineHook::Error::ip_relative_instruction_out_of_range |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a IP_RELATIVE_INSTRUCTION_OUT_OF_RANGE error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new IP_RELATIVE_INSTRUCTION_OUT_OF_RANGE error.
◆ not_enough_space()
Error safetyhook::InlineHook::Error::not_enough_space |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a NOT_ENOUGH_SPACE error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new NOT_ENOUGH_SPACE error.
◆ short_jump_in_trampoline()
Error safetyhook::InlineHook::Error::short_jump_in_trampoline |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a SHORT_JUMP_IN_TRAMPOLINE error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new SHORT_JUMP_IN_TRAMPOLINE error.
◆ unsupported_instruction_in_trampoline()
Error safetyhook::InlineHook::Error::unsupported_instruction_in_trampoline |
( |
uint8_t * | ip | ) |
|
|
inlinestaticnodiscard |
Create a UNSUPPORTED_INSTRUCTION_IN_TRAMPOLINE error.
- Parameters
-
ip | The IP of the problematic instruction. |
- Returns
- The new UNSUPPORTED_INSTRUCTION_IN_TRAMPOLINE error.
The documentation for this struct was generated from the following file: