diff mbox

libgo patch committed: Don't always show frames with no function in traceback

Message ID CAOyqgcUCfrx+PVajZ7aREe3TiJGSRL7muUjoq5CPcUpsMcjPgg@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor June 13, 2017, 1:29 p.m. UTC
In a Go traceback, if there is no function name, that traceback entry
is generally uninformative.  In earlier versions we did not show such
frames.  This patch restores that behavior.  These frames can be seen
with GOTRACEBACK=system.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 249143)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-3b44ad058abda0d1b0b6c928987270da50ab7431
+c4ecdd3edb9febe72b5527481ae3d7310105ca67
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/runtime/traceback_gccgo.go
===================================================================
--- libgo/go/runtime/traceback_gccgo.go	(revision 249125)
+++ libgo/go/runtime/traceback_gccgo.go	(working copy)
@@ -94,7 +94,7 @@  func showframe(name string, gp *g) bool
 	// We want to print those in the traceback.
 	// But unless GOTRACEBACK > 1 (checked below), still skip
 	// internal C functions and cgo-generated functions.
-	if !contains(name, ".") && !hasprefix(name, "__go_") && !hasprefix(name, "_cgo_") {
+	if name != "" && !contains(name, ".") && !hasprefix(name, "__go_") && !hasprefix(name, "_cgo_") {
 		return true
 	}