aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
committerLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
commit404aeae4545d2426c089a5f8d5e82dae56f5212b (patch)
tree2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
parent209d8b0187ed025dec9ac149ebcced3462877bff (diff)
downloadgitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz
gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip
Make Nix builds work
Diffstat (limited to 'vendor/golang.org/x/sys/unix/zptrace_x86_linux.go')
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_x86_linux.go79
1 files changed, 79 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
new file mode 100644
index 0000000..5adc79f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
@@ -0,0 +1,79 @@
1// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT.
2
3//go:build linux && (386 || amd64)
4
5package unix
6
7import "unsafe"
8
9// PtraceRegs386 is the registers used by 386 binaries.
10type PtraceRegs386 struct {
11 Ebx int32
12 Ecx int32
13 Edx int32
14 Esi int32
15 Edi int32
16 Ebp int32
17 Eax int32
18 Xds int32
19 Xes int32
20 Xfs int32
21 Xgs int32
22 Orig_eax int32
23 Eip int32
24 Xcs int32
25 Eflags int32
26 Esp int32
27 Xss int32
28}
29
30// PtraceGetRegs386 fetches the registers used by 386 binaries.
31func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {
32 return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
33}
34
35// PtraceSetRegs386 sets the registers used by 386 binaries.
36func PtraceSetRegs386(pid int, regs *PtraceRegs386) error {
37 return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
38}
39
40// PtraceRegsAmd64 is the registers used by amd64 binaries.
41type PtraceRegsAmd64 struct {
42 R15 uint64
43 R14 uint64
44 R13 uint64
45 R12 uint64
46 Rbp uint64
47 Rbx uint64
48 R11 uint64
49 R10 uint64
50 R9 uint64
51 R8 uint64
52 Rax uint64
53 Rcx uint64
54 Rdx uint64
55 Rsi uint64
56 Rdi uint64
57 Orig_rax uint64
58 Rip uint64
59 Cs uint64
60 Eflags uint64
61 Rsp uint64
62 Ss uint64
63 Fs_base uint64
64 Gs_base uint64
65 Ds uint64
66 Es uint64
67 Fs uint64
68 Gs uint64
69}
70
71// PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
72func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {
73 return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
74}
75
76// PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
77func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {
78 return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
79}