addr2line

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package addr2line converts memory addresses from stack traces back to line information (line number, function and file name).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DwarfLiner added in v0.8.0

type DwarfLiner struct {
	// contains filtered or unexported fields
}

DwarfLiner is a symbolizer that uses DWARF debug info to symbolize addresses.

func DWARF

func DWARF(logger log.Logger, filename string, f *elf.File, demangler *demangle.Demangler) (*DwarfLiner, error)

DWARF creates a new DwarfLiner.

func (*DwarfLiner) Close added in v0.15.0

func (dl *DwarfLiner) Close() error

func (*DwarfLiner) File added in v0.15.0

func (dl *DwarfLiner) File() string

func (*DwarfLiner) PCRange added in v0.15.0

func (dl *DwarfLiner) PCRange() ([2]uint64, error)

func (*DwarfLiner) PCToLines added in v0.8.0

func (dl *DwarfLiner) PCToLines(addr uint64) (lines []profile.LocationLine, err error)

PCToLines returns the resolved source lines for a program counter (memory address).

type GoLiner added in v0.8.0

type GoLiner struct {
	// contains filtered or unexported fields
}

GoLiner is a liner which utilizes .gopclntab section to symbolize addresses. It doesn't work for inlined functions.

func Go

func Go(logger log.Logger, filename string, f *elf.File) (*GoLiner, error)

Go creates a new GoLiner.

func (*GoLiner) Close added in v0.15.0

func (gl *GoLiner) Close() error

func (*GoLiner) File added in v0.15.0

func (gl *GoLiner) File() string

func (*GoLiner) PCRange added in v0.15.0

func (gl *GoLiner) PCRange() ([2]uint64, error)

func (*GoLiner) PCToLines added in v0.8.0

func (gl *GoLiner) PCToLines(addr uint64) (lines []profile.LocationLine, err error)

PCToLines looks up the line number information for a program counter (memory address).

type SymtabLiner added in v0.9.0

type SymtabLiner struct {
	// contains filtered or unexported fields
}

SymtabLiner is a liner which utilizes .symtab and .dynsym sections.

func Symbols added in v0.9.0

func Symbols(logger log.Logger, filename string, f *elf.File, demangler *demangle.Demangler) (*SymtabLiner, error)

Symbols creates a new SymtabLiner.

func (*SymtabLiner) Close added in v0.15.0

func (lnr *SymtabLiner) Close() error

func (*SymtabLiner) File added in v0.15.0

func (lnr *SymtabLiner) File() string

func (*SymtabLiner) PCRange added in v0.15.0

func (lnr *SymtabLiner) PCRange() ([2]uint64, error)

func (*SymtabLiner) PCToLines added in v0.9.0

func (lnr *SymtabLiner) PCToLines(addr uint64) (lines []profile.LocationLine, err error)

PCToLines looks up the line number information for a program counter (memory address).

Jump to

Keyboard shortcuts

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