backend

package
v0.0.0-...-b4fbdbd Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TraceCbNone int = iota
	TraceCbPc
	TraceCbCmp
)
View Source
const LineEnd = 1 << 30

Variables

This section is empty.

Functions

func CleanPath

func CleanPath(path, objDir, srcDir, buildDir string, splitBuildDelimiters []string) (string, string)

func DiscoverModules

func DiscoverModules(target *targets.Target, objDir string, moduleObj []string) (
	[]*vminfo.KernelModule, error)

func FixModules

func FixModules(localModules, modules []*vminfo.KernelModule, pcBase uint64) []*vminfo.KernelModule

when CONFIG_RANDOMIZE_BASE=y, pc from kcov already removed kaslr_offset.

func GetPCBase

func GetPCBase(cfg *mgrconfig.Config) (uint64, error)

func NextInstructionPC

func NextInstructionPC(target *targets.Target, vm string, pc uint64) uint64

func PreviousInstructionPC

func PreviousInstructionPC(target *targets.Target, vm string, pc uint64) uint64

Types

type Arch

type Arch struct {
	// contains filtered or unexported fields
}

type CompileUnit

type CompileUnit struct {
	ObjectUnit
	Path   string
	Module *vminfo.KernelModule
}

type Frame

type Frame struct {
	Module   *vminfo.KernelModule
	PC       uint64
	Name     string
	FuncName string
	Path     string
	Inline   bool
	Range
}

type Impl

type Impl struct {
	Units           []*CompileUnit
	Symbols         []*Symbol
	Frames          []Frame
	Symbolize       func(pcs map[*vminfo.KernelModule][]uint64) ([]Frame, error)
	CallbackPoints  []uint64
	PreciseCoverage bool
}

func Make

func Make(target *targets.Target, vm, objDir, srcDir, buildDir string, splitBuild bool,
	moduleObj []string, modules []*vminfo.KernelModule) (*Impl, error)

type ObjectUnit

type ObjectUnit struct {
	Name string
	PCs  []uint64 // PCs we can get in coverage callbacks for this unit.
	CMPs []uint64 // PCs we can get in comparison interception callbacks for this unit.
}

ObjectUnit represents either CompileUnit or Symbol.

type Range

type Range struct {
	StartLine int
	StartCol  int
	EndLine   int
	EndCol    int
}

type Result

type Result struct {
	CoverPoints [2][]uint64
	Symbols     []*Symbol
}

type SecRange

type SecRange struct {
	Start uint64
	End   uint64
}

type Symbol

type Symbol struct {
	ObjectUnit
	Module     *vminfo.KernelModule
	Unit       *CompileUnit
	Start      uint64
	End        uint64
	Symbolized bool
}

Jump to

Keyboard shortcuts

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