1
0
mirror of https://github.com/golang/go synced 2024-11-17 06:54:48 -07:00

cmd/compile: always print stack trace for -dpanic

Change-Id: I40cfc87731d3a29670a3e183948898ea0cb2402d
Reviewed-on: https://go-review.googlesource.com/c/go/+/380534
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Ian Lance Taylor 2022-01-24 10:30:36 -08:00
parent 48ec6df16c
commit b850f3629f

View File

@ -217,10 +217,10 @@ func FatalfAt(pos src.XPos, format string, args ...interface{}) {
fmt.Printf("\n")
// If this is a released compiler version, ask for a bug report.
if strings.HasPrefix(buildcfg.Version, "go") {
if Debug.Panic == 0 && strings.HasPrefix(buildcfg.Version, "go") {
fmt.Printf("\n")
fmt.Printf("Please file a bug report including a short program that triggers the error.\n")
fmt.Printf("https://golang.org/issue/new\n")
fmt.Printf("https://go.dev/issue/new\n")
} else {
// Not a release; dump a stack trace, too.
fmt.Println()