vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
changeset 272 e9ffa471eeb3
parent 262 8d3354485fc3
child 274 cea6d2f4f728
equal deleted inserted replaced
271:c8b8b7cc8896 272:e9ffa471eeb3
    54 	return
    54 	return
    55 }
    55 }
    56 
    56 
    57 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
    57 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
    58 
    58 
    59 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
    59 func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {
    60 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
    60 	ioDesc := PtraceIoDesc{
       
    61 		Op:   int32(req),
       
    62 		Offs: offs,
       
    63 		Addr: uintptr(unsafe.Pointer(&out[0])), // TODO(#58351): this is not safe.
       
    64 		Len:  uint32(countin),
       
    65 	}
    61 	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
    66 	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
    62 	return int(ioDesc.Len), err
    67 	return int(ioDesc.Len), err
    63 }
    68 }