diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-06-16 23:05:44 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2021-06-17 18:54:48 +0000 |
| commit | 6d85891b291db01532375a7f69c24cb68b76bf11 (patch) | |
| tree | 480c38966fed8d9e66bc747adaeb51e2cb7c6739 /src/runtime/export_debug_test.go | |
| parent | 122f5e16d690bd14ae46e9cc7e37c0c84fdc2be8 (diff) | |
| download | go-6d85891b291db01532375a7f69c24cb68b76bf11.tar.xz | |
[dev.typeparams] runtime: replace uses of runtime/internal/sys.PtrSize with internal/goarch.PtrSize [generated]
[git-generate]
cd src/runtime/internal/math
gofmt -w -r "sys.PtrSize -> goarch.PtrSize" .
goimports -w *.go
cd ../..
gofmt -w -r "sys.PtrSize -> goarch.PtrSize" .
goimports -w *.go
Change-Id: I43491cdd54d2e06d4d04152b3d213851b7d6d423
Reviewed-on: https://go-review.googlesource.com/c/go/+/328337
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/export_debug_test.go')
| -rw-r--r-- | src/runtime/export_debug_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/export_debug_test.go b/src/runtime/export_debug_test.go index 9808fd5299..a2cef02cf8 100644 --- a/src/runtime/export_debug_test.go +++ b/src/runtime/export_debug_test.go @@ -9,7 +9,7 @@ package runtime import ( "internal/abi" - "runtime/internal/sys" + "internal/goarch" "unsafe" ) @@ -115,7 +115,7 @@ func (h *debugCallHandler) inject(info *siginfo, ctxt *sigctxt, gp2 *g) bool { return false } // Push current PC on the stack. - rsp := ctxt.rsp() - sys.PtrSize + rsp := ctxt.rsp() - goarch.PtrSize *(*uint64)(unsafe.Pointer(uintptr(rsp))) = ctxt.rip() ctxt.set_rsp(rsp) // Write the argument frame size. @@ -166,7 +166,7 @@ func (h *debugCallHandler) handle(info *siginfo, ctxt *sigctxt, gp2 *g) bool { storeRegArgs(ctxt.regs(), h.regArgs) } // Push return PC. - sp -= sys.PtrSize + sp -= goarch.PtrSize ctxt.set_rsp(sp) *(*uint64)(unsafe.Pointer(uintptr(sp))) = ctxt.rip() // Set PC to call and context register. @@ -182,7 +182,7 @@ func (h *debugCallHandler) handle(info *siginfo, ctxt *sigctxt, gp2 *g) bool { case 2: // Function panicked. Copy panic out. sp := ctxt.rsp() - memmove(unsafe.Pointer(&h.panic), unsafe.Pointer(uintptr(sp)), 2*sys.PtrSize) + memmove(unsafe.Pointer(&h.panic), unsafe.Pointer(uintptr(sp)), 2*goarch.PtrSize) case 8: // Call isn't safe. Get the reason. sp := ctxt.rsp() |
