syscall: add ptrace on darwin
The ptrace syscall remains gutted on darwin, but usable. This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.
R=rsc, dave, r
CC=golang-dev
https://golang.org/cl/4517147
diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go
index 9e153b7..fabd481 100644
--- a/src/pkg/syscall/syscall_darwin.go
+++ b/src/pkg/syscall/syscall_darwin.go
@@ -56,6 +56,10 @@
return origlen - len(buf), count, names
}
+//sys ptrace(request int, pid int, addr uintptr, data uintptr) (errno int)
+func PtraceAttach(pid int) (errno int) { return ptrace(PT_ATTACH, pid, 0, 0) }
+func PtraceDetach(pid int) (errno int) { return ptrace(PT_DETACH, pid, 0, 0) }
+
// TODO
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) {
return -1, ENOSYS