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