Method
GumInterceptorattach
Declaration [src]
GumAttachReturn
gum_interceptor_attach (
GumInterceptor* self,
gpointer target,
GumInvocationListener* listener,
const GumAttachOptions* options
)
Description [src]
Attaches listener so that it is notified right before target is entered and
right after it returns. The same listener may be attached to any number of
addresses, and multiple listeners may be attached to the same address. The
original code is left in place.
target need not be a function entry: a listener that implements only on_enter acts as a probe and may be placed at an arbitrary
instruction to observe execution reaching that point.
The change takes effect immediately unless a transaction is open.
Parameters
target-
Type:
gpointerAddress to intercept.
The data is owned by the caller of the method. listener-
Type:
GumInvocationListenerListener notified on enter and leave.
The data is owned by the caller of the method. options-
Type:
GumAttachOptionsAttach options, or
NULLfor the defaults.The argument can be NULL.The data is owned by the caller of the method.
Return value
Type: GumAttachReturn
GUM_ATTACH_OK on success, or another GumAttachReturn
describing why the function could not be instrumented.