Documentation ¶
Index ¶
- type AmendBreakpointIn
- type AmendBreakpointOut
- type AttachedToExistingProcessIn
- type AttachedToExistingProcessOut
- type CancelNextIn
- type CancelNextOut
- type ClearBreakpointIn
- type ClearBreakpointOut
- type CommandOut
- type CreateBreakpointIn
- type CreateBreakpointOut
- type DetachIn
- type DetachOut
- type DisassembleIn
- type DisassembleOut
- type EvalIn
- type EvalOut
- type FindLocationIn
- type FindLocationOut
- type GetBreakpointIn
- type GetBreakpointOut
- type GetThreadIn
- type GetThreadOut
- type LastModifiedIn
- type LastModifiedOut
- type ListBreakpointsIn
- type ListBreakpointsOut
- type ListFunctionArgsIn
- type ListFunctionArgsOut
- type ListFunctionsIn
- type ListFunctionsOut
- type ListGoroutinesIn
- type ListGoroutinesOut
- type ListLocalVarsIn
- type ListLocalVarsOut
- type ListPackageVarsIn
- type ListPackageVarsOut
- type ListRegistersIn
- type ListRegistersOut
- type ListSourcesIn
- type ListSourcesOut
- type ListThreadsIn
- type ListThreadsOut
- type ListTypesIn
- type ListTypesOut
- type ProcessPidIn
- type ProcessPidOut
- type RPCClient
- func (c *RPCClient) AmendBreakpoint(bp *api.Breakpoint) error
- func (c *RPCClient) AttachedToExistingProcess() bool
- func (c *RPCClient) CancelNext() error
- func (c *RPCClient) ClearBreakpoint(id int) (*api.Breakpoint, error)
- func (c *RPCClient) ClearBreakpointByName(name string) (*api.Breakpoint, error)
- func (c *RPCClient) Continue() <-chan *api.DebuggerState
- func (c *RPCClient) CreateBreakpoint(breakPoint *api.Breakpoint) (*api.Breakpoint, error)
- func (c *RPCClient) Detach(kill bool) error
- func (c *RPCClient) DisassemblePC(scope api.EvalScope, pc uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
- func (c *RPCClient) DisassembleRange(scope api.EvalScope, startPC, endPC uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
- func (c *RPCClient) EvalVariable(scope api.EvalScope, expr string, cfg api.LoadConfig) (*api.Variable, error)
- func (c *RPCClient) FindLocation(scope api.EvalScope, loc string) ([]api.Location, error)
- func (c *RPCClient) GetBreakpoint(id int) (*api.Breakpoint, error)
- func (c *RPCClient) GetBreakpointByName(name string) (*api.Breakpoint, error)
- func (c *RPCClient) GetState() (*api.DebuggerState, error)
- func (c *RPCClient) GetThread(id int) (*api.Thread, error)
- func (c *RPCClient) Halt() (*api.DebuggerState, error)
- func (c *RPCClient) LastModified() time.Time
- func (c *RPCClient) ListBreakpoints() ([]*api.Breakpoint, error)
- func (c *RPCClient) ListFunctionArgs(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)
- func (c *RPCClient) ListFunctions(filter string) ([]string, error)
- func (c *RPCClient) ListGoroutines() ([]*api.Goroutine, error)
- func (c *RPCClient) ListLocalVariables(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)
- func (c *RPCClient) ListPackageVariables(filter string, cfg api.LoadConfig) ([]api.Variable, error)
- func (c *RPCClient) ListRegisters(threadID int, includeFp bool) (api.Registers, error)
- func (c *RPCClient) ListSources(filter string) ([]string, error)
- func (c *RPCClient) ListThreads() ([]*api.Thread, error)
- func (c *RPCClient) ListTypes(filter string) ([]string, error)
- func (c *RPCClient) Next() (*api.DebuggerState, error)
- func (c *RPCClient) ProcessPid() int
- func (c *RPCClient) Restart() ([]api.DiscardedBreakpoint, error)
- func (c *RPCClient) SetVariable(scope api.EvalScope, symbol, value string) error
- func (c *RPCClient) Stacktrace(goroutineId, depth int, cfg *api.LoadConfig) ([]api.Stackframe, error)
- func (c *RPCClient) Step() (*api.DebuggerState, error)
- func (c *RPCClient) StepInstruction() (*api.DebuggerState, error)
- func (c *RPCClient) StepOut() (*api.DebuggerState, error)
- func (c *RPCClient) SwitchGoroutine(goroutineID int) (*api.DebuggerState, error)
- func (c *RPCClient) SwitchThread(threadID int) (*api.DebuggerState, error)
- type RPCServer
- func (s *RPCServer) AmendBreakpoint(arg AmendBreakpointIn, out *AmendBreakpointOut) error
- func (c *RPCServer) AttachedToExistingProcess(arg AttachedToExistingProcessIn, out *AttachedToExistingProcessOut) error
- func (s *RPCServer) CancelNext(arg CancelNextIn, out *CancelNextOut) error
- func (s *RPCServer) ClearBreakpoint(arg ClearBreakpointIn, out *ClearBreakpointOut) error
- func (s *RPCServer) Command(command api.DebuggerCommand, cb service.RPCCallback)
- func (s *RPCServer) CreateBreakpoint(arg CreateBreakpointIn, out *CreateBreakpointOut) error
- func (s *RPCServer) Detach(arg DetachIn, out *DetachOut) error
- func (c *RPCServer) Disassemble(arg DisassembleIn, out *DisassembleOut) error
- func (s *RPCServer) Eval(arg EvalIn, out *EvalOut) error
- func (c *RPCServer) FindLocation(arg FindLocationIn, out *FindLocationOut) error
- func (s *RPCServer) GetBreakpoint(arg GetBreakpointIn, out *GetBreakpointOut) error
- func (s *RPCServer) GetThread(arg GetThreadIn, out *GetThreadOut) error
- func (s *RPCServer) LastModified(arg LastModifiedIn, out *LastModifiedOut) error
- func (s *RPCServer) ListBreakpoints(arg ListBreakpointsIn, out *ListBreakpointsOut) error
- func (s *RPCServer) ListFunctionArgs(arg ListFunctionArgsIn, out *ListFunctionArgsOut) error
- func (s *RPCServer) ListFunctions(arg ListFunctionsIn, out *ListFunctionsOut) error
- func (s *RPCServer) ListGoroutines(arg ListGoroutinesIn, out *ListGoroutinesOut) error
- func (s *RPCServer) ListLocalVars(arg ListLocalVarsIn, out *ListLocalVarsOut) error
- func (s *RPCServer) ListPackageVars(arg ListPackageVarsIn, out *ListPackageVarsOut) error
- func (s *RPCServer) ListRegisters(arg ListRegistersIn, out *ListRegistersOut) error
- func (s *RPCServer) ListSources(arg ListSourcesIn, out *ListSourcesOut) error
- func (s *RPCServer) ListThreads(arg ListThreadsIn, out *ListThreadsOut) (err error)
- func (s *RPCServer) ListTypes(arg ListTypesIn, out *ListTypesOut) error
- func (s *RPCServer) ProcessPid(arg ProcessPidIn, out *ProcessPidOut) error
- func (s *RPCServer) Restart(arg RestartIn, out *RestartOut) error
- func (s *RPCServer) Set(arg SetIn, out *SetOut) error
- func (s *RPCServer) Stacktrace(arg StacktraceIn, out *StacktraceOut) error
- func (s *RPCServer) State(arg StateIn, out *StateOut) error
- type RestartIn
- type RestartOut
- type SetIn
- type SetOut
- type StacktraceIn
- type StacktraceOut
- type StateIn
- type StateOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmendBreakpointIn ¶
type AmendBreakpointIn struct {
Breakpoint api.Breakpoint
}
type AmendBreakpointOut ¶
type AmendBreakpointOut struct { }
type AttachedToExistingProcessIn ¶
type AttachedToExistingProcessIn struct { }
type AttachedToExistingProcessOut ¶
type AttachedToExistingProcessOut struct {
Answer bool
}
type CancelNextIn ¶
type CancelNextIn struct { }
type CancelNextOut ¶
type CancelNextOut struct { }
type ClearBreakpointIn ¶
type ClearBreakpointOut ¶
type ClearBreakpointOut struct {
Breakpoint *api.Breakpoint
}
type CommandOut ¶
type CommandOut struct {
State api.DebuggerState
}
type CreateBreakpointIn ¶
type CreateBreakpointIn struct {
Breakpoint api.Breakpoint
}
type CreateBreakpointOut ¶
type CreateBreakpointOut struct {
Breakpoint api.Breakpoint
}
type DisassembleIn ¶
type DisassembleIn struct { Scope api.EvalScope StartPC, EndPC uint64 Flavour api.AssemblyFlavour }
type DisassembleOut ¶
type DisassembleOut struct {
Disassemble api.AsmInstructions
}
type FindLocationIn ¶
type FindLocationOut ¶
type GetBreakpointIn ¶
type GetBreakpointOut ¶
type GetBreakpointOut struct {
Breakpoint api.Breakpoint
}
type GetThreadIn ¶
type GetThreadIn struct {
Id int
}
type GetThreadOut ¶
type LastModifiedIn ¶
type LastModifiedIn struct { }
type LastModifiedOut ¶
type ListBreakpointsIn ¶
type ListBreakpointsIn struct { }
type ListBreakpointsOut ¶
type ListBreakpointsOut struct {
Breakpoints []*api.Breakpoint
}
type ListFunctionArgsIn ¶
type ListFunctionArgsIn struct { Scope api.EvalScope Cfg api.LoadConfig }
type ListFunctionArgsOut ¶
type ListFunctionsIn ¶
type ListFunctionsIn struct {
Filter string
}
type ListFunctionsOut ¶
type ListFunctionsOut struct {
Funcs []string
}
type ListGoroutinesIn ¶
type ListGoroutinesIn struct { }
type ListGoroutinesOut ¶
type ListLocalVarsIn ¶
type ListLocalVarsIn struct { Scope api.EvalScope Cfg api.LoadConfig }
type ListLocalVarsOut ¶
type ListPackageVarsIn ¶
type ListPackageVarsIn struct { Filter string Cfg api.LoadConfig }
type ListPackageVarsOut ¶
type ListRegistersIn ¶
type ListRegistersOut ¶
type ListSourcesIn ¶
type ListSourcesIn struct {
Filter string
}
type ListSourcesOut ¶
type ListSourcesOut struct {
Sources []string
}
type ListThreadsIn ¶
type ListThreadsIn struct { }
type ListThreadsOut ¶
type ListTypesIn ¶
type ListTypesIn struct {
Filter string
}
type ListTypesOut ¶
type ListTypesOut struct {
Types []string
}
type ProcessPidIn ¶
type ProcessPidIn struct { }
type ProcessPidOut ¶
type ProcessPidOut struct {
Pid int
}
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
Client is a RPC service.Client.
func (*RPCClient) AmendBreakpoint ¶
func (c *RPCClient) AmendBreakpoint(bp *api.Breakpoint) error
func (*RPCClient) AttachedToExistingProcess ¶
func (*RPCClient) CancelNext ¶
func (*RPCClient) ClearBreakpoint ¶
func (c *RPCClient) ClearBreakpoint(id int) (*api.Breakpoint, error)
func (*RPCClient) ClearBreakpointByName ¶
func (c *RPCClient) ClearBreakpointByName(name string) (*api.Breakpoint, error)
func (*RPCClient) Continue ¶
func (c *RPCClient) Continue() <-chan *api.DebuggerState
func (*RPCClient) CreateBreakpoint ¶
func (c *RPCClient) CreateBreakpoint(breakPoint *api.Breakpoint) (*api.Breakpoint, error)
func (*RPCClient) DisassemblePC ¶
func (c *RPCClient) DisassemblePC(scope api.EvalScope, pc uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
Disassemble function containing pc
func (*RPCClient) DisassembleRange ¶
func (c *RPCClient) DisassembleRange(scope api.EvalScope, startPC, endPC uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
Disassemble code between startPC and endPC
func (*RPCClient) EvalVariable ¶
func (*RPCClient) FindLocation ¶
func (*RPCClient) GetBreakpoint ¶
func (c *RPCClient) GetBreakpoint(id int) (*api.Breakpoint, error)
func (*RPCClient) GetBreakpointByName ¶
func (c *RPCClient) GetBreakpointByName(name string) (*api.Breakpoint, error)
func (*RPCClient) LastModified ¶
func (*RPCClient) ListBreakpoints ¶
func (c *RPCClient) ListBreakpoints() ([]*api.Breakpoint, error)
func (*RPCClient) ListFunctionArgs ¶
func (*RPCClient) ListFunctions ¶
func (*RPCClient) ListLocalVariables ¶
func (*RPCClient) ListPackageVariables ¶
func (*RPCClient) ListRegisters ¶
func (*RPCClient) ProcessPid ¶
func (*RPCClient) SetVariable ¶
func (*RPCClient) Stacktrace ¶
func (c *RPCClient) Stacktrace(goroutineId, depth int, cfg *api.LoadConfig) ([]api.Stackframe, error)
func (*RPCClient) StepInstruction ¶
func (c *RPCClient) StepInstruction() (*api.DebuggerState, error)
func (*RPCClient) SwitchGoroutine ¶
func (c *RPCClient) SwitchGoroutine(goroutineID int) (*api.DebuggerState, error)
func (*RPCClient) SwitchThread ¶
func (c *RPCClient) SwitchThread(threadID int) (*api.DebuggerState, error)
type RPCServer ¶
type RPCServer struct {
// contains filtered or unexported fields
}
func (*RPCServer) AmendBreakpoint ¶
func (s *RPCServer) AmendBreakpoint(arg AmendBreakpointIn, out *AmendBreakpointOut) error
AmendBreakpoint allows user to update an existing breakpoint for example to change the information retrieved when the breakpoint is hit or to change, add or remove the break condition.
arg.Breakpoint.ID must be a valid breakpoint ID
func (*RPCServer) AttachedToExistingProcess ¶
func (c *RPCServer) AttachedToExistingProcess(arg AttachedToExistingProcessIn, out *AttachedToExistingProcessOut) error
AttachedToExistingProcess returns whether we attached to a running process or not
func (*RPCServer) CancelNext ¶
func (s *RPCServer) CancelNext(arg CancelNextIn, out *CancelNextOut) error
func (*RPCServer) ClearBreakpoint ¶
func (s *RPCServer) ClearBreakpoint(arg ClearBreakpointIn, out *ClearBreakpointOut) error
ClearBreakpoint deletes a breakpoint by Name (if Name is not an empty string) or by ID.
func (*RPCServer) Command ¶
func (s *RPCServer) Command(command api.DebuggerCommand, cb service.RPCCallback)
Command interrupts, continues and steps through the program.
func (*RPCServer) CreateBreakpoint ¶
func (s *RPCServer) CreateBreakpoint(arg CreateBreakpointIn, out *CreateBreakpointOut) error
CreateBreakpoint creates a new breakpoint.
- If arg.Breakpoint.File is not an empty string the breakpoint will be created on the specified file:line location
- If arg.Breakpoint.FunctionName is not an empty string the breakpoint will be created on the specified function:line location. Note that setting a breakpoint on a function's entry point (line == 0) can have surprising consequences, it is advisable to use line = -1 instead which will skip the prologue.
- Otherwise the value specified by arg.Breakpoint.Addr will be used.
func (*RPCServer) Disassemble ¶
func (c *RPCServer) Disassemble(arg DisassembleIn, out *DisassembleOut) error
Disassemble code.
If both StartPC and EndPC are non-zero the specified range will be disassembled, otherwise the function containing StartPC will be disassembled.
Scope is used to mark the instruction the specified gorutine is stopped at.
Disassemble will also try to calculate the destination address of an absolute indirect CALL if it happens to be the instruction the selected goroutine is stopped at.
func (*RPCServer) Eval ¶
EvalVariable returns a variable in the specified context.
See https://github.com/derekparker/delve/wiki/Expressions for a description of acceptable values of arg.Expr.
func (*RPCServer) FindLocation ¶
func (c *RPCServer) FindLocation(arg FindLocationIn, out *FindLocationOut) error
FindLocation returns concrete location information described by a location expression
loc ::= <filename>:<line> | <function>[:<line>] | /<regex>/ | (+|-)<offset> | <line> | *<address> * <filename> can be the full path of a file or just a suffix * <function> ::= <package>.<receiver type>.<name> | <package>.(*<receiver type>).<name> | <receiver type>.<name> | <package>.<name> | (*<receiver type>).<name> | <name> * <function> must be unambiguous * /<regex>/ will return a location for each function matched by regex * +<offset> returns a location for the line that is <offset> lines after the current line * -<offset> returns a location for the line that is <offset> lines before the current line * <line> returns a location for a line in the current file * *<address> returns the location corresponding to the specified address
NOTE: this function does not actually set breakpoints.
func (*RPCServer) GetBreakpoint ¶
func (s *RPCServer) GetBreakpoint(arg GetBreakpointIn, out *GetBreakpointOut) error
GetBreakpoint gets a breakpoint by Name (if Name is not an empty string) or by ID.
func (*RPCServer) GetThread ¶
func (s *RPCServer) GetThread(arg GetThreadIn, out *GetThreadOut) error
GetThread gets a thread by its ID.
func (*RPCServer) LastModified ¶
func (s *RPCServer) LastModified(arg LastModifiedIn, out *LastModifiedOut) error
func (*RPCServer) ListBreakpoints ¶
func (s *RPCServer) ListBreakpoints(arg ListBreakpointsIn, out *ListBreakpointsOut) error
ListBreakpoints gets all breakpoints.
func (*RPCServer) ListFunctionArgs ¶
func (s *RPCServer) ListFunctionArgs(arg ListFunctionArgsIn, out *ListFunctionArgsOut) error
ListFunctionArgs lists all arguments to the current function
func (*RPCServer) ListFunctions ¶
func (s *RPCServer) ListFunctions(arg ListFunctionsIn, out *ListFunctionsOut) error
ListFunctions lists all functions in the process matching filter.
func (*RPCServer) ListGoroutines ¶
func (s *RPCServer) ListGoroutines(arg ListGoroutinesIn, out *ListGoroutinesOut) error
ListGoroutines lists all goroutines.
func (*RPCServer) ListLocalVars ¶
func (s *RPCServer) ListLocalVars(arg ListLocalVarsIn, out *ListLocalVarsOut) error
ListLocalVars lists all local variables in scope.
func (*RPCServer) ListPackageVars ¶
func (s *RPCServer) ListPackageVars(arg ListPackageVarsIn, out *ListPackageVarsOut) error
ListPackageVars lists all package variables in the context of the current thread.
func (*RPCServer) ListRegisters ¶
func (s *RPCServer) ListRegisters(arg ListRegistersIn, out *ListRegistersOut) error
ListRegisters lists registers and their values.
func (*RPCServer) ListSources ¶
func (s *RPCServer) ListSources(arg ListSourcesIn, out *ListSourcesOut) error
ListSources lists all source files in the process matching filter.
func (*RPCServer) ListThreads ¶
func (s *RPCServer) ListThreads(arg ListThreadsIn, out *ListThreadsOut) (err error)
ListThreads lists all threads.
func (*RPCServer) ListTypes ¶
func (s *RPCServer) ListTypes(arg ListTypesIn, out *ListTypesOut) error
ListTypes lists all types in the process matching filter.
func (*RPCServer) ProcessPid ¶
func (s *RPCServer) ProcessPid(arg ProcessPidIn, out *ProcessPidOut) error
ProcessPid returns the pid of the process we are debugging.
func (*RPCServer) Restart ¶
func (s *RPCServer) Restart(arg RestartIn, out *RestartOut) error
Restart restarts program.
func (*RPCServer) Set ¶
Set sets the value of a variable. Only numerical types and pointers are currently supported.
func (*RPCServer) Stacktrace ¶
func (s *RPCServer) Stacktrace(arg StacktraceIn, out *StacktraceOut) error
Stacktrace returns stacktrace of goroutine Id up to the specified Depth.
If Full is set it will also the variable of all local variables and function arguments of all stack frames.
type RestartOut ¶
type RestartOut struct {
DiscardedBreakpoints []api.DiscardedBreakpoint
}
type StacktraceIn ¶
type StacktraceIn struct { Id int Depth int Full bool Cfg *api.LoadConfig }
type StacktraceOut ¶
type StacktraceOut struct {
Locations []api.Stackframe
}
type StateOut ¶
type StateOut struct {
State *api.DebuggerState
}