Commit 1e2299c3 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

unix: add PtracePokeUser

PtracePeekUser was already added in CL 38638, also add its "counterpart"
allowing to modify the tracee's user area.

Change-Id: Id84e85fe17b5cab7df5ecc83b6b7b8a39241241d
Reviewed-on: https://go-review.googlesource.com/76670Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 4b454652
......@@ -1125,6 +1125,10 @@ func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
}
func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
}
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment