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