loclist

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dwarf2Reader added in v1.5.1

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

Dwarf2Reader parses and presents DWARF loclist information for DWARF versions 2 through 4.

func NewDwarf2Reader added in v1.5.1

func NewDwarf2Reader(data []byte, ptrSz int) *Dwarf2Reader

NewDwarf2Reader returns an initialized loclist Reader for DWARF versions 2 through 4.

func (*Dwarf2Reader) Empty added in v1.5.1

func (rdr *Dwarf2Reader) Empty() bool

Empty returns true if this reader has no data.

func (*Dwarf2Reader) Find added in v1.5.1

func (rdr *Dwarf2Reader) Find(off int, staticBase, base, pc uint64, debugAddr *godwarf.DebugAddr) (*Entry, error)

Find returns the loclist entry for the specified PC address, inside the loclist stating at off. Base is the base address of the compile unit and staticBase is the static base at which the image is loaded.

func (*Dwarf2Reader) Next added in v1.5.1

func (rdr *Dwarf2Reader) Next(e *Entry) bool

Next advances the reader to the next loclist entry, returning the entry and true if successful, or nil, false if not.

func (*Dwarf2Reader) Seek added in v1.5.1

func (rdr *Dwarf2Reader) Seek(off int)

Seek moves the data pointer to the specified offset.

type Dwarf5Reader added in v1.5.1

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

Dwarf5Reader parses and presents DWARF loclist information for DWARF version 5 and later. See DWARFv5 section 7.29 page 243 and following.

func NewDwarf5Reader added in v1.5.1

func NewDwarf5Reader(data []byte) *Dwarf5Reader

func (*Dwarf5Reader) Empty added in v1.5.1

func (rdr *Dwarf5Reader) Empty() bool

func (*Dwarf5Reader) Find added in v1.5.1

func (rdr *Dwarf5Reader) Find(off int, staticBase, base, pc uint64, debugAddr *godwarf.DebugAddr) (*Entry, error)

Find returns the loclist entry for the specified PC address, inside the loclist stating at off. Base is the base address of the compile unit and staticBase is the static base at which the image is loaded.

type Entry

type Entry struct {
	LowPC, HighPC uint64
	Instr         []byte
}

Entry represents a single entry in the loclist section.

func (*Entry) BaseAddressSelection

func (e *Entry) BaseAddressSelection() bool

BaseAddressSelection returns true if entry.highpc should be used as the base address for subsequent entries.

type Reader

type Reader interface {
	Find(off int, staticBase, base, pc uint64, debugAddr *godwarf.DebugAddr) (*Entry, error)
	Empty() bool
}

Reader represents a loclist reader.

Jump to

Keyboard shortcuts

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