Module frida_gum::stalker[][src]

Code tracing engine.

More details about the Frida Stalker can be found on the Stalker page of the Frida documentation.

The Rust interface to the Stalker provides a best-effort “safe” interface, but naturally runtime code modification takes great caution and these bindings cannot prevent all types of misbehaviour resulting in misuse of the Stalker interface.

Examples

To trace the current thread with the Stalker, create a new Stalker and Transformer and call Stalker::follow_me():

let gum = unsafe { Gum::obtain() };
let mut stalker = Stalker::new(&gum);

let transformer = Transformer::from_callback(&gum, |basic_block, _output| {
    for instr in basic_block {
        instr.keep();
    }
});

#[cfg(feature = "event-sink")]
stalker.follow_me::<NoneEventSink>(&transformer, None);

#[cfg(not(feature = "event-sink"))]
stalker.follow_me(&transformer);

stalker.unfollow_me();

Structs

Instruction
NoneEventSinkevent-sink
Stalker

Code tracing engine interface.

StalkerIterator
StalkerOutput
Transformer

Enums

Eventevent-sink
EventMaskevent-sink

Traits

EventSinkevent-sink