Skip to content

Commit 3911bfa

Browse files
committed
Auto merge of #3073 - devnexen:fbsd14_ptrace_upd2, r=JohnTitor
freebsd 14 add ptrace_sc_remote.
2 parents c1ce30e + 3350f36 commit 3911bfa

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ task:
2929
task:
3030
name: nightly x86_64-unknown-freebsd-14
3131
freebsd_instance:
32-
image: freebsd-14-0-current-amd64-v20220902
32+
image: freebsd-14-0-current-amd64-v20230114
3333
setup_script:
3434
- pkg install -y curl
3535
- curl https://sh.rustup.rs -sSf --output rustup.sh

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,6 +2188,7 @@ fn test_freebsd(target: &str) {
21882188

21892189
// Added in FreeBSD 14.
21902190
"PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" | "PT_GETREGSET" | "PT_SETREGSET"
2191+
| "PT_SC_REMOTE"
21912192
if Some(14) > freebsd_ver =>
21922193
{
21932194
true
@@ -2275,6 +2276,8 @@ fn test_freebsd(target: &str) {
22752276

22762277
// `ptrace_coredump` introduced in FreeBSD 14.
22772278
"ptrace_coredump" if Some(14) > freebsd_ver => true,
2279+
// `ptrace_sc_remote` introduced in FreeBSD 14.
2280+
"ptrace_sc_remote" if Some(14) > freebsd_ver => true,
22782281

22792282
// `sockcred2` is not available in FreeBSD 12.
22802283
"sockcred2" if Some(13) > freebsd_ver => true,

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ PT_LWP_EVENTS
970970
PT_READ_D
971971
PT_READ_I
972972
PT_RESUME
973+
PT_SC_REMOTE
973974
PT_SETDBREGS
974975
PT_SETFPREGS
975976
PT_SETREGS
@@ -1833,6 +1834,7 @@ pthread_spinlock_t
18331834
ptrace
18341835
ptrace_io_desc
18351836
ptrace_lwpinfo
1837+
ptrace_sc_remote
18361838
ptrace_sc_ret
18371839
ptrace_vm_entry
18381840
ptsname_r

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,13 @@ s! {
355355
pub pc_limit: ::off_t,
356356
}
357357

358+
pub struct ptrace_sc_remote {
359+
pub pscr_ret: ptrace_sc_ret,
360+
pub pscr_syscall: ::c_uint,
361+
pub pscr_nargs: ::c_uint,
362+
pub pscr_args: *mut ::register_t,
363+
}
364+
358365
pub struct cpuset_t {
359366
#[cfg(target_pointer_width = "64")]
360367
__bits: [::c_long; 4],
@@ -2356,6 +2363,7 @@ pub const PT_VM_TIMESTAMP: ::c_int = 40;
23562363
pub const PT_VM_ENTRY: ::c_int = 41;
23572364
pub const PT_GETREGSET: ::c_int = 42;
23582365
pub const PT_SETREGSET: ::c_int = 43;
2366+
pub const PT_SC_REMOTE: ::c_int = 44;
23592367
pub const PT_FIRSTMACH: ::c_int = 64;
23602368

23612369
pub const PTRACE_EXEC: ::c_int = 0x0001;

0 commit comments

Comments
 (0)