addr2line

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

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, f *elf.File, demangler *demangle.Demangler) (*DwarfLiner, error)

DWARF creates a new DwarfLiner.

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, f *elf.File) (*GoLiner, error)

Go creates a new GoLiner.

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, f *elf.File, demangler *demangle.Demangler) (*SymtabLiner, error)

Symbols creates a new SymtabLiner.

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