From: Ian Lance Taylor Date: Thu, 22 Jun 2017 04:16:23 +0000 (+0000) Subject: runtime: in traceback, print panic rather than runtime.gopanic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c83c219a6359e2ab655e7b8a7fabe829fd7bc6b9;p=gcc.git runtime: in traceback, print panic rather than runtime.gopanic The gc toolchain does the same thing, in gentraceback in runtime/traceback.go. The test for this is TestPanicTraceback in runtime/crash_test.go. We don't yet run that test, but we will in a future change. Reviewed-on: https://go-review.googlesource.com/46397 From-SVN: r249495 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9a23eb98b98..17df499a095 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -075e67bdbcb730669c1af1aa2d53bb77cbb2a3c5 +f70ef19badafb85b1caa72b51b0082deb48d433a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/runtime/traceback_gccgo.go b/libgo/go/runtime/traceback_gccgo.go index 0da517189ec..715772edf92 100644 --- a/libgo/go/runtime/traceback_gccgo.go +++ b/libgo/go/runtime/traceback_gccgo.go @@ -77,7 +77,11 @@ func traceback(skip int32) { func printtrace(locbuf []location, gp *g) { for i := range locbuf { if showframe(locbuf[i].function, gp) { - print(locbuf[i].function, "\n\t", locbuf[i].filename, ":", locbuf[i].lineno, "\n") + name := locbuf[i].function + if name == "runtime.gopanic" { + name = "panic" + } + print(name, "\n\t", locbuf[i].filename, ":", locbuf[i].lineno, "\n") } } }