vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
changeset 256 6d9efbef00a9
parent 251 1c52a0eeb952
child 260 445e01aede7e
equal deleted inserted replaced
255:4f153a23adab 256:6d9efbef00a9
     1 // Copyright 2009 The Go Authors. All rights reserved.
     1 // Copyright 2009 The Go Authors. All rights reserved.
     2 // Use of this source code is governed by a BSD-style
     2 // Use of this source code is governed by a BSD-style
     3 // license that can be found in the LICENSE file.
     3 // license that can be found in the LICENSE file.
     4 
     4 
       
     5 //go:build 386 && freebsd
     5 // +build 386,freebsd
     6 // +build 386,freebsd
     6 
     7 
     7 package unix
     8 package unix
     8 
     9 
     9 import (
    10 import (
    53 	return
    54 	return
    54 }
    55 }
    55 
    56 
    56 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)
    57 
    58 
       
    59 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
       
    60 	return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
       
    61 }
       
    62 
    58 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
    63 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
    59 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
    64 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
    60 	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
    65 	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
    61 	return int(ioDesc.Len), err
    66 	return int(ioDesc.Len), err
    62 }
    67 }