diff options
author | David Carlier <devnexen@gmail.com> | 2023-01-18 21:54:24 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2023-01-19 08:52:56 +0000 |
commit | 3350f367074c4adc05c74ecdfd3abccd255ab486 (patch) | |
tree | 162bba94bc646c1aea620024fbf9765749a0a8ad | |
parent | 8958df1a5af377922bc0c06e2828e8c80eb8f997 (diff) | |
download | rust-libc-3350f367074c4adc05c74ecdfd3abccd255ab486.tar.gz |
freebsd 14 add ptrace_sc_remote.
-rw-r--r-- | .cirrus.yml | 2 | ||||
-rw-r--r-- | libc-test/build.rs | 3 | ||||
-rw-r--r-- | libc-test/semver/freebsd.txt | 2 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 8 |
4 files changed, 14 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index f72dc82abf..d2102f1fa1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,7 +29,7 @@ task: task: name: nightly x86_64-unknown-freebsd-14 freebsd_instance: - image: freebsd-14-0-current-amd64-v20220902 + image: freebsd-14-0-current-amd64-v20230114 setup_script: - pkg install -y curl - curl https://sh.rustup.rs -sSf --output rustup.sh diff --git a/libc-test/build.rs b/libc-test/build.rs index 5bad58171c..c60bd1c917 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2182,6 +2182,7 @@ fn test_freebsd(target: &str) { // Added in FreeBSD 14. "PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" | "PT_GETREGSET" | "PT_SETREGSET" + | "PT_SC_REMOTE" if Some(14) > freebsd_ver => { true @@ -2269,6 +2270,8 @@ fn test_freebsd(target: &str) { // `ptrace_coredump` introduced in FreeBSD 14. "ptrace_coredump" if Some(14) > freebsd_ver => true, + // `ptrace_sc_remote` introduced in FreeBSD 14. + "ptrace_sc_remote" if Some(14) > freebsd_ver => true, // `sockcred2` is not available in FreeBSD 12. "sockcred2" if Some(13) > freebsd_ver => true, diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index c188346b9b..511e9b62c6 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -970,6 +970,7 @@ PT_LWP_EVENTS PT_READ_D PT_READ_I PT_RESUME +PT_SC_REMOTE PT_SETDBREGS PT_SETFPREGS PT_SETREGS @@ -1833,6 +1834,7 @@ pthread_spinlock_t ptrace ptrace_io_desc ptrace_lwpinfo +ptrace_sc_remote ptrace_sc_ret ptrace_vm_entry ptsname_r diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 2a4fbbf05f..0245cdb643 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -355,6 +355,13 @@ s! { pub pc_limit: ::off_t, } + pub struct ptrace_sc_remote { + pub pscr_ret: ptrace_sc_ret, + pub pscr_syscall: ::c_uint, + pub pscr_nargs: ::c_uint, + pub pscr_args: *mut ::register_t, + } + pub struct cpuset_t { #[cfg(target_pointer_width = "64")] __bits: [::c_long; 4], @@ -2356,6 +2363,7 @@ pub const PT_VM_TIMESTAMP: ::c_int = 40; pub const PT_VM_ENTRY: ::c_int = 41; pub const PT_GETREGSET: ::c_int = 42; pub const PT_SETREGSET: ::c_int = 43; +pub const PT_SC_REMOTE: ::c_int = 44; pub const PT_FIRSTMACH: ::c_int = 64; pub const PTRACE_EXEC: ::c_int = 0x0001; |