Struct frida_gum::stalker::Stalker [−][src]
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]
'b: 'a,
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]
&mut self,
transformer: &Transformer<'_>,
event_sink: Option<&mut S>
)
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,