debugger

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrLocationSpec

type AddrLocationSpec struct {
	Addr uint64
}

func (*AddrLocationSpec) Find

func (loc *AddrLocationSpec) Find(d *Debugger, locStr string) ([]api.Location, error)

type AmbiguousLocationError

type AmbiguousLocationError struct {
	Location           string
	CandidatesString   []string
	CandidatesLocation []api.Location
}

func (AmbiguousLocationError) Error

func (ale AmbiguousLocationError) Error() string

type Config

type Config struct {
	// ProcessArgs are the arguments to launch a new process.
	ProcessArgs []string
	// AttachPid is the PID of an existing process to which the debugger should
	// attach.
	AttachPid int
}

Config provides the configuration to start a Debugger.

Only one of ProcessArgs or AttachPid should be specified. If ProcessArgs is provided, a new process will be launched. Otherwise, the debugger will try to attach to an existing process with AttachPid.

type Debugger

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

Debugger service.

Debugger provides a higher level of abstraction over proc.Process. It handles converting from internal types to the types expected by clients. It also handles functionality needed by clients, but not needed in lower lever packages such as proc.

func New

func New(config *Config) (*Debugger, error)

New creates a new Debugger.

func (*Debugger) Breakpoints

func (d *Debugger) Breakpoints() []*api.Breakpoint

func (*Debugger) ClearBreakpoint

func (d *Debugger) ClearBreakpoint(requestedBp *api.Breakpoint) (*api.Breakpoint, error)

func (*Debugger) Command

func (d *Debugger) Command(command *api.DebuggerCommand) (*api.DebuggerState, error)

Command handles commands which control the debugger lifecycle

func (*Debugger) CreateBreakpoint

func (d *Debugger) CreateBreakpoint(requestedBp *api.Breakpoint) (*api.Breakpoint, error)

func (*Debugger) Detach

func (d *Debugger) Detach(kill bool) error

func (*Debugger) EvalVariableInThread

func (d *Debugger) EvalVariableInThread(threadID int, symbol string) (*api.Variable, error)

func (*Debugger) FindBreakpoint

func (d *Debugger) FindBreakpoint(id int) *api.Breakpoint

func (*Debugger) FindLocation

func (d *Debugger) FindLocation(locStr string) ([]api.Location, error)

func (*Debugger) FindThread

func (d *Debugger) FindThread(id int) *api.Thread

func (*Debugger) FunctionArguments

func (d *Debugger) FunctionArguments(threadID int) ([]api.Variable, error)

func (*Debugger) Functions

func (d *Debugger) Functions(filter string) ([]string, error)

func (*Debugger) Goroutines

func (d *Debugger) Goroutines() ([]*api.Goroutine, error)

func (*Debugger) LocalVariables

func (d *Debugger) LocalVariables(threadID int) ([]api.Variable, error)

func (*Debugger) PackageVariables

func (d *Debugger) PackageVariables(threadID int, filter string) ([]api.Variable, error)

func (*Debugger) ProcessPid

func (d *Debugger) ProcessPid() int

func (*Debugger) Registers

func (d *Debugger) Registers(threadID int) (string, error)

func (*Debugger) Restart

func (d *Debugger) Restart() error

func (*Debugger) Sources

func (d *Debugger) Sources(filter string) ([]string, error)

func (*Debugger) Stacktrace

func (d *Debugger) Stacktrace(goroutineId, depth int) ([]api.Location, error)

func (*Debugger) State

func (d *Debugger) State() (*api.DebuggerState, error)

func (*Debugger) Threads

func (d *Debugger) Threads() []*api.Thread

type FuncLocationSpec

type FuncLocationSpec struct {
	PackageName           string
	ReceiverName          string
	PackageOrReceiverName string
	BaseName              string
}

func (*FuncLocationSpec) Match

func (spec *FuncLocationSpec) Match(sym *gosym.Sym) bool

type LineLocationSpec

type LineLocationSpec struct {
	Line int
}

func (*LineLocationSpec) Find

func (loc *LineLocationSpec) Find(d *Debugger, locStr string) ([]api.Location, error)

type LocationSpec

type LocationSpec interface {
	Find(d *Debugger, locStr string) ([]api.Location, error)
}

type NormalLocationSpec

type NormalLocationSpec struct {
	Base       string
	FuncBase   *FuncLocationSpec
	LineOffset int
}

func (*NormalLocationSpec) FileMatch

func (loc *NormalLocationSpec) FileMatch(path string) bool

func (*NormalLocationSpec) Find

func (loc *NormalLocationSpec) Find(d *Debugger, locStr string) ([]api.Location, error)

type OffsetLocationSpec

type OffsetLocationSpec struct {
	Offset int
}

func (*OffsetLocationSpec) Find

func (loc *OffsetLocationSpec) Find(d *Debugger, locStr string) ([]api.Location, error)

type RegexLocationSpec

type RegexLocationSpec struct {
	FuncRegex string
}

func (*RegexLocationSpec) Find

func (loc *RegexLocationSpec) Find(d *Debugger, locStr string) ([]api.Location, error)

Jump to

Keyboard shortcuts

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