Skip to content

Commit ea748f7

Browse files
committed
Auto merge of #2410 - devnexen:bsd_utrace, r=Amanieu
BSD add utrace calls
2 parents 1ac780a + 2cb8a43 commit ea748f7

File tree

8 files changed

+13
-0
lines changed

8 files changed

+13
-0
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,13 @@ fn test_openbsd(target: &str) {
428428
"sys/file.h",
429429
"sys/ioctl.h",
430430
"sys/mman.h",
431+
"sys/param.h",
431432
"sys/resource.h",
432433
"sys/shm.h",
433434
"sys/socket.h",
434435
"sys/time.h",
436+
"sys/uio.h",
437+
"sys/ktrace.h",
435438
"sys/un.h",
436439
"sys/wait.h",
437440
"unistd.h",
@@ -969,6 +972,7 @@ fn test_netbsd(target: &str) {
969972
"sys/file.h",
970973
"sys/ioctl.h",
971974
"sys/ioctl_compat.h",
975+
"sys/ktrace.h",
972976
"sys/mman.h",
973977
"sys/mount.h",
974978
"sys/ptrace.h",
@@ -1185,6 +1189,7 @@ fn test_dragonflybsd(target: &str) {
11851189
"sys/file.h",
11861190
"sys/ioctl.h",
11871191
"sys/ipc.h",
1192+
"sys/ktrace.h",
11881193
"sys/mman.h",
11891194
"sys/mount.h",
11901195
"sys/ptrace.h",
@@ -1815,6 +1820,7 @@ fn test_freebsd(target: &str) {
18151820
"sys/types.h",
18161821
"sys/ucontext.h",
18171822
"sys/uio.h",
1823+
"sys/ktrace.h",
18181824
"sys/un.h",
18191825
"sys/user.h",
18201826
"sys/utsname.h",

libc-test/semver/dragonfly.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ uselocale
14621462
utimensat
14631463
utmpx
14641464
utmpxname
1465+
utrace
14651466
uuid
14661467
uuid_t
14671468
vm_size_t

libc-test/semver/freebsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ useconds_t
17561756
uselocale
17571757
utimensat
17581758
utmpx
1759+
utrace
17591760
vm_size_t
17601761
wait4
17611762
waitid

libc-test/semver/netbsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ utmp
13921392
utmpx
13931393
utmpxname
13941394
utpname
1395+
utrace
13951396
vm_size_t
13961397
wait4
13971398
waitid

libc-test/semver/openbsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,5 +1119,6 @@ useconds_t
11191119
uselocale
11201120
utimensat
11211121
utmp
1122+
utrace
11221123
wait4
11231124
xucred

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ extern "C" {
15671567
pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int;
15681568
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
15691569
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int;
1570+
pub fn utrace(addr: *const ::c_void, len: ::size_t) -> ::c_int;
15701571
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
15711572
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t)
15721573
-> ::ssize_t;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,7 @@ extern "C" {
21472147
) -> ::c_int;
21482148
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
21492149
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_void, data: ::c_int) -> ::c_int;
2150+
pub fn utrace(label: *const ::c_char, addr: *mut ::c_void, len: ::size_t) -> ::c_int;
21502151
pub fn pthread_setname_np(
21512152
t: ::pthread_t,
21522153
name: *const ::c_char,

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,7 @@ extern "C" {
15611561
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
15621562
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
15631563
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: caddr_t, data: ::c_int) -> ::c_int;
1564+
pub fn utrace(label: *const ::c_char, addr: *const ::c_void, len: ::size_t) -> ::c_int;
15641565
pub fn memmem(
15651566
haystack: *const ::c_void,
15661567
haystacklen: ::size_t,

0 commit comments

Comments
 (0)