zptracemips_linux.go 1.4 KB

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