1
2
3
4
5
6
7 package unix
8
9 import "unsafe"
10
11
12 type PtraceRegsMipsle struct {
13 Regs [32]uint64
14 Lo uint64
15 Hi uint64
16 Epc uint64
17 Badvaddr uint64
18 Status uint64
19 Cause uint64
20 }
21
22
23 func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
24 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
25 }
26
27
28 func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
29 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
30 }
31
32
33 type PtraceRegsMips64le struct {
34 Regs [32]uint64
35 Lo uint64
36 Hi uint64
37 Epc uint64
38 Badvaddr uint64
39 Status uint64
40 Cause uint64
41 }
42
43
44 func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
45 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
46 }
47
48
49 func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
50 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
51 }
52
View as plain text