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:
parent
de7b8c5007
commit
dd79b330c9
@ -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) }
|
||||
|
Loading…
Reference in New Issue
Block a user