diff -r c040f992052f -r 1c52a0eeb952 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go Wed Sep 18 19:17:42 2019 +0200 +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go Sun Feb 16 18:54:01 2020 +0100 @@ -33,6 +33,10 @@ msghdr.Controllen = uint32(length) } +func (msghdr *Msghdr) SetIovlen(length int) { + msghdr.Iovlen = int32(length) +} + func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } @@ -50,3 +54,9 @@ } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { + ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} + err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) + return int(ioDesc.Len), err +}