|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
Go to the source code of this file.
Typedefs | |
| typedef int(* | hook_target_fn) (int value) |
Functions | |
| static void | test_patch_bytes_detach_restores_original (void **state) |
| static void | test_pointer_hook_detach_restores_original (void **state) |
| static void | test_owner_detach_only_detaches_matching_owner (void **state) |
| static void | test_cleanup_all_restores_hooks_and_allows_reuse (void **state) |
| static void | test_overlapping_byte_patches_are_rejected (void **state) |
| __attribute__ ((noinline)) | |
| static void | chain_log (int id) |
| static int | chain_detour_a (int value) |
| static int | chain_detour_b (int value) |
| static void | test_function_hooks_chain_and_detach (void **state) |
Variables | |
| static uint8_t | patch_target [4] = {0x10, 0x20, 0x30, 0x40} |
| static void * | pointer_target = (void *)0x11112222u |
| static hook_target_fn | chain_original_a = NULL |
| static hook_target_fn | chain_original_b = NULL |
| static int | chain_call_log [2] |
| static size_t | chain_call_count = 0 |
| static const DTTR_TestCase | TEST_CASES [] |
| typedef int(* hook_target_fn) (int value) |
Definition at line 130 of file hook_registry.c.
| __attribute__ | ( | (noinline) | ) |
Definition at line 136 of file hook_registry.c.
|
static |
Definition at line 146 of file hook_registry.c.
References chain_log(), and chain_original_a.
Referenced by test_function_hooks_chain_and_detach().
|
static |
Definition at line 152 of file hook_registry.c.
References chain_log(), and chain_original_b.
Referenced by test_function_hooks_chain_and_detach().
|
static |
Definition at line 141 of file hook_registry.c.
References chain_call_count, chain_call_log, DTTR_TEST_ARRAY_COUNT, and id.
Referenced by chain_detour_a(), and chain_detour_b().
Definition at line 84 of file hook_registry.c.
References DTTR_Core_HookCleanupAll(), DTTR_Core_HookPatchBytes(), state, and target.
Definition at line 158 of file hook_registry.c.
References chain_call_count, chain_call_log, chain_detour_a(), chain_detour_b(), chain_original_a, chain_original_b, DTTR_Core_HookAttachFunction(), DTTR_Core_HookCleanupAll(), DTTR_Core_HookDetach(), NULL, and state.
Definition at line 103 of file hook_registry.c.
References DTTR_Core_HookCleanupAll(), DTTR_Core_HookDetach(), DTTR_Core_HookPatchBytes(), state, and target.
Definition at line 50 of file hook_registry.c.
References DTTR_Core_HookCleanupAll(), DTTR_Core_HookDetachOwner(), DTTR_Core_HookPatchBytes(), DTTR_Core_HookSetOwner(), and state.
Definition at line 10 of file hook_registry.c.
References DTTR_Core_HookCleanupAll(), DTTR_Core_HookDetach(), DTTR_Core_HookPatchBytes(), patch_target, and state.
Definition at line 29 of file hook_registry.c.
References DTTR_Core_HookAttachPointer(), DTTR_Core_HookCleanupAll(), DTTR_Core_HookDetach(), NULL, pointer_target, and state.
|
static |
Definition at line 134 of file hook_registry.c.
Referenced by chain_log(), and test_function_hooks_chain_and_detach().
|
static |
Definition at line 133 of file hook_registry.c.
Referenced by chain_log(), and test_function_hooks_chain_and_detach().
|
static |
Definition at line 131 of file hook_registry.c.
Referenced by chain_detour_a(), and test_function_hooks_chain_and_detach().
|
static |
Definition at line 132 of file hook_registry.c.
Referenced by chain_detour_b(), and test_function_hooks_chain_and_detach().
|
static |
Definition at line 7 of file hook_registry.c.
Definition at line 8 of file hook_registry.c.
Referenced by test_pointer_hook_detach_restores_original().
|
static |
Definition at line 201 of file hook_registry.c.