knowninfo

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	TopPkgs entity.PackageMap
	Trie    *trie.PathTrie[*entity.Package]
	// contains filtered or unexported fields
}

Dependencies a pseudo package for the whole binary

func NewDependencies

func NewDependencies(k *KnownInfo) *Dependencies

func (*Dependencies) AddFromPclntab

func (m *Dependencies) AddFromPclntab(gp *gore.Package, typ entity.PackageType, pclntab *gosym.Table)

func (*Dependencies) AddModules

func (m *Dependencies) AddModules(mods []*debug.Module, typ entity.PackageType)

func (*Dependencies) FinishLoad

func (m *Dependencies) FinishLoad()

func (*Dependencies) Functions added in v1.5.4

func (m *Dependencies) Functions(yield func(*entity.Function) bool)

func (*Dependencies) GetPackage

func (m *Dependencies) GetPackage(name string) (*entity.Package, bool)

type EntryFeeder added in v1.5.1

type EntryFeeder func(e *dwarf.Entry)

type KnownInfo

type KnownInfo struct {
	Size      uint64
	BuildInfo *gore.BuildInfo
	Sects     *entity.Store
	Deps      *Dependencies
	KnownAddr *entity.KnownAddr

	GoStringSymbol *entity.AddrPos

	Coverage entity.AddrCoverage

	Gore        *gore.GoFile
	PClnTabAddr uint64
	Wrapper     wrapper.RawFileWrapper

	VersionFlag VersionFlag

	HasDWARF bool
}

func (*KnownInfo) AddDwarfSubProgram added in v1.3.0

func (k *KnownInfo) AddDwarfSubProgram(
	isGo bool,
	d *dwarf.Data,
	subEntry *dwarf.Entry,
	pkg *entity.Package,
	readFileName func(entry *dwarf.Entry) string,
)

func (*KnownInfo) AddDwarfVariable added in v1.3.0

func (k *KnownInfo) AddDwarfVariable(entry *dwarf.Entry, d *dwarf.Data, pkg *entity.Package, ptrSize int)

func (*KnownInfo) AnalyzeSymbol

func (k *KnownInfo) AnalyzeSymbol(store bool) error

func (*KnownInfo) CalculatePackageSize

func (k *KnownInfo) CalculatePackageSize()

CalculatePackageSize calculate the size of each package Happens after disassembly

func (*KnownInfo) CalculateSectionSize

func (k *KnownInfo) CalculateSectionSize() error

func (*KnownInfo) CollectCoverage

func (k *KnownInfo) CollectCoverage() error

func (*KnownInfo) Disasm

func (k *KnownInfo) Disasm() error

func (*KnownInfo) ExtractPackageFromSymbol

func (k *KnownInfo) ExtractPackageFromSymbol(s string) string

ExtractPackageFromSymbol copied from debug/gosym/symtab.go

func (*KnownInfo) GetDwarfCompileUnitFeeder added in v1.5.1

func (k *KnownInfo) GetDwarfCompileUnitFeeder(d *dwarf.Data, cuEntry *dwarf.Entry, ptrSize int) (EntryFeeder, bool)

func (*KnownInfo) GetPackageFromDwarfCompileUnit added in v1.3.0

func (k *KnownInfo) GetPackageFromDwarfCompileUnit(cuEntry *dwarf.Entry) *entity.Package

func (*KnownInfo) LoadGoreInfo added in v1.5.1

func (k *KnownInfo) LoadGoreInfo(f *gore.GoFile) error

func (*KnownInfo) LoadPackages

func (k *KnownInfo) LoadPackages(f *gore.GoFile) error

func (*KnownInfo) LoadSectionMap

func (k *KnownInfo) LoadSectionMap() error

func (*KnownInfo) MarkSymbol

func (k *KnownInfo) MarkSymbol(name string, addr, size uint64, typ entity.AddrType)

func (*KnownInfo) RequireModInfo

func (k *KnownInfo) RequireModInfo() error

func (*KnownInfo) TryLoadDwarf

func (k *KnownInfo) TryLoadDwarf() bool

type VersionFlag

type VersionFlag struct {
	Leq118 bool
	Meq120 bool
}

func UpdateVersionFlag added in v1.5.2

func UpdateVersionFlag(f *gore.GoFile) VersionFlag

Jump to

Keyboard shortcuts

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