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.go49
1 files changed, 36 insertions, 13 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go
index 7667f23f1d..00f802aaa7 100644
--- a/src/runtime/symtab.go
+++ b/src/runtime/symtab.go
@@ -308,30 +308,53 @@ type funcID uint8
const (
funcID_normal funcID = iota // not a special function
- funcID_runtime_main
+ funcID_asmcgocall
+ funcID_asyncPreempt
+ funcID_cgocallback
+ funcID_debugCallV1
+ funcID_externalthreadhandler
+ funcID_gcBgMarkWorker
funcID_goexit
+ funcID_gogo
+ funcID_gopanic
+ funcID_handleAsyncEvent
funcID_jmpdefer
funcID_mcall
funcID_morestack
funcID_mstart
+ funcID_panicwrap
funcID_rt0_go
- funcID_asmcgocall
- funcID_sigpanic
funcID_runfinq
- funcID_gcBgMarkWorker
- funcID_systemstack_switch
+ funcID_runtime_main
+ funcID_sigpanic
funcID_systemstack
- funcID_cgocallback
- funcID_gogo
- funcID_externalthreadhandler
- funcID_debugCallV1
- funcID_gopanic
- funcID_panicwrap
- funcID_handleAsyncEvent
- funcID_asyncPreempt
+ funcID_systemstack_switch
funcID_wrapper // any autogenerated code (hash/eq algorithms, method wrappers, etc.)
)
+// A FuncFlag holds bits about a function.
+// This list must match the list in cmd/internal/objabi/funcid.go.
+type funcFlag uint8
+
+const (
+ // TOPFRAME indicates a function that appears at the top of its stack.
+ // The traceback routine stop at such a function and consider that a
+ // successful, complete traversal of the stack.
+ // Examples of TOPFRAME functions include goexit, which appears
+ // at the top of a user goroutine stack, and mstart, which appears
+ // at the top of a system goroutine stack.
+ funcFlag_TOPFRAME funcFlag = 1 << iota
+
+ // SPWRITE indicates a function that writes an arbitrary value to SP
+ // (any write other than adding or subtracting a constant amount).
+ // The traceback routines cannot encode such changes into the
+ // pcsp tables, so the function traceback cannot safely unwind past
+ // SPWRITE functions. Stopping at an SPWRITE function is considered
+ // to be an incomplete unwinding of the stack. In certain contexts
+ // (in particular garbage collector stack scans) that is a fatal error.
+ funcFlag_SPWRITE
+)
+
// pcHeader holds data used by the pclntab lookups.
type pcHeader struct {
magic uint32 // 0xFFFFFFFA