]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: remove unused ptracePtr on darwin
authorTobias Klauser <tklauser@distanz.ch>
Thu, 7 Sep 2023 20:51:39 +0000 (22:51 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 7 Sep 2023 21:07:58 +0000 (21:07 +0000)
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>

src/syscall/ptrace_darwin.go
src/syscall/ptrace_ios.go
src/syscall/syscall_darwin_amd64.go
src/syscall/syscall_darwin_arm64.go
src/syscall/zsyscall_darwin_amd64.go
src/syscall/zsyscall_darwin_arm64.go

index 466f8135b4c6535d3f35eaef936c647106165286..519e451c73ff94a5f27e8f6d29330823253fc941 100644 (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)
-}
index a9b291845bea20ebeb3b4e95f66ade421651d634..fa8d0007154997b549453df1ebd3c008ac762f7a 100644 (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")
-}
index 52ca3c8d5aeac4da1f4ec5628da1634823e741dc..ef3c1998aada5b5d4a61dbc07b548a592aa12fae 100644 (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)
index d5da988117850921cc5ad046a37d69f51aa5302a..cea42772bbccf180514bfd26b2df1c6f22420efb 100644 (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)
index 83680b381ad6a60541ebc8483e7e4b9050df5af5..161bb4443a1409fa69f0ee037576199d520ab56c 100644 (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
-}
index 08da23789ac5b72fef14bd931b07160fd70590b3..630737138896d2613a1caaa2701418f175214edc 100644 (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
-}