1
2
3 package unix
4
5 import "unsafe"
6
7
8 func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 }
12
13
14 func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 }
18
View as plain text