Skip to content

Commit 0bdb886

Browse files
committed
Auto merge of #1089 - xd009642:apple_ptrace, r=alexcrichton
Added ptrace constants for apple I noticed the ptrace constants were missing for apple so I've added them referencing this [header](https://opensource.apple.com/source/xnu/xnu-792.13.8/bsd/sys/ptrace.h). This doesn't add any new functions just constants so I haven't added any tests which seems to be correct.
2 parents 57c4a15 + 4e21f4a commit 0bdb886

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,26 @@ pub const PROT_READ: ::c_int = 1;
747747
pub const PROT_WRITE: ::c_int = 2;
748748
pub const PROT_EXEC: ::c_int = 4;
749749

750+
pub const PT_TRACE_ME: ::c_int = 0;
751+
pub const PT_READ_I: ::c_int = 1;
752+
pub const PT_READ_D: ::c_int = 2;
753+
pub const PT_READ_U: ::c_int = 3;
754+
pub const PT_WRITE_I: ::c_int = 4;
755+
pub const PT_WRITE_D: ::c_int = 5;
756+
pub const PT_WRITE_U: ::c_int = 6;
757+
pub const PT_CONTINUE: ::c_int = 7;
758+
pub const PT_KILL: ::c_int = 8;
759+
pub const PT_STEP: ::c_int = 9;
760+
pub const PT_ATTACH: ::c_int = 10;
761+
pub const PT_DETACH: ::c_int = 11;
762+
pub const PT_SIGEXC: ::c_int = 12;
763+
pub const PT_THUPDATE: ::c_int = 13;
764+
pub const PT_ATTACHEXC: ::c_int = 14;
765+
766+
pub const PT_FORCEQUOTA: ::c_int = 30;
767+
pub const PT_DENY_ATTACH: ::c_int = 31;
768+
pub const PT_FIRSTMACH: ::c_int = 32;
769+
750770
pub const MAP_FILE: ::c_int = 0x0000;
751771
pub const MAP_SHARED: ::c_int = 0x0001;
752772
pub const MAP_PRIVATE: ::c_int = 0x0002;

0 commit comments

Comments
 (0)