diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-01-24 10:30:36 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-01-24 19:28:08 +0000 |
commit | b850f3629fa9c2dfb6a94a3d0e472a0cc87b949c (patch) | |
tree | 57448e97e221f9d338a64e7975f9acb46328ce92 | |
parent | 48ec6df16c285cda50bd38970b82402e8c46919b (diff) | |
download | go-b850f3629fa9c2dfb6a94a3d0e472a0cc87b949c.tar.gz go-b850f3629fa9c2dfb6a94a3d0e472a0cc87b949c.zip |
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>
-rw-r--r-- | src/cmd/compile/internal/base/print.go | 4 |
1 files changed, 2 insertions, 2 deletions
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() |