callstack

package
v0.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package callstack maintains the callstack of an executing program as accurately as possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallStack

type CallStack struct {
	// call stack of running program
	Stack []*dwarf.SourceLine

	// list of callers for all executed functions
	Callers map[string]([]*dwarf.SourceLine)
}

callStack maintains information about function calls and the order in which they happen.

func NewCallStack

func NewCallStack() CallStack

NewCallStack is the preferred method of initialisation for the CallStack type

func (CallStack) WriteCallStack

func (cs CallStack) WriteCallStack(w io.Writer)

WriteCallstack writes out the current callstack

func (CallStack) WriteCallers

func (cs CallStack) WriteCallers(function string, w io.Writer) error

WriteCallers writes a list of functions that have called the specified function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL