Skip to content

Commit dba08fa

Browse files
committed
Add ptrace constants.
1 parent c40b6af commit dba08fa

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/unix/notbsd/mod.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,29 @@ pub const WEXITED: ::c_int = 0x00000004;
719719
pub const WCONTINUED: ::c_int = 0x00000008;
720720
pub const WNOWAIT: ::c_int = 0x01000000;
721721

722+
// Options set using PTRACE_SETOPTIONS.
723+
pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001;
724+
pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002;
725+
pub const PTRACE_O_TRACEVFORK: ::c_int = 0x00000004;
726+
pub const PTRACE_O_TRACECLONE: ::c_int = 0x00000008;
727+
pub const PTRACE_O_TRACEEXEC: ::c_int = 0x00000010;
728+
pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 0x00000020;
729+
pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040;
730+
pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080;
731+
pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000;
732+
pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000;
733+
pub const PTRACE_O_MASK: ::c_int = 0x003000ff;
734+
735+
// Wait extended result codes for the above trace options.
736+
pub const PTRACE_EVENT_FORK: ::c_int = 1;
737+
pub const PTRACE_EVENT_VFORK: ::c_int = 2;
738+
pub const PTRACE_EVENT_CLONE: ::c_int = 3;
739+
pub const PTRACE_EVENT_EXEC: ::c_int = 4;
740+
pub const PTRACE_EVENT_VFORK_DONE: ::c_int = 5;
741+
pub const PTRACE_EVENT_EXIT: ::c_int = 6;
742+
pub const PTRACE_EVENT_SECCOMP: ::c_int = 7;
743+
pub const PTRACE_EVENT_STOP: ::c_int = 128;
744+
722745
pub const __WNOTHREAD: ::c_int = 0x20000000;
723746
pub const __WALL: ::c_int = 0x40000000;
724747
pub const __WCLONE: ::c_int = 0x80000000;

0 commit comments

Comments
 (0)