syscall_linux_386.go 716 B

1234567891011121314151617181920212223
  1. // syscall_linux_386.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 { return uint64(uint32(r.Eip)) }
  8. func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
  9. func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
  10. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  11. }
  12. func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
  13. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  14. }
  15. func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno)