type Sym … // Static reports whether this symbol is static (not visible outside its file). func (s *Sym) Static() bool { … } // nameWithoutInst returns s.Name if s.Name has no brackets (does not reference an // instantiated type, function, or method). If s.Name contains brackets, then it // returns s.Name with all the contents between (and including) the outermost left // and right bracket removed. This is useful to ignore any extra slashes or dots // inside the brackets from the string searches below, where needed. func (s *Sym) nameWithoutInst() string { … } // PackageName returns the package part of the symbol name, // or the empty string if there is none. func (s *Sym) PackageName() string { … } // ReceiverName returns the receiver type name of this symbol, // or the empty string if there is none. A receiver name is only detected in // the case that s.Name is fully-specified with a package name. func (s *Sym) ReceiverName() string { … } // BaseName returns the symbol name without the package or receiver name. func (s *Sym) BaseName() string { … } type Func … type Obj … type Table … type sym … var littleEndianSymtab … var bigEndianSymtab … var oldLittleEndianSymtab … func walksymtab(data []byte, fn func(sym) error) error { … } // NewTable decodes the Go symbol table (the ".gosymtab" section in ELF), // returning an in-memory representation. // Starting with Go 1.3, the Go symbol table no longer includes symbol data. func NewTable(symtab []byte, pcln *LineTable) (*Table, error) { … } // PCToFunc returns the function containing the program counter pc, // or nil if there is no such function. func (t *Table) PCToFunc(pc uint64) *Func { … } // PCToLine looks up line number information for a program counter. // If there is no information, it returns fn == nil. func (t *Table) PCToLine(pc uint64) (file string, line int, fn *Func) { … } // LineToPC looks up the first program counter on the given line in // the named file. It returns [UnknownFileError] or [UnknownLineError] if // there is an error looking up this line. func (t *Table) LineToPC(file string, line int) (pc uint64, fn *Func, err error) { … } // LookupSym returns the text, data, or bss symbol with the given name, // or nil if no such symbol is found. func (t *Table) LookupSym(name string) *Sym { … } // LookupFunc returns the text, data, or bss symbol with the given name, // or nil if no such symbol is found. func (t *Table) LookupFunc(name string) *Func { … } // SymByAddr returns the text, data, or bss symbol starting at the given address. func (t *Table) SymByAddr(addr uint64) *Sym { … } func (o *Obj) lineFromAline(aline int) (string, int) { … } func (o *Obj) alineFromLine(path string, line int) (int, error) { … } type UnknownFileError … func (e UnknownFileError) Error() string { … } type UnknownLineError … func (e *UnknownLineError) Error() string { … } type DecodingError … func (e *DecodingError) Error() string { … }