Help us shape the future of Go! Take the 2026 Go Developer Survey

debuginfo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Exists(ctx context.Context, buildID, hash string) (bool, error)
	Upload(ctx context.Context, buildID, hash string, f io.Reader) (uint64, error)
}

func NewNoopClient

func NewNoopClient() Client

type DebugInfo added in v0.6.0

type DebugInfo struct {
	*Extractor
	*Uploader
	*Finder
	// contains filtered or unexported fields
}

func New added in v0.6.0

func New(logger log.Logger, client Client, tmp string) *DebugInfo

New creates a new DebugInfo.

func (*DebugInfo) EnsureUploaded added in v0.6.0

func (di *DebugInfo) EnsureUploaded(ctx context.Context, objFiles []*objectfile.MappedObjectFile)

EnsureUploaded ensures that the extracted or the found debuginfo for the given buildID is uploaded.

type Extractor

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

Extractor extracts debug information from a binary.

func NewExtractor

func NewExtractor(logger log.Logger, client Client, tmpDir string) *Extractor

NewExtractor creates a new Extractor.

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, buildID, filePath string) (string, error)

Extract extracts debug information from the given executable. Cleaning up the temporary directory and the interim file is the caller's responsibility.

func (*Extractor) ExtractAll added in v0.6.0

func (e *Extractor) ExtractAll(ctx context.Context, objFilePaths map[string]string) (map[string]string, error)

ExtractAll extracts debug information from the given executables. It consumes a map of build id to executable path and returns a map of build id to extracted debug information path.

type Finder added in v0.6.0

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

Finder finds the additional debug information on the system.

func NewFinder added in v0.6.0

func NewFinder(logger log.Logger) *Finder

NewFinder creates a new Finder.

func (*Finder) Find added in v0.6.0

func (f *Finder) Find(ctx context.Context, buildID, root string) (string, error)

Find finds the debug information for the given build ID.

type NoopClient

type NoopClient struct{}

func (*NoopClient) Exists

func (c *NoopClient) Exists(ctx context.Context, buildID, hash string) (bool, error)

func (*NoopClient) Upload

func (c *NoopClient) Upload(ctx context.Context, buildID, hash string, f io.Reader) (uint64, error)

type Uploader added in v0.6.0

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

Uploader uploads debug information to the Parca server.

func NewUploader added in v0.6.0

func NewUploader(logger log.Logger, client Client) *Uploader

NewUploader creates a new Uploader.

func (*Uploader) Upload added in v0.6.0

func (u *Uploader) Upload(ctx context.Context, buildID, filePath string) error

Upload uploads the debug information to the Parca server.

func (*Uploader) UploadAll added in v0.6.0

func (u *Uploader) UploadAll(ctx context.Context, dbgInfoFilePaths map[string]string) error

UploadAll uploads all debug information to the Parca server.

Jump to

Keyboard shortcuts

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