File tree 2 files changed +16
-0
lines changed
src/unix/bsd/freebsdlike/freebsd
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) {
2136
2136
true
2137
2137
}
2138
2138
2139
+ // Added in FreeBSD 14.
2140
+ "PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" if Some ( 14 ) > freebsd_ver => true ,
2141
+
2139
2142
_ => false ,
2140
2143
}
2141
2144
} ) ;
@@ -2170,6 +2173,9 @@ fn test_freebsd(target: &str) {
2170
2173
// obsolete version
2171
2174
"vmtotal" if Some ( 11 ) == freebsd_ver => true ,
2172
2175
2176
+ // `ptrace_coredump` introduced in FreeBSD 14.
2177
+ "ptrace_coredump" if Some ( 14 ) > freebsd_ver => true ,
2178
+
2173
2179
_ => false ,
2174
2180
}
2175
2181
} ) ;
Original file line number Diff line number Diff line change @@ -167,6 +167,12 @@ s! {
167
167
pub sr_error: :: c_int,
168
168
}
169
169
170
+ pub struct ptrace_coredump {
171
+ pub pc_fd: :: c_int,
172
+ pub pc_flags: u32 ,
173
+ pub pc_limit: :: off_t,
174
+ }
175
+
170
176
pub struct cpuset_t {
171
177
#[ cfg( target_pointer_width = "64" ) ]
172
178
__bits: [ :: c_long; 4 ] ,
@@ -1948,6 +1954,7 @@ pub const PT_GET_EVENT_MASK: ::c_int = 25;
1948
1954
pub const PT_SET_EVENT_MASK : :: c_int = 26 ;
1949
1955
pub const PT_GET_SC_ARGS : :: c_int = 27 ;
1950
1956
pub const PT_GET_SC_RET : :: c_int = 28 ;
1957
+ pub const PT_COREDUMP : :: c_int = 29 ;
1951
1958
pub const PT_GETREGS : :: c_int = 33 ;
1952
1959
pub const PT_SETREGS : :: c_int = 34 ;
1953
1960
pub const PT_GETFPREGS : :: c_int = 35 ;
@@ -1967,6 +1974,9 @@ pub const PTRACE_LWP: ::c_int = 0x0010;
1967
1974
pub const PTRACE_VFORK : :: c_int = 0x0020 ;
1968
1975
pub const PTRACE_DEFAULT : :: c_int = PTRACE_EXEC ;
1969
1976
1977
+ pub const PC_COMPRESS : u32 = 0x00000001 ;
1978
+ pub const PC_ALL : u32 = 0x00000002 ;
1979
+
1970
1980
pub const PROC_SPROTECT : :: c_int = 1 ;
1971
1981
pub const PROC_REAP_ACQUIRE : :: c_int = 2 ;
1972
1982
pub const PROC_REAP_RELEASE : :: c_int = 3 ;
You can’t perform that action at this time.
0 commit comments