Skip to content

Commit bfd1ebb

Browse files
tklausergopherbot
authored andcommitted
unix: remove unused ptracePtr on darwin
ptracePtr was introduced in CL 469835 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). This change also includes generated changes moving some definitions in zsyscall_darwin_*.go and removing some empty lines in zsyscall_darwin_*.s. These changes result from running ./mkall on darwin/amd64 and darwin/arm64. For golang/go#58387 Change-Id: I90bba3be7fbc8c77815450d0b666a2948b63fab0 Reviewed-on: https://go-review.googlesource.com/c/sys/+/526455 Auto-Submit: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Bryan Mills <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 81cb935 commit bfd1ebb

8 files changed

+12
-336
lines changed

unix/ptrace_darwin.go

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77

88
package unix
99

10-
import "unsafe"
11-
1210
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
1311
return ptrace1(request, pid, addr, data)
1412
}
15-
16-
func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
17-
return ptrace1Ptr(request, pid, addr, data)
18-
}

unix/ptrace_ios.go

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77

88
package unix
99

10-
import "unsafe"
11-
1210
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
1311
return ENOTSUP
1412
}
15-
16-
func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
17-
return ENOTSUP
18-
}

unix/syscall_darwin_amd64.go

-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
4747
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
4848
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
4949
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
50-
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
5150
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
5251
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64

unix/syscall_darwin_arm64.go

-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
4747
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
4848
//sys Lstat(path string, stat *Stat_t) (err error)
4949
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
50-
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
5150
//sys Stat(path string, stat *Stat_t) (err error)
5251
//sys Statfs(path string, stat *Statfs_t) (err error)

unix/zsyscall_darwin_amd64.go

+6-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)