1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:17:57 -07:00

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
This commit is contained in:
Dave Cheney 2012-09-01 09:17:14 +10:00
parent de7b8c5007
commit dd79b330c9

View File

@ -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) }