Method
GumInterceptorreplace
Declaration [src]
GumReplaceReturn
gum_interceptor_replace (
GumInterceptor* self,
gpointer function_address,
gpointer replacement_function,
gpointer* original_function,
const GumReplaceOptions* options
)
Description [src]
Replaces function_address with replacement_function, so that any call to
it ends up in the replacement instead. The replacement can still reach the
original by calling function_address itself — the interceptor routes that
call to the original rather than recursing — or through original_function
if a pointer is more convenient.
Undo with gum_interceptor_revert(). The change takes effect
immediately unless a transaction is open.
Parameters
function_address-
Type:
gpointerAddress of the function to replace.
The data is owned by the caller of the method. replacement_function-
Type:
gpointerAddress of the replacement.
The data is owned by the caller of the method. original_function-
Type:
gpointer*Return location for a pointer through which the original function can be called, or
NULL.The argument will be set by the function. The argument can be set to NULLby the method.The argument can be NULL. options-
Type:
GumReplaceOptionsReplace options, or
NULLfor the defaults.The argument can be NULL.The data is owned by the caller of the method.
Return value
Type: GumReplaceReturn
GUM_REPLACE_OK on success, or another GumReplaceReturn
describing why the function could not be instrumented.