1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:14:43 -07:00

syscall: remove unused ptracePtr on darwin

ptracePtr was introduced in CL 470299 for darwin but it's not used on
this platform. Also, the argument types for addr and data were swapped
in the generated ptrace1Ptr (probably because the change was not
generated but done manually).

For #58387

Change-Id: I429ab0c741e19020d98729c34efabce1d9003f56
Reviewed-on: https://go-review.googlesource.com/c/go/+/526475
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Tobias Klauser 2023-09-07 22:51:39 +02:00 committed by Gopher Robot
parent 02d581ef53
commit 3a124de515
6 changed files with 0 additions and 38 deletions

View File

@ -6,16 +6,9 @@
package syscall
import "unsafe"
// Nosplit because it is called from forkAndExecInChild.
//
//go:nosplit
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
return ptrace1(request, pid, addr, data)
}
//go:nosplit
func ptracePtr(request int, pid int, addr unsafe.Pointer, data uintptr) error {
return ptrace1Ptr(request, pid, addr, data)
}

View File

@ -6,16 +6,9 @@
package syscall
import "unsafe"
// Nosplit because it is called from forkAndExecInChild.
//
//go:nosplit
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
panic("unimplemented")
}
//go:nosplit
func ptracePtr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) {
panic("unimplemented")
}

View File

@ -25,7 +25,6 @@ func setTimeval(sec, usec int64) Timeval {
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_statfs64
//sys fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_fstatat64
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)

View File

@ -25,7 +25,6 @@ func setTimeval(sec, usec int64) Timeval {
//sys Statfs(path string, stat *Statfs_t) (err error)
//sys fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)

View File

@ -2022,14 +2022,3 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
func libc_ptrace_trampoline()
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
//go:nosplit
func ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) {
_, _, e1 := syscall6(abi.FuncPCABI0(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -2022,14 +2022,3 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
func libc_ptrace_trampoline()
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
//go:nosplit
func ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) {
_, _, e1 := syscall6(abi.FuncPCABI0(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}