debugger

package
v0.0.0-...-835ebca Latest Latest
Warning

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

Go to latest
Published: May 8, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 provides a thread-safe DebuggedProcess service. Instances of Debugger can be exposed by other services.

func New

func New(config *Config) *Debugger

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. Like other debugger operations, these are executed one at a time as part of the process operation pipeline.

The one exception is the Halt command, which can be executed concurrently with any operation.

func (*Debugger) CreateBreakPoint

func (d *Debugger) CreateBreakPoint(requestedBp *api.BreakPoint) (*api.BreakPoint, error)

func (*Debugger) Detach

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

Detach stops the debugger.

func (*Debugger) EvalSymbolInThread

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

func (*Debugger) FindBreakPoint

func (d *Debugger) FindBreakPoint(id int) *api.BreakPoint

func (*Debugger) FindThread

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

func (*Debugger) Functions

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

func (*Debugger) Goroutines

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

func (*Debugger) PackageVariables

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

func (*Debugger) Run

func (d *Debugger) Run() error

Run starts debugging a process until Detach is called.

func (*Debugger) Sources

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

func (*Debugger) State

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

func (*Debugger) Threads

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

Jump to

Keyboard shortcuts

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