Commit dd79b330 authored by Dave Cheney's avatar Dave Cheney

syscall: add PtraceSyscall(pid int, signal int)

Fixes #3525.

PTRACE_SYSCALL behaves like PTRACE_CONT and can deliver
a signal to the process. Ideally PtraceSingleStep should
support the signal argument, but its interface is frozen
by Go1.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/6353051
parent de7b8c50
......@@ -735,6 +735,10 @@ func PtraceCont(pid int, signal int) (err error) {
return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
}
func PtraceSyscall(pid int, signal int) (err error) {
return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
}
func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
......
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