File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2136,6 +2136,9 @@ fn test_freebsd(target: &str) {
21362136 true
21372137 }
21382138
2139+ // Added in FreeBSD 14.
2140+ "PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" if Some ( 14 ) > freebsd_ver => true ,
2141+
21392142 _ => false ,
21402143 }
21412144 } ) ;
@@ -2170,6 +2173,9 @@ fn test_freebsd(target: &str) {
21702173 // obsolete version
21712174 "vmtotal" if Some ( 11 ) == freebsd_ver => true ,
21722175
2176+ // `ptrace_coredump` introduced in FreeBSD 14.
2177+ "ptrace_coredump" if Some ( 14 ) > freebsd_ver => true ,
2178+
21732179 _ => false ,
21742180 }
21752181 } ) ;
Original file line number Diff line number Diff line change @@ -167,6 +167,12 @@ s! {
167167 pub sr_error: :: c_int,
168168 }
169169
170+ pub struct ptrace_coredump {
171+ pub pc_fd: :: c_int,
172+ pub pc_flags: u32 ,
173+ pub pc_limit: :: off_t,
174+ }
175+
170176 pub struct cpuset_t {
171177 #[ cfg( target_pointer_width = "64" ) ]
172178 __bits: [ :: c_long; 4 ] ,
@@ -1948,6 +1954,7 @@ pub const PT_GET_EVENT_MASK: ::c_int = 25;
19481954pub const PT_SET_EVENT_MASK : :: c_int = 26 ;
19491955pub const PT_GET_SC_ARGS : :: c_int = 27 ;
19501956pub const PT_GET_SC_RET : :: c_int = 28 ;
1957+ pub const PT_COREDUMP : :: c_int = 29 ;
19511958pub const PT_GETREGS : :: c_int = 33 ;
19521959pub const PT_SETREGS : :: c_int = 34 ;
19531960pub const PT_GETFPREGS : :: c_int = 35 ;
@@ -1967,6 +1974,9 @@ pub const PTRACE_LWP: ::c_int = 0x0010;
19671974pub const PTRACE_VFORK : :: c_int = 0x0020 ;
19681975pub const PTRACE_DEFAULT : :: c_int = PTRACE_EXEC ;
19691976
1977+ pub const PC_COMPRESS : u32 = 0x00000001 ;
1978+ pub const PC_ALL : u32 = 0x00000002 ;
1979+
19701980pub const PROC_SPROTECT : :: c_int = 1 ;
19711981pub const PROC_REAP_ACQUIRE : :: c_int = 2 ;
19721982pub const PROC_REAP_RELEASE : :: c_int = 3 ;
You can’t perform that action at this time.
0 commit comments