...
1
2
3
4
5 package unix
6
7 import "unsafe"
8
9
10 type PtraceRegsArm struct {
11 Uregs [18]uint32
12 }
13
14
15 func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
16 return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
17 }
18
19
20 func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
21 return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
22 }
23
24
25 type PtraceRegsArm64 struct {
26 Regs [31]uint64
27 Sp uint64
28 Pc uint64
29 Pstate uint64
30 }
31
32
33 func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
34 return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
35 }
36
37
38 func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
39 return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
40 }
41
View as plain text