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