diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-11-16 20:06:53 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-11-20 12:44:35 -0800 |
commit | a01dda3c23b836754814fab1cab949a1bbc641e8 (patch) | |
tree | 826310b88323c0f636baf89393557fde6a56fdeb /libgo/go/runtime/traceback_gccgo.go | |
parent | 90bf60c3c24c6c99ebbecf9d08a6d0d916d73721 (diff) | |
download | gcc-a01dda3c23b836754814fab1cab949a1bbc641e8.zip gcc-a01dda3c23b836754814fab1cab949a1bbc641e8.tar.gz gcc-a01dda3c23b836754814fab1cab949a1bbc641e8.tar.bz2 |
compiler, libgo: change mangling scheme
Overhaul the mangling scheme to avoid ambiguities if the package path
contains a dot. Instead of using dot both to separate components and
to mangle characters, use dot only to separate components and use
underscore to mangle characters.
For golang/go#41862
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
Diffstat (limited to 'libgo/go/runtime/traceback_gccgo.go')
-rw-r--r-- | libgo/go/runtime/traceback_gccgo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/runtime/traceback_gccgo.go b/libgo/go/runtime/traceback_gccgo.go index 1ba91af..ebdbefc 100644 --- a/libgo/go/runtime/traceback_gccgo.go +++ b/libgo/go/runtime/traceback_gccgo.go @@ -184,10 +184,10 @@ func showfuncinfo(name string, firstFrame bool) bool { // isExportedRuntime reports whether name is an exported runtime function. // It is only for runtime functions, so ASCII A-Z is fine. Here also check // for mangled functions from runtime/<...>, which will be prefixed with -// "runtime..z2f". +// "runtime_1". func isExportedRuntime(name string) bool { const n = len("runtime.") - if hasPrefix(name, "runtime..z2f") { + if hasPrefix(name, "runtime_1") { return true } return len(name) > n && name[:n] == "runtime." && 'A' <= name[n] && name[n] <= 'Z' |