line

package
v0.0.0-...-6d4ef26 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DW_LNS_copy             = 1
	DW_LNS_advance_pc       = 2
	DW_LNS_advance_line     = 3
	DW_LNS_set_file         = 4
	DW_LNS_set_column       = 5
	DW_LNS_negate_stmt      = 6
	DW_LNS_set_basic_block  = 7
	DW_LNS_const_add_pc     = 8
	DW_LNS_fixed_advance_pc = 9
)

Special opcodes

View Source
const (
	DW_LINE_end_sequence = 1
	DW_LINE_set_address  = 2
	DW_LINE_define_file  = 3
)

Extended opcodes

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugLineInfo

type DebugLineInfo struct {
	Prologue     *DebugLinePrologue
	IncludeDirs  []string
	FileNames    []*FileEntry
	Instructions []byte
}

func Parse

func Parse(data []byte) *DebugLineInfo

func (*DebugLineInfo) LocationInfoForPC

func (dbl *DebugLineInfo) LocationInfoForPC(pc uint64) *Location

func (*DebugLineInfo) LoopEntryLocation

func (dbl *DebugLineInfo) LoopEntryLocation(line int) *Location

func (*DebugLineInfo) LoopExitLocation

func (dbl *DebugLineInfo) LoopExitLocation(pc uint64) *Location

func (*DebugLineInfo) NextLocAfterPC

func (dbl *DebugLineInfo) NextLocAfterPC(pc uint64) *Location

Returns the filename, line number and PC for the next executable line in the traced program.

type DebugLinePrologue

type DebugLinePrologue struct {
	Length         uint32
	Version        uint16
	PrologueLength uint32
	MinInstrLength uint8
	InitialIsStmt  uint8
	LineBase       int8
	LineRange      uint8
	OpcodeBase     uint8
	StdOpLengths   []uint8
}

type FileEntry

type FileEntry struct {
	Name        string
	DirIdx      uint64
	LastModTime uint64
	Length      uint64
}

type Location

type Location struct {
	File    string
	Line    int
	Address uint64
	Delta   int
}

type StateMachine

type StateMachine struct {
	Dbl             *DebugLineInfo
	File            string
	Line            int
	Address         uint64
	Column          uint
	IsStmt          bool
	BasicBlock      bool
	EndSeq          bool
	LastWasStandard bool
	LastDelta       int
}

Jump to

Keyboard shortcuts

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