gosym

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRuntimeTextFromPclntab18

func ParseRuntimeTextFromPclntab18(pclntab []byte) uint64

Types

type FilePCLNData

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

func NewFilePCLNData

func NewFilePCLNData(f *os.File, offset int) *FilePCLNData

func (*FilePCLNData) ReadAt

func (f *FilePCLNData) ReadAt(data []byte, offset int) error

type FlatFuncIndex

type FlatFuncIndex struct {
	Entry PCIndex
	Name  []uint32
	End   uint64
}

FlatFuncIndex Entry contains a sorted array of function entry address, which is ued for binary search. Name contains offsets into funcnametab, which is located in the .gopclntab section.

type LineTable

type LineTable struct {
	//Data []byte
	PCLNData PCLNData
	PC       uint64
	Line     int
	// contains filtered or unexported fields
}

A LineTable is a data structure mapping program counters to line numbers.

In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable, and the line number corresponded to a numbering of all source lines in the program, across all files. That absolute line number would then have to be converted separately to a file name and line number within the file.

In Go 1.2, the format of the data changed so that there is a single LineTable for the entire program, shared by all Funcs, and there are no absolute line numbers, just line numbers within specific files.

For the most part, LineTable's methods should be treated as an internal detail of the package; callers should use the methods on Table instead.

func NewLineTable

func NewLineTable(data []byte, text uint64) *LineTable

NewLineTable returns a new PC/line table corresponding to the encoded data. Text must be the start address of the corresponding text segment.

func NewLineTableStreaming

func NewLineTableStreaming(data PCLNData, text uint64) *LineTable

func (*LineTable) FuncNameOffset

func (t *LineTable) FuncNameOffset() uint64

func (*LineTable) Go12Funcs

func (t *LineTable) Go12Funcs() (res FlatFuncIndex)

Go12Funcs returns a slice of Funcs derived from the Go 1.2+ pcln table.

func (*LineTable) IsFailed

func (t *LineTable) IsFailed() bool

func (*LineTable) IsGo12

func (t *LineTable) IsGo12() bool

IsGo12 reports whether this is a Go 1.2 (or later) symbol table.

type MemPCLNData

type MemPCLNData struct {
	Data []byte
}

func (MemPCLNData) ReadAt

func (m MemPCLNData) ReadAt(data []byte, offset int) error

type PCIndex

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

func NewPCIndex

func NewPCIndex(sz int) PCIndex

func (*PCIndex) FindIndex

func (it *PCIndex) FindIndex(addr uint64) int

func (*PCIndex) First

func (it *PCIndex) First() uint64

func (*PCIndex) Get added in v0.2.1

func (it *PCIndex) Get(idx int) uint64

func (*PCIndex) Is32

func (it *PCIndex) Is32() bool

func (*PCIndex) Length

func (it *PCIndex) Length() int

func (*PCIndex) PCIndex64

func (it *PCIndex) PCIndex64() PCIndex

func (*PCIndex) Set

func (it *PCIndex) Set(idx int, value uint64)

func (*PCIndex) Value

func (it *PCIndex) Value(idx int) uint64

type PCLNData

type PCLNData interface {
	ReadAt(data []byte, offset int) error
}

Jump to

Keyboard shortcuts

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