From 61a0a701135e38c48131ea18925dc5b027cc3a3c Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 21 Sep 2021 14:05:57 -0700 Subject: runtime: convert _func.entry to a method A subsequent change will alter the semantics of _func.entry. To make that change obvious and clear, change _func.entry to a method, and rename the field to _func.entryPC. Change-Id: I05d66b54d06c5956d4537b0729ddf4290c3e2635 Reviewed-on: https://go-review.googlesource.com/c/go/+/351460 Trust: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- src/runtime/stack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/stack.go') diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 368ad6efa4..cccec49f8e 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -966,7 +966,7 @@ func newstack() { f := findfunc(gp.sched.pc) if f.valid() { pcname = funcname(f) - pcoff = gp.sched.pc - f.entry + pcoff = gp.sched.pc - f.entry() } print("runtime: newstack at ", pcname, "+", hex(pcoff), " sp=", hex(gp.sched.sp), " stack=[", hex(gp.stack.lo), ", ", hex(gp.stack.hi), "]\n", @@ -1240,7 +1240,7 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args f := frame.fn pcdata := int32(-1) - if targetpc != f.entry { + if targetpc != f.entry() { // Back up to the CALL. If we're at the function entry // point, we want to use the entry map (-1), even if // the first instruction of the function changes the -- cgit v1.3-5-g9baa