mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
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/76670 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
4b45465282
commit
1e2299c37c
@@ -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)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user