Struct frida_gum::stalker::Stalker[][src]

pub struct Stalker<'a> { /* fields omitted */ }

Code tracing engine interface.

Implementations

impl<'a> Stalker<'a>[src]

pub fn is_supported(_gum: &Gum) -> bool[src]

Checks if the Stalker is supported on the current platform.

pub fn new<'b>(gum: &'b Gum) -> Stalker<'_> where
    'b: 'a, 
[src]

Create a new Stalker.

This call has the overhead of checking if the Stalker is available on the current platform, as creating a Stalker on an unsupported platform results in unwanted behaviour.

pub fn exclude(&mut self, range: &MemoryRange)[src]

Exclude a range of address from the Stalker engine.

This exclusion will prevent the Stalker from tracing into the memory range, reducing instrumentation overhead as well as potential noise from the EventSink.

pub fn set_trust_threshold(&mut self, threshold: i32)[src]

Set how many times a piece of code needs to be executed before it is assumed it can be trusted to not mutate.

Specify -1 for no trust (slow), 0 to trust code from the get-go, and N to trust code after it has been executed N times. Defaults to 1.

pub fn get_trust_threshold(&self) -> i32[src]

Get the Stalker trust treshold, see Stalker::set_trust_threshold() for more details.

pub fn flush(&mut self)[src]

Flush all buffered events.

pub fn stop(&mut self)[src]

pub fn garbage_collect(&mut self) -> bool[src]

Free accumulated memory at a safe point after Stalker::unfollow_me().

This is needed to avoid race-conditions where the thread just unfollowed is executing its last instructions.

pub fn follow_me<S: EventSink>(
    &mut self,
    transformer: &Transformer<'_>,
    event_sink: Option<&mut S>
)
[src]

This is supported on crate feature event-sink only.

Begin the Stalker on the current thread.

A Transformer must be specified, and will be updated with all events.

If reusing an existing Transformer, make sure to call Stalker::garbage_collect() periodically.

pub fn unfollow_me(&mut self)[src]

Stop stalking the current thread.

pub fn is_following_me(&mut self) -> bool[src]

Check if the Stalker is running on the current thread.

pub fn activate(&mut self, start: NativePointer)[src]

Re-activate the Stalker at the specified start point.

pub fn deactivate(&mut self)[src]

Pause the Stalker.

Trait Implementations

impl<'a> Drop for Stalker<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Stalker<'a>

impl<'a> !Send for Stalker<'a>

impl<'a> !Sync for Stalker<'a>

impl<'a> Unpin for Stalker<'a>

impl<'a> UnwindSafe for Stalker<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.