Skip to content

Commit 55314c1

Browse files
authored
Merge pull request #1819 from SWW13/bsd-ptrace
2 parents a725078 + fabdb14 commit 55314c1

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ s! {
116116
pub sc_ngroups: ::c_int,
117117
pub sc_groups: [::gid_t; 1],
118118
}
119+
120+
pub struct ptrace_vm_entry {
121+
pub pve_entry: ::c_int,
122+
pub pve_timestamp: ::c_int,
123+
pub pve_start: ::c_ulong,
124+
pub pve_end: ::c_ulong,
125+
pub pve_offset: ::c_ulong,
126+
pub pve_prot: ::c_uint,
127+
pub pve_pathlen: ::c_uint,
128+
pub pve_fileid: ::c_long,
129+
pub pve_fsid: u32,
130+
pub pve_path: *mut ::c_char,
131+
}
119132
}
120133

121134
s_no_extra_traits! {

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ s! {
218218
pub tai: ::c_long,
219219
pub time_state: ::c_int,
220220
}
221+
222+
pub struct ptrace_io_desc {
223+
pub piod_op: ::c_int,
224+
pub piod_offs: *mut ::c_void,
225+
pub piod_addr: *mut ::c_void,
226+
pub piod_len: ::size_t,
227+
}
221228
}
222229

223230
s_no_extra_traits! {
@@ -713,6 +720,11 @@ pub const PF_NATM: ::c_int = AF_NATM;
713720
pub const PF_ATM: ::c_int = AF_ATM;
714721
pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH;
715722

723+
pub const PIOD_READ_D: ::c_int = 1;
724+
pub const PIOD_WRITE_D: ::c_int = 2;
725+
pub const PIOD_READ_I: ::c_int = 3;
726+
pub const PIOD_WRITE_I: ::c_int = 4;
727+
716728
pub const PT_TRACE_ME: ::c_int = 0;
717729
pub const PT_READ_I: ::c_int = 1;
718730
pub const PT_READ_D: ::c_int = 2;

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ s! {
7575
pub seq: ::c_ushort,
7676
pub key: ::key_t,
7777
}
78+
79+
pub struct ptrace_io_desc {
80+
pub piod_op: ::c_int,
81+
pub piod_offs: *mut ::c_void,
82+
pub piod_addr: *mut ::c_void,
83+
pub piod_len: ::size_t,
84+
}
7885
}
7986

8087
pub const D_T_FMT: ::nl_item = 0;
@@ -343,6 +350,12 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4;
343350
pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
344351
pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
345352

353+
pub const PIOD_READ_D: ::c_int = 1;
354+
pub const PIOD_WRITE_D: ::c_int = 2;
355+
pub const PIOD_READ_I: ::c_int = 3;
356+
pub const PIOD_WRITE_I: ::c_int = 4;
357+
pub const PIOD_READ_AUXV: ::c_int = 5;
358+
346359
pub const PT_TRACE_ME: ::c_int = 0;
347360
pub const PT_READ_I: ::c_int = 1;
348361
pub const PT_READ_D: ::c_int = 2;

0 commit comments

Comments
 (0)