Skip to content

Commit

Permalink
freebsd add ptrace_lwpinfo struct
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Oct 30, 2021
1 parent 90ebf43 commit ad6e1be
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,19 @@ PIOD_READ_I
PIOD_WRITE_D
PIOD_WRITE_I
PIPE_BUF
PL_EVENT_NONE
PL_EVENT_SIGNAL
PL_FLAG_BORN
PL_FLAG_BOUND
PL_FLAG_CHILD
PL_FLAG_EXEC
PL_FLAG_EXITED
PL_FLAG_VFORKED
PL_FLAG_VFORK_DONE
PL_FLAG_SA
PL_FLAG_SCE
PL_FLAG_SCX
PL_FLAG_SI
PM_STR
POLLINIGNEOF
POLLRDBAND
Expand Down Expand Up @@ -1675,6 +1688,7 @@ pthread_spin_unlock
pthread_spinlock_t
ptrace
ptrace_io_desc
ptrace_lwpinfo
ptrace_vm_entry
pututxline
pwritev
Expand Down
28 changes: 28 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ s! {
pub pve_path: *mut ::c_char,
}

pub struct ptrace_lwpinfo {
pub pl_lwpid: lwpid_t,
pub pl_event: ::c_int,
pub pl_flags: ::c_int,
pub pl_sigmask: ::sigset_t,
pub pl_siglist: ::sigset_t,
pub pl_siginfo: ::siginfo_t,
pub pl_tdname: [::c_char; ::MAXCOMLEN as usize + 1],
pub pl_child_pid: ::pid_t,
pub pl_syscall_code: ::c_uint,
pub pl_syscall_narg: ::c_uint,
}

pub struct cpuset_t {
#[cfg(target_pointer_width = "64")]
__bits: [::c_long; 4],
Expand Down Expand Up @@ -1096,6 +1109,21 @@ pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3;
pub const LOCAL_CONNWAIT: ::c_int = 4;
pub const LOCAL_VENDOR: ::c_int = SO_VENDOR;

pub const PL_EVENT_NONE: ::c_int = 0;
pub const PL_EVENT_SIGNAL: ::c_int = 1;
pub const PL_FLAG_SA: ::c_int = 0x01;
pub const PL_FLAG_BOUND: ::c_int = 0x02;
pub const PL_FLAG_SCE: ::c_int = 0x04;
pub const PL_FLAG_SCX: ::c_int = 0x08;
pub const PL_FLAG_EXEC: ::c_int = 0x10;
pub const PL_FLAG_SI: ::c_int = 0x20;
pub const PL_FLAG_FORKED: ::c_int = 0x40;
pub const PL_FLAG_CHILD: ::c_int = 0x80;
pub const PL_FLAG_BORN: ::c_int = 0x100;
pub const PL_FLAG_EXITED: ::c_int = 0x200;
pub const PL_FLAG_VFORKED: ::c_int = 0x400;
pub const PL_FLAG_VFORK_DONE: ::c_int = 0x800;

pub const PT_LWPINFO: ::c_int = 13;
pub const PT_GETNUMLWPS: ::c_int = 14;
pub const PT_GETLWPLIST: ::c_int = 15;
Expand Down

0 comments on commit ad6e1be

Please sign in to comment.