syscall_linux_amd64.go 697 B

123456789101112131415161718192021222324252627
  1. // syscall_linux_amd64.go -- GNU/Linux 386 specific support
  2. // Copyright 2009 The Go Authors. All rights reserved.
  3. // Use of this source code is governed by a BSD-style
  4. // license that can be found in the LICENSE file.
  5. package syscall
  6. import "unsafe"
  7. func (r *PtraceRegs) PC() uint64 {
  8. return r.Rip
  9. }
  10. func (r *PtraceRegs) SetPC(pc uint64) {
  11. r.Rip = pc
  12. }
  13. func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
  14. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  15. }
  16. func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
  17. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  18. }
  19. func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno)