Documentation ¶
Index ¶
- func ParseRuntimeTextFromPclntab18(pclntab []byte) uint64
- type FilePCLNData
- type FlatFuncIndex
- type LineTable
- type MemPCLNData
- type PCIndex
- func (it *PCIndex) FindIndex(addr uint64) int
- func (it *PCIndex) First() uint64
- func (it *PCIndex) Get(idx int) uint64
- func (it *PCIndex) Is32() bool
- func (it *PCIndex) Length() int
- func (it *PCIndex) PCIndex64() PCIndex
- func (it *PCIndex) Set(idx int, value uint64)
- func (it *PCIndex) Value(idx int) uint64
- type PCLNData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FilePCLNData ¶
type FilePCLNData struct {
// contains filtered or unexported fields
}
func NewFilePCLNData ¶
func NewFilePCLNData(f *os.File, offset int) *FilePCLNData
type FlatFuncIndex ¶
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 ¶
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 (*LineTable) FuncNameOffset ¶
func (*LineTable) Go12Funcs ¶
func (t *LineTable) Go12Funcs() (res FlatFuncIndex)
Go12Funcs returns a slice of Funcs derived from the Go 1.2+ pcln table.
type MemPCLNData ¶
type MemPCLNData struct {
Data []byte
}