aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/traceback_gccgo.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/traceback_gccgo.go')
-rw-r--r--libgo/go/runtime/traceback_gccgo.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/runtime/traceback_gccgo.go b/libgo/go/runtime/traceback_gccgo.go
index ebdbefc..af1676f 100644
--- a/libgo/go/runtime/traceback_gccgo.go
+++ b/libgo/go/runtime/traceback_gccgo.go
@@ -8,6 +8,7 @@
package runtime
import (
+ "internal/bytealg"
"runtime/internal/sys"
"unsafe"
)
@@ -155,7 +156,7 @@ func showfuncinfo(name string, firstFrame bool) 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 name != "" && !contains(name, ".") && !hasPrefix(name, "__go_") && !hasPrefix(name, "_cgo_") {
+ if name != "" && bytealg.IndexByteString(name, '.') < 0 && !hasPrefix(name, "__go_") && !hasPrefix(name, "_cgo_") {
return true
}
@@ -178,7 +179,7 @@ func showfuncinfo(name string, firstFrame bool) bool {
return true
}
- return contains(name, ".") && (!hasPrefix(name, "runtime.") || isExportedRuntime(name))
+ return bytealg.IndexByteString(name, '.') >= 0 && (!hasPrefix(name, "runtime.") || isExportedRuntime(name))
}
// isExportedRuntime reports whether name is an exported runtime function.