aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/symtab.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/symtab.go')
-rw-r--r--src/runtime/symtab.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go
index a14f5c13d9..932fba3de0 100644
--- a/src/runtime/symtab.go
+++ b/src/runtime/symtab.go
@@ -326,7 +326,7 @@ const (
funcID_gcBgMarkWorker
funcID_systemstack_switch
funcID_systemstack
- funcID_cgocallback_gofunc
+ funcID_cgocallback
funcID_gogo
funcID_externalthreadhandler
funcID_debugCallV1
@@ -844,6 +844,22 @@ func funcname(f funcInfo) string {
return gostringnocopy(cfuncname(f))
}
+func funcpkgpath(f funcInfo) string {
+ name := funcname(f)
+ i := len(name) - 1
+ for ; i > 0; i-- {
+ if name[i] == '/' {
+ break
+ }
+ }
+ for ; i < len(name); i++ {
+ if name[i] == '.' {
+ break
+ }
+ }
+ return name[:i]
+}
+
func cfuncnameFromNameoff(f funcInfo, nameoff int32) *byte {
if !f.valid() {
return nil