vendor: fix arm build for golang.org/x/sys/unix/zptrace_armnn_linux.go

This commit is contained in:
Aliaksandr Valialkin 2019-12-08 12:48:39 +02:00
parent 293b541784
commit d900184d8d

View File

@ -42,12 +42,12 @@ func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
// PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint32(unsafe.Sizeof(*regsout))}
return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
}
// PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint32(unsafe.Sizeof(*regs))}
return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
}