]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: always print stack trace for -dpanic
authorIan Lance Taylor <iant@golang.org>
Mon, 24 Jan 2022 18:30:36 +0000 (10:30 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 24 Jan 2022 19:28:08 +0000 (19:28 +0000)
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>

src/cmd/compile/internal/base/print.go

index 4afe2eb9eea3154f83456ed4ed282f04d7d1ab4a..955f9d207760d5f6fc9c170244605c2ebc24fc69 100644 (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()