zptrace_armnn_linux.go raw

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