You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PTRACE_EVENT stops are observed by the tracer as waitpid(2) returning
with WIFSTOPPED(status), and WSTOPSIG(status) returns SIGTRAP. An
additional bit is set in the higher byte of the status word: the
value status>>8 will be (SIGTRAP | PTRACE_EVENT_foo << 8).
Currently waitpid decodes the signal with status::stop_signal, but loses this info. Maybe WaitStatus::Stopped could have an extra Option<PtraceEvent> field, where PtraceEvent could be an enum for the PTRACE_EVENT_* values?
I did some cursory investigation on how ptrace works on non-Linux platforms and couldn't find any equivalent usage here, so I guess this wouldn't be relevant elsewhere. I don't know what the convention is for situations like this--would we just have a unit PtraceEvent struct there?
The text was updated successfully, but these errors were encountered:
The
ptrace(2)
docs say:Currently
waitpid
decodes the signal withstatus::stop_signal
, but loses this info. MaybeWaitStatus::Stopped
could have an extraOption<PtraceEvent>
field, wherePtraceEvent
could be an enum for thePTRACE_EVENT_*
values?I did some cursory investigation on how
ptrace
works on non-Linux platforms and couldn't find any equivalent usage here, so I guess this wouldn't be relevant elsewhere. I don't know what the convention is for situations like this--would we just have a unitPtraceEvent
struct there?The text was updated successfully, but these errors were encountered: