Skip to content

Commit

Permalink
freebsd 14 add new PT_GETREGSET/PT_SETREGSET flag
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Feb 3, 2022
1 parent 34a9889 commit 4bebc22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ task:
task:
name: nightly x86_64-unknown-freebsd-14
freebsd_instance:
image: freebsd-14-0-current-amd64-v20220113
image: freebsd-14-0-current-amd64-v20220203
setup_script:
- pkg install -y curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand Down
6 changes: 5 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,11 @@ fn test_freebsd(target: &str) {
"MNT_UNTRUSTED" | "MNT_VERIFIED" if Some(12) > freebsd_ver => true,

// Added in FreeBSD 14.
"PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" if Some(14) > freebsd_ver => true,
"PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" | "PT_GETREGSET" | "PT_SETREGSET"
if Some(14) > freebsd_ver =>
{
true
}

// Added in FreeBSD 14.
"F_KINFO" => true, // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,8 @@ pub const PT_GETDBREGS: ::c_int = 37;
pub const PT_SETDBREGS: ::c_int = 38;
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_FIRSTMACH: ::c_int = 64;

pub const PTRACE_EXEC: ::c_int = 0x0001;
Expand Down

0 comments on commit 4bebc22

Please sign in to comment.