mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
6c163e5ac9
commit
61a0a70113
12 changed files with 44 additions and 38 deletions
|
|
@ -802,7 +802,7 @@ func printDebugLog() {
|
|||
// pc is a return PC that must first be converted to a call PC.
|
||||
func printDebugLogPC(pc uintptr, returnPC bool) {
|
||||
fn := findfunc(pc)
|
||||
if returnPC && (!fn.valid() || pc > fn.entry) {
|
||||
if returnPC && (!fn.valid() || pc > fn.entry()) {
|
||||
// TODO(austin): Don't back up if the previous frame
|
||||
// was a sigpanic.
|
||||
pc--
|
||||
|
|
@ -814,7 +814,7 @@ func printDebugLogPC(pc uintptr, returnPC bool) {
|
|||
} else {
|
||||
name := funcname(fn)
|
||||
file, line := funcline(fn, pc)
|
||||
print(" [", name, "+", hex(pc-fn.entry),
|
||||
print(" [", name, "+", hex(pc-fn.entry()),
|
||||
" ", file, ":", line, "]")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue