...

Package binutils

import "cmd/vendor/github.com/google/pprof/internal/binutils"
Overview
Index

Overview ▾

Package binutils provides access to the GNU binutils.

type Binutils

A Binutils implements plugin.ObjTool by invoking the GNU binutils.

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

func (*Binutils) Disasm

func (bu *Binutils) Disasm(file string, start, end uint64, intelSyntax bool) ([]plugin.Inst, error)

Disasm returns the assembly instructions for the specified address range of a binary.

func (*Binutils) Open

func (bu *Binutils) Open(name string, start, limit, offset uint64, relocationSymbol string) (plugin.ObjFile, error)

Open satisfies the plugin.ObjTool interface.

func (*Binutils) SetFastSymbolization

func (bu *Binutils) SetFastSymbolization(fast bool)

SetFastSymbolization sets a toggle that makes binutils use fast symbolization (using nm), which is much faster than addr2line but provides only symbol name information (no file/line).

func (*Binutils) SetTools

func (bu *Binutils) SetTools(config string)

SetTools processes the contents of the tools option. It expects a set of entries separated by commas; each entry is a pair of the form t:path, where cmd will be used to look only for the tool named t. If t is not specified, the path is searched for all tools.

func (*Binutils) String

func (bu *Binutils) String() string

String returns string representation of the binutils state for debug logging.