Standard Library

GoDebugGosym

Go stdlib package — debug/gosym. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.DecodingError.Error()Neutral
#
Signature
DecodingError.Error() string

DecodingError.Error function.

.LineTable.LineToPC()Neutral
#
Signature
LineTable.LineToPC(line int, maxpc uint64) uint64

LineToPC returns the program counter for the given line number,

.LineTable.PCToLine()Neutral
#
Signature
LineTable.PCToLine(pc uint64) int

PCToLine returns the line number for the given program counter.

.NewLineTable()Neutral
#
Signature
NewLineTable(data []byte, text uint64) *LineTable

NewLineTable returns a new PC/line table

.NewTable()Neutral
#
Signature
NewTable(symtab []byte, pcln *LineTable) (*Table, error)

NewTable decodes the Go symbol table (the ".gosymtab" section in ELF),

.Sym.BaseName()Neutral
#
Signature
Sym.BaseName() string

BaseName returns the symbol name without the package or receiver name.

.Sym.PackageName()Neutral
#
Signature
Sym.PackageName() string

PackageName returns the package part of the symbol name,

.Sym.ReceiverName()Neutral
#
Signature
Sym.ReceiverName() string

ReceiverName returns the receiver type name of this symbol,

.Sym.Static()Neutral
#
Signature
Sym.Static() bool

Static reports whether this symbol is static (not visible outside its file).

.Table.LineToPC()Neutral
#
Signature
Table.LineToPC(file string, line int) (uint64, *Func, error)

LineToPC looks up the first program counter on the given line in

Fully-Qualified Names

FQNField
debug/gosymfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # debug/gosym