package stackdump
import "github.com/golang/glog/internal/stackdump"
Package stackdump provides wrappers for runtime.Stack and runtime.Callers with uniform support for skipping caller frames.
⚠ Unlike the functions in the runtime package, these may allocate a non-trivial quantity of memory: use them with care. ⚠
Index ¶
Functions ¶
func CallerPC ¶
CallerPC returns a dump of the program counters of the stack starting skipDepth frames before the caller. (CallerPC(0) provides a dump starting at the caller of this function.)
func CallerText ¶
CallerText returns a textual dump of the stack starting skipDepth frames before the caller. (CallerText(0) provides a dump starting at the caller of this function.)
Types ¶
type Stack ¶
type Stack struct { // Text is a representation of the stack dump in a human-readable format. Text []byte // PC is a representation of the stack dump using raw program counter values. PC []uintptr }
Stack is a stack dump for a single goroutine.
func Caller ¶
Caller returns the Stack dump for the calling goroutine, starting skipDepth frames before the caller of Caller. (Caller(0) provides a dump starting at the caller of this function.)
func (Stack) String ¶
Source Files ¶
- Version
- v1.2.4 (latest)
- Published
- Jan 13, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 3 days ago –
Tools for package owners.