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.

zptrace_armnn_linux.go 1.2KB

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