diff options
| author | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
| commit | 404aeae4545d2426c089a5f8d5e82dae56f5212b (patch) | |
| tree | 2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go | |
| parent | 209d8b0187ed025dec9ac149ebcced3462877bff (diff) | |
| download | gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip | |
Make Nix builds work
Diffstat (limited to 'vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go')
| -rw-r--r-- | vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go new file mode 100644 index 0000000..586317c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go | |||
| @@ -0,0 +1,40 @@ | |||
| 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 | } | ||