]> Cypherpunks repositories - gostls13.git/commitdiff
internal/bisect: use f.Function instead of f.Func.Name in stack trace
authorRuss Cox <rsc@golang.org>
Fri, 26 Apr 2024 14:46:24 +0000 (10:46 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 3 May 2024 17:28:43 +0000 (17:28 +0000)
For inlined frames f.Func is nil and f.Func.Name is an empty string.
f.Function is correct all the time.

Change-Id: I7c30f80e7176128ae5576b130d2891f884ee47c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/581996
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/internal/bisect/bisect.go

index fa753e80e7e56a6b21a3442051e35cc311d97372..a79bb8000daa0ea6d698de9278ed7026f04eff5e 100644 (file)
@@ -496,7 +496,7 @@ func printStack(w Writer, h uint64, stk []uintptr) error {
        for {
                f, more := frames.Next()
                buf = append(buf, prefix...)
-               buf = append(buf, f.Func.Name()...)
+               buf = append(buf, f.Function...)
                buf = append(buf, "()\n"...)
                buf = append(buf, prefix...)
                buf = append(buf, '\t')