blob: bd001a6e1cc714825d2ef2f103c7f05ae078959d [file] [log] [blame]
Andrea Campanella3614a922021-02-25 12:40:42 +01001// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
khenaidooac637102019-01-14 15:44:34 -05002
khenaidood948f772021-08-11 17:49:24 -04003//go:build linux && (arm || arm64)
khenaidooac637102019-01-14 15:44:34 -05004// +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}