Documentation ¶
Overview ¶
Package pdebug provides a portable, parsed stack trace.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStack ¶
NewStack populates a Stack object with the current thread and its stack using debug.Stack
func ParseFirstLine ¶
getID obtains gorutine ID, as of go1.18 a numeric string "1"…
Types ¶
type Stack ¶
- Go stack traces are created by runtime.NewStack and is a byte slice
func (*Stack) Creator ¶
func (s *Stack) Creator() (creator *pruntime.CodeLocation, creatorID parl.ThreadID, goRoutineRef string)
the code location of the go statement creating this thread
- if IsMain is true, zero-value. Check with Creator().IsSet()
- never nil
func (*Stack) ID ¶
thread ID 1… for the thread requesting the stack trace
- ThreadID is comparable and has IsValid and String methods
- ThreadID is typically an incremented 64-bit integer with main thread having ID 1
func (*Stack) Status ¶
func (s *Stack) Status() (status parl.ThreadStatus)
a word indicating thread status, typically word “running”
Click to show internal directories.
Click to hide internal directories.