diff options
author | Yifan Lu | 2016-10-26 19:12:21 -0700 |
---|---|---|
committer | Yifan Lu | 2016-10-26 19:12:21 -0700 |
commit | e895cdc598997a83a7999b558fba745ebc2a815d (patch) | |
tree | b9e6c0b4b05c9ddc60482acdeb6b3be7da62421c /lib/substitute.h | |
parent | Vita: Added logging and changed cache flush name (diff) | |
download | substitute-e895cdc598997a83a7999b558fba745ebc2a815d.tar.gz |
Added passing of the opt data to records
Diffstat (limited to '')
-rw-r--r-- | lib/substitute.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/substitute.h b/lib/substitute.h index becf4b0..8cc2a4d 100644 --- a/lib/substitute.h +++ b/lib/substitute.h @@ -98,13 +98,16 @@ struct substitute_function_hook { /* Currently unused; pass 0. (Protip: When using C {} struct initializer * syntax, you can just omit this.) */ int options; - /* Any platform specific auxiliary data */ + /* Any platform specific auxiliary data. The data pointed to must remain + * valid until after the hook is freed! */ void *opt; }; struct substitute_function_hook_record { /* Function that was originally hooked. */ void *function; + /* Any platform specific auxiliary data copied from the hook */ + void *opt; /** Should at least be MAX_JUMP_PATCH_SIZE for your platform */ size_t buffer_size; /** Store the original code. Must be large enough to hold MAX_JUMP_PATCH_SIZE |