You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

  1. // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
  2. // +build linux
  3. // +build arm arm64
  4. package unix
  5. import "unsafe"
  6. // PtraceRegsArm is the registers used by arm binaries.
  7. type PtraceRegsArm struct {
  8. Uregs [18]uint32
  9. }
  10. // PtraceGetRegsArm fetches the registers used by arm binaries.
  11. func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
  12. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  13. }
  14. // PtraceSetRegsArm sets the registers used by arm binaries.
  15. func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
  16. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  17. }
  18. // PtraceRegsArm64 is the registers used by arm64 binaries.
  19. type PtraceRegsArm64 struct {
  20. Regs [31]uint64
  21. Sp uint64
  22. Pc uint64
  23. Pstate uint64
  24. }
  25. // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
  26. func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
  27. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  28. }
  29. // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
  30. func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
  31. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  32. }