Documentation
¶
Index ¶
- Variables
- type BuildID
- type ElfSymbolReader
- type FlatSymbolIndex
- type GoTable
- type GoTableWithFallback
- type InMemElfFile
- type MMapedElfFile
- func (f *MMapedElfFile) BuildID() (BuildID, error)
- func (f *MMapedElfFile) Close()
- func (f *MMapedElfFile) FilePath() string
- func (f *MMapedElfFile) Finalize()
- func (f *MMapedElfFile) GNUBuildID() (BuildID, error)
- func (f *MMapedElfFile) GoBuildID() (BuildID, error)
- func (f *MMapedElfFile) NewGoTable() (*GoTable, error)
- func (f *MMapedElfFile) NewMiniDebugInfoSymbolTable(opt *SymbolsOptions) (*SymbolTable, error)
- func (f *MMapedElfFile) NewSymbolTable(opt *SymbolsOptions) (*SymbolTable, error)
- func (f *MMapedElfFile) SectionData(s *elf.SectionHeader) ([]byte, error)
- type Name
- type SectionLinkIndex
- type SymTabDebugInfo
- type SymbolIndex
- type SymbolTable
- func (st *SymbolTable) Cleanup()
- func (st *SymbolTable) DebugInfo() SymTabDebugInfo
- func (st *SymbolTable) DebugString() string
- func (st *SymbolTable) HasSection(typ elf.SectionType) bool
- func (st *SymbolTable) IsDead() bool
- func (st *SymbolTable) Refresh()
- func (st *SymbolTable) Resolve(addr uint64) string
- func (st *SymbolTable) Size() int
- type SymbolTableInterface
- type SymbolTableWithMiniDebugInfo
- func (stm *SymbolTableWithMiniDebugInfo) Cleanup()
- func (stm *SymbolTableWithMiniDebugInfo) DebugInfo() SymTabDebugInfo
- func (stm *SymbolTableWithMiniDebugInfo) DebugString() string
- func (stm *SymbolTableWithMiniDebugInfo) IsDead() bool
- func (stm *SymbolTableWithMiniDebugInfo) Refresh()
- func (stm *SymbolTableWithMiniDebugInfo) Resolve(addr uint64) string
- func (stm *SymbolTableWithMiniDebugInfo) Size() int
- type SymbolsOptions
- type TestSym
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoBuildIDSection = fmt.Errorf("build ID section not found")
)
View Source
var ErrNoSymbols = errors.New("no symbol section")
ErrNoSymbols is returned by File.Symbols and File.DynamicSymbols if there is no such section in the File.
Functions ¶
This section is empty.
Types ¶
type BuildID ¶
func GNUBuildID ¶
type ElfSymbolReader ¶ added in v0.4.9
type ElfSymbolReader interface {
// contains filtered or unexported methods
}
type FlatSymbolIndex ¶
type FlatSymbolIndex struct {
Links []elf.SectionHeader
Names []Name
Values gosym.PCIndex
}
type GoTable ¶
type GoTable struct {
Index gosym2.FlatFuncIndex
File *MMapedElfFile
// contains filtered or unexported fields
}
func (*GoTable) DebugInfo ¶
func (g *GoTable) DebugInfo() SymTabDebugInfo
type GoTableWithFallback ¶
type GoTableWithFallback struct {
GoTable *GoTable
SymTable SymbolTableInterface
}
func (*GoTableWithFallback) Cleanup ¶
func (g *GoTableWithFallback) Cleanup()
func (*GoTableWithFallback) DebugInfo ¶
func (g *GoTableWithFallback) DebugInfo() SymTabDebugInfo
func (*GoTableWithFallback) IsDead ¶
func (g *GoTableWithFallback) IsDead() bool
func (*GoTableWithFallback) Refresh ¶
func (g *GoTableWithFallback) Refresh()
func (*GoTableWithFallback) Resolve ¶
func (g *GoTableWithFallback) Resolve(addr uint64) string
func (*GoTableWithFallback) Size ¶
func (g *GoTableWithFallback) Size() int
type InMemElfFile ¶ added in v0.4.9
type InMemElfFile struct {
elf.FileHeader
Sections []elf.SectionHeader
Progs []elf.ProgHeader
// contains filtered or unexported fields
}
func NewInMemElfFile ¶ added in v0.4.9
func NewInMemElfFile(r io.ReaderAt) (*InMemElfFile, error)
func (*InMemElfFile) Clear ¶ added in v0.4.9
func (f *InMemElfFile) Clear()
func (*InMemElfFile) NewSymbolTable ¶ added in v0.4.9
func (f *InMemElfFile) NewSymbolTable(opt *SymbolsOptions, symReader ElfSymbolReader, file *MMapedElfFile) (*SymbolTable, error)
func (*InMemElfFile) Section ¶ added in v0.4.9
func (f *InMemElfFile) Section(name string) *elf.SectionHeader
func (*InMemElfFile) SectionData ¶ added in v0.4.9
func (f *InMemElfFile) SectionData(s *elf.SectionHeader) ([]byte, error)
type MMapedElfFile ¶
type MMapedElfFile struct {
InMemElfFile
// contains filtered or unexported fields
}
func NewMMapedElfFile ¶
func NewMMapedElfFile(fpath string) (*MMapedElfFile, error)
func (*MMapedElfFile) BuildID ¶
func (f *MMapedElfFile) BuildID() (BuildID, error)
func (*MMapedElfFile) Close ¶
func (f *MMapedElfFile) Close()
func (*MMapedElfFile) FilePath ¶
func (f *MMapedElfFile) FilePath() string
func (*MMapedElfFile) Finalize ¶
func (f *MMapedElfFile) Finalize()
func (*MMapedElfFile) GNUBuildID ¶
func (f *MMapedElfFile) GNUBuildID() (BuildID, error)
func (*MMapedElfFile) GoBuildID ¶
func (f *MMapedElfFile) GoBuildID() (BuildID, error)
func (*MMapedElfFile) NewGoTable ¶
func (f *MMapedElfFile) NewGoTable() (*GoTable, error)
func (*MMapedElfFile) NewMiniDebugInfoSymbolTable ¶ added in v0.4.9
func (f *MMapedElfFile) NewMiniDebugInfoSymbolTable(opt *SymbolsOptions) (*SymbolTable, error)
func (*MMapedElfFile) NewSymbolTable ¶
func (f *MMapedElfFile) NewSymbolTable(opt *SymbolsOptions) (*SymbolTable, error)
func (*MMapedElfFile) SectionData ¶
func (f *MMapedElfFile) SectionData(s *elf.SectionHeader) ([]byte, error)
type Name ¶
type Name uint32
func NewName ¶
func NewName(NameIndex uint32, linkIndex SectionLinkIndex) Name
func (*Name) LinkIndex ¶
func (n *Name) LinkIndex() SectionLinkIndex
type SectionLinkIndex ¶
type SectionLinkIndex uint8
type SymTabDebugInfo ¶
type SymTabDebugInfo struct {
Name string `alloy:"name,attr,optional" river:"name,attr,optional"`
Size int `alloy:"symbol_count,attr,optional" river:"symbol_count,attr,optional"`
File string `alloy:"file,attr,optional" river:"file,attr,optional"`
MiniDebugInfo bool `alloy:"mini_debug_info,attr,optional" river:"mini_debug_info,attr,optional"`
LastUsedRound int `alloy:"last_used_round,attr,optional" river:"last_used_round,attr,optional"`
}
type SymbolIndex ¶
type SymbolTable ¶
type SymbolTable struct {
Index FlatSymbolIndex
File *MMapedElfFile
SymReader ElfSymbolReader
// contains filtered or unexported fields
}
func (*SymbolTable) Cleanup ¶
func (st *SymbolTable) Cleanup()
func (*SymbolTable) DebugInfo ¶
func (st *SymbolTable) DebugInfo() SymTabDebugInfo
func (*SymbolTable) DebugString ¶
func (st *SymbolTable) DebugString() string
func (*SymbolTable) HasSection ¶ added in v0.4.9
func (st *SymbolTable) HasSection(typ elf.SectionType) bool
func (*SymbolTable) IsDead ¶
func (st *SymbolTable) IsDead() bool
func (*SymbolTable) Refresh ¶
func (st *SymbolTable) Refresh()
func (*SymbolTable) Resolve ¶
func (st *SymbolTable) Resolve(addr uint64) string
func (*SymbolTable) Size ¶
func (st *SymbolTable) Size() int
type SymbolTableInterface ¶ added in v0.4.9
type SymbolTableInterface interface {
Refresh()
Cleanup()
DebugInfo() SymTabDebugInfo
IsDead() bool
Resolve(addr uint64) string
Size() int
}
type SymbolTableWithMiniDebugInfo ¶ added in v0.4.9
type SymbolTableWithMiniDebugInfo struct {
Primary *SymbolTable
MiniDebug *SymbolTable
}
func (*SymbolTableWithMiniDebugInfo) Cleanup ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) Cleanup()
func (*SymbolTableWithMiniDebugInfo) DebugInfo ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) DebugInfo() SymTabDebugInfo
func (*SymbolTableWithMiniDebugInfo) DebugString ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) DebugString() string
func (*SymbolTableWithMiniDebugInfo) IsDead ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) IsDead() bool
func (*SymbolTableWithMiniDebugInfo) Refresh ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) Refresh()
func (*SymbolTableWithMiniDebugInfo) Resolve ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) Resolve(addr uint64) string
func (*SymbolTableWithMiniDebugInfo) Size ¶ added in v0.4.9
func (stm *SymbolTableWithMiniDebugInfo) Size() int
type SymbolsOptions ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.