pub struct CurrentTaskPtrace<'a> { /* private fields */ }Expand description
Provides access to ptrace hooks for a CurrentTask.
Implementations§
Source§impl<'a> CurrentTaskPtrace<'a>
impl<'a> CurrentTaskPtrace<'a>
Sourcepub fn on_syscall_enter(self)
pub fn on_syscall_enter(self)
Invoked upon entering a syscall to handle ptrace syscall entry tracing.
Sourcepub fn on_syscall_exit(self, is_error: bool)
pub fn on_syscall_exit(self, is_error: bool)
Invoked upon exiting a syscall to handle ptrace syscall exit tracing.
Sourcepub fn on_event(self, trace_kind: PtraceOptions, msg: u64)
pub fn on_event(self, trace_kind: PtraceOptions, msg: u64)
If currently being ptraced with the given option, emit the appropriate event. PTRACE_EVENTMSG will return the given message. Also emits the appropriate event for execve in the absence of TRACEEXEC.
Note that the Linux kernel has a documented bug where, if TRACEEXIT is enabled, SIGKILL will trigger an event. We do not exhibit this behavior.
Sourcepub fn on_clone(
self,
clone_args: &clone_args,
child_task: &Arc<Task>,
) -> PtraceOptions
pub fn on_clone( self, clone_args: &clone_args, child_task: &Arc<Task>, ) -> PtraceOptions
For traced tasks, attaches child_task to the same tracer if required by the clone
flags/ptrace options, and returns the PtraceOptions event to emit after spawning.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CurrentTaskPtrace<'a>
impl<'a> !Send for CurrentTaskPtrace<'a>
impl<'a> !Sync for CurrentTaskPtrace<'a>
impl<'a> !UnwindSafe for CurrentTaskPtrace<'a>
impl<'a> Freeze for CurrentTaskPtrace<'a>
impl<'a> Unpin for CurrentTaskPtrace<'a>
impl<'a> UnsafeUnpin for CurrentTaskPtrace<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more