service-*: conform to godoc comments (#2916)
This commit is contained in:
parent
22fd222c0a
commit
fbfed8f8d9
@ -282,7 +282,7 @@ const (
|
||||
// frame that no longer exists)
|
||||
VariableFakeAddress
|
||||
|
||||
// VariableCPrt means the variable is a C pointer
|
||||
// VariableCPtr means the variable is a C pointer
|
||||
VariableCPtr
|
||||
|
||||
// VariableCPURegister means this variable is a CPU register.
|
||||
@ -433,7 +433,7 @@ const (
|
||||
Continue = "continue"
|
||||
// Rewind resumes process execution backwards (target must be a recording).
|
||||
Rewind = "rewind"
|
||||
// DirecitonCongruentContinue resumes process execution, if a reverse next, step or stepout operation is in progress it will resume execution backward.
|
||||
// DirectionCongruentContinue resumes process execution, if a reverse next, step or stepout operation is in progress it will resume execution backward.
|
||||
DirectionCongruentContinue = "directionCongruentContinue"
|
||||
// Step continues to next source line, entering function calls.
|
||||
Step = "step"
|
||||
|
||||
@ -9,10 +9,10 @@ import (
|
||||
// Client represents a debugger service client. All client methods are
|
||||
// synchronous.
|
||||
type Client interface {
|
||||
// Returns the pid of the process we are debugging.
|
||||
// ProcessPid returns the pid of the process we are debugging.
|
||||
ProcessPid() int
|
||||
|
||||
// Returns the BuildID of the process' executable we are debugging.
|
||||
// BuildID returns the BuildID of the process' executable we are debugging.
|
||||
BuildID() string
|
||||
|
||||
// LastModified returns the time that the process' executable was modified.
|
||||
@ -21,9 +21,9 @@ type Client interface {
|
||||
// Detach detaches the debugger, optionally killing the process.
|
||||
Detach(killProcess bool) error
|
||||
|
||||
// Restarts program. Set true if you want to rebuild the process we are debugging.
|
||||
// Restart restarts program. Set true if you want to rebuild the process we are debugging.
|
||||
Restart(rebuild bool) ([]api.DiscardedBreakpoint, error)
|
||||
// Restarts program from the specified position.
|
||||
// RestartFrom restarts program from the specified position.
|
||||
RestartFrom(rerecord bool, pos string, resetArgs bool, newArgs []string, newRedirects [3]string, rebuild bool) ([]api.DiscardedBreakpoint, error)
|
||||
|
||||
// GetState returns the current debugger state.
|
||||
@ -35,7 +35,7 @@ type Client interface {
|
||||
Continue() <-chan *api.DebuggerState
|
||||
// Rewind resumes process execution backwards.
|
||||
Rewind() <-chan *api.DebuggerState
|
||||
// DirecitonCongruentContinue resumes process execution, if a reverse next, step or stepout operation is in progress it will resume execution backward.
|
||||
// DirectionCongruentContinue resumes process execution, if a reverse next, step or stepout operation is in progress it will resume execution backward.
|
||||
DirectionCongruentContinue() <-chan *api.DebuggerState
|
||||
// Next continues to the next source line, not entering function calls.
|
||||
Next() (*api.DebuggerState, error)
|
||||
@ -52,9 +52,9 @@ type Client interface {
|
||||
// Call resumes process execution while making a function call.
|
||||
Call(goroutineID int, expr string, unsafe bool) (*api.DebuggerState, error)
|
||||
|
||||
// SingleStep will step a single cpu instruction.
|
||||
// StepInstruction will step a single cpu instruction.
|
||||
StepInstruction() (*api.DebuggerState, error)
|
||||
// ReverseSingleStep will reverse step a single cpu instruction.
|
||||
// ReverseStepInstruction will reverse step a single cpu instruction.
|
||||
ReverseStepInstruction() (*api.DebuggerState, error)
|
||||
// SwitchThread switches the current thread context.
|
||||
SwitchThread(threadID int) (*api.DebuggerState, error)
|
||||
@ -81,10 +81,10 @@ type Client interface {
|
||||
ToggleBreakpoint(id int) (*api.Breakpoint, error)
|
||||
// ToggleBreakpointByName toggles on or off a breakpoint by name.
|
||||
ToggleBreakpointByName(name string) (*api.Breakpoint, error)
|
||||
// Allows user to update an existing breakpoint for example to change the information
|
||||
// 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
|
||||
AmendBreakpoint(*api.Breakpoint) error
|
||||
// Cancels a Next or Step call that was interrupted by a manual stop or by another breakpoint
|
||||
// CancelNext cancels a Next or Step call that was interrupted by a manual stop or by another breakpoint
|
||||
CancelNext() error
|
||||
|
||||
// ListThreads lists all threads.
|
||||
@ -106,7 +106,7 @@ type Client interface {
|
||||
ListFunctions(filter string) ([]string, error)
|
||||
// ListTypes lists all types in the process matching filter.
|
||||
ListTypes(filter string) ([]string, error)
|
||||
// ListLocals lists all local variables in scope.
|
||||
// ListLocalVariables lists all local variables in scope.
|
||||
ListLocalVariables(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)
|
||||
// ListFunctionArgs lists all arguments to the current function.
|
||||
ListFunctionArgs(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)
|
||||
@ -120,16 +120,16 @@ type Client interface {
|
||||
// ListGoroutinesWithFilter lists goroutines matching the filters
|
||||
ListGoroutinesWithFilter(start, count int, filters []api.ListGoroutinesFilter, group *api.GoroutineGroupingOptions) ([]*api.Goroutine, []api.GoroutineGroup, int, bool, error)
|
||||
|
||||
// Returns stacktrace
|
||||
// Stacktrace returns stacktrace
|
||||
Stacktrace(goroutineID int, depth int, opts api.StacktraceOptions, cfg *api.LoadConfig) ([]api.Stackframe, error)
|
||||
|
||||
// Returns ancestor stacktraces
|
||||
// Ancestors returns ancestor stacktraces
|
||||
Ancestors(goroutineID int, numAncestors int, depth int) ([]api.Ancestor, error)
|
||||
|
||||
// Returns whether we attached to a running process or not
|
||||
// AttachedToExistingProcess returns whether we attached to a running process or not
|
||||
AttachedToExistingProcess() bool
|
||||
|
||||
// Returns concrete location information described by a location expression
|
||||
// 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>
|
||||
@ -143,9 +143,9 @@ type Client interface {
|
||||
// If findInstruction is true FindLocation will only return locations that correspond to instructions.
|
||||
FindLocation(scope api.EvalScope, loc string, findInstruction bool, substitutePathRules [][2]string) ([]api.Location, error)
|
||||
|
||||
// Disassemble code between startPC and endPC
|
||||
// DisassembleRange disassemble code between startPC and endPC
|
||||
DisassembleRange(scope api.EvalScope, startPC, endPC uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
|
||||
// Disassemble code of the function containing PC
|
||||
// DisassemblePC disassemble code of the function containing PC
|
||||
DisassemblePC(scope api.EvalScope, pc uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)
|
||||
|
||||
// Recorded returns true if the target is a recording.
|
||||
@ -162,7 +162,7 @@ type Client interface {
|
||||
// SetReturnValuesLoadConfig sets the load configuration for return values.
|
||||
SetReturnValuesLoadConfig(*api.LoadConfig)
|
||||
|
||||
// IsMulticlien returns true if the headless instance is multiclient.
|
||||
// IsMulticlient returns true if the headless instance is multiclient.
|
||||
IsMulticlient() bool
|
||||
|
||||
// ListDynamicLibraries returns a list of loaded dynamic libraries.
|
||||
|
||||
@ -10,6 +10,7 @@ const (
|
||||
|
||||
// Where applicable and for consistency only,
|
||||
// values below are inspired the original vscode-go debug adaptor.
|
||||
|
||||
FailedToLaunch = 3000
|
||||
FailedToAttach = 3001
|
||||
FailedToInitialize = 3002
|
||||
@ -27,7 +28,9 @@ const (
|
||||
UnableToDisassemble = 2013
|
||||
UnableToListRegisters = 2014
|
||||
UnableToRunDlvCommand = 2015
|
||||
|
||||
// Add more codes as we support more requests
|
||||
|
||||
NoDebugIsRunning = 3000
|
||||
DebuggeeIsRunning = 4000
|
||||
DisconnectError = 5000
|
||||
|
||||
@ -4,7 +4,7 @@ package service
|
||||
type RPCCallback interface {
|
||||
Return(out interface{}, err error)
|
||||
|
||||
// SetupDone returns a channel that should be closed to signal that the
|
||||
// SetupDoneChan returns a channel that should be closed to signal that the
|
||||
// asynchornous method has completed setup and the server is ready to
|
||||
// receive other requests.
|
||||
SetupDoneChan() chan struct{}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user