zptrace_mipsnnle_linux.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT.
  2. //go:build linux && (mipsle || mips64le)
  3. // +build linux
  4. // +build mipsle mips64le
  5. package unix
  6. import "unsafe"
  7. // PtraceRegsMipsle is the registers used by mipsle binaries.
  8. type PtraceRegsMipsle struct {
  9. Regs [32]uint64
  10. Lo uint64
  11. Hi uint64
  12. Epc uint64
  13. Badvaddr uint64
  14. Status uint64
  15. Cause uint64
  16. }
  17. // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
  18. func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
  19. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  20. }
  21. // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
  22. func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
  23. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  24. }
  25. // PtraceRegsMips64le is the registers used by mips64le binaries.
  26. type PtraceRegsMips64le struct {
  27. Regs [32]uint64
  28. Lo uint64
  29. Hi uint64
  30. Epc uint64
  31. Badvaddr uint64
  32. Status uint64
  33. Cause uint64
  34. }
  35. // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
  36. func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
  37. return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
  38. }
  39. // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
  40. func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
  41. return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
  42. }