zptrace_linux_arm64.go 733 B

1234567891011121314151617
  1. // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
  2. package unix
  3. import "unsafe"
  4. // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
  5. func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
  6. iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
  7. return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
  8. }
  9. // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
  10. func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
  11. iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
  12. return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
  13. }