runtime: don't always show frames with no function in traceback
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Jun 2017 13:29:26 +0000 (13:29 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Jun 2017 13:29:26 +0000 (13:29 +0000)
    If there is no function name, the traceback is generally
    uninformative.  In earlier versions we did not show such frames.
    Restore that behavior.  These frames can be seen with GOTRACEBACK=system.

    Reviewed-on: https://go-review.googlesource.com/45431

From-SVN: r249156

gcc/go/gofrontend/MERGE
libgo/go/runtime/traceback_gccgo.go

index a2ed1f30ffe3c23bbb8960dd685df317ea48295b..78bd0574fb6e052a62d9e97f193ee56ef8d9eb09 100644 (file)
@@ -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 fb51043e13da992c79a8c4764ab14aabb95d7c6d..0da517189ec221298714ec3ba4615fb4829e942d 100644 (file)
@@ -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
        }