From: Ian Lance Taylor Date: Mon, 24 Jan 2022 18:30:36 +0000 (-0800) Subject: cmd/compile: always print stack trace for -dpanic X-Git-Tag: go1.18beta2~46 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b850f3629fa9c2dfb6a94a3d0e472a0cc87b949c;p=gostls13.git 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 Run-TryBot: Ian Lance Taylor Reviewed-by: Russ Cox TryBot-Result: Gopher Robot --- diff --git a/src/cmd/compile/internal/base/print.go b/src/cmd/compile/internal/base/print.go index 4afe2eb9ee..955f9d2077 100644 --- a/src/cmd/compile/internal/base/print.go +++ b/src/cmd/compile/internal/base/print.go @@ -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()