rpc2

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 14 Imported by: 37

Documentation

Index

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 AncestorsIn added in v1.3.0

type AncestorsIn struct {
	GoroutineID  int64
	NumAncestors int
	Depth        int
}

type AncestorsOut added in v1.3.0

type AncestorsOut struct {
	Ancestors []api.Ancestor
}

type AttachedToExistingProcessIn

type AttachedToExistingProcessIn struct {
}

type AttachedToExistingProcessOut

type AttachedToExistingProcessOut struct {
	Answer bool
}

type BuildIDIn added in v1.8.1

type BuildIDIn struct {
}

type BuildIDOut added in v1.8.1

type BuildIDOut struct {
	BuildID string
}

type CancelNextIn

type CancelNextIn struct {
}

type CancelNextOut

type CancelNextOut struct {
}

type CheckpointIn added in v1.0.0

type CheckpointIn struct {
	Where string
}

type CheckpointOut added in v1.0.0

type CheckpointOut struct {
	ID int
}

type ClearBreakpointIn

type ClearBreakpointIn struct {
	Id   int
	Name string
}

type ClearBreakpointOut

type ClearBreakpointOut struct {
	Breakpoint *api.Breakpoint
}

type ClearCheckpointIn added in v1.0.0

type ClearCheckpointIn struct {
	ID int
}

type ClearCheckpointOut added in v1.0.0

type ClearCheckpointOut struct {
}

type CommandOut

type CommandOut struct {
	State api.DebuggerState
}

type CreateBreakpointIn

type CreateBreakpointIn struct {
	Breakpoint api.Breakpoint

	LocExpr             string
	SubstitutePathRules [][2]string
	Suspended           bool
}

type CreateBreakpointOut

type CreateBreakpointOut struct {
	Breakpoint api.Breakpoint
}

type CreateEBPFTracepointIn added in v1.7.1

type CreateEBPFTracepointIn struct {
	FunctionName string
}

type CreateEBPFTracepointOut added in v1.7.1

type CreateEBPFTracepointOut struct {
	Breakpoint api.Breakpoint
}

type CreateWatchpointIn added in v1.7.0

type CreateWatchpointIn struct {
	Scope api.EvalScope
	Expr  string
	Type  api.WatchType
}

type CreateWatchpointOut added in v1.7.0

type CreateWatchpointOut struct {
	*api.Breakpoint
}

type DebugInfoDirectoriesIn added in v1.21.0

type DebugInfoDirectoriesIn struct {
	Set  bool
	List []string
}

type DebugInfoDirectoriesOut added in v1.21.0

type DebugInfoDirectoriesOut struct {
	List []string
}

type DetachIn

type DetachIn struct {
	Kill bool
}

type DetachOut

type DetachOut struct {
}

type DisassembleIn

type DisassembleIn struct {
	Scope          api.EvalScope
	StartPC, EndPC uint64
	Flavour        api.AssemblyFlavour
}

type DisassembleOut

type DisassembleOut struct {
	Disassemble api.AsmInstructions
}

type DumpCancelIn added in v1.6.1

type DumpCancelIn struct {
}

type DumpCancelOut added in v1.6.1

type DumpCancelOut struct {
}

type DumpStartIn added in v1.6.1

type DumpStartIn struct {
	Destination string
}

type DumpStartOut added in v1.6.1

type DumpStartOut struct {
	State api.DumpState
}

type DumpWaitIn added in v1.6.1

type DumpWaitIn struct {
	Wait int
}

type DumpWaitOut added in v1.6.1

type DumpWaitOut struct {
	State api.DumpState
}

type EvalIn

type EvalIn struct {
	Scope api.EvalScope
	Expr  string
	Cfg   *api.LoadConfig
}

type EvalOut

type EvalOut struct {
	Variable *api.Variable
}

type ExamineMemoryIn added in v1.4.1

type ExamineMemoryIn struct {
	Address uint64
	Length  int
}

ExamineMemoryIn holds the arguments of ExamineMemory

type ExaminedMemoryOut added in v1.4.1

type ExaminedMemoryOut struct {
	Mem            []byte
	IsLittleEndian bool
}

ExaminedMemoryOut holds the return values of ExamineMemory

type FindLocationIn

type FindLocationIn struct {
	Scope                     api.EvalScope
	Loc                       string
	IncludeNonExecutableLines bool

	// SubstitutePathRules is a slice of source code path substitution rules,
	// the first entry of each pair is the path of a directory as it appears in
	// the executable file (i.e. the location of a source file when the program
	// was compiled), the second entry of each pair is the location of the same
	// directory on the client system.
	SubstitutePathRules [][2]string
}

type FindLocationOut

type FindLocationOut struct {
	Locations         []api.Location
	SubstituteLocExpr string // if this isn't an empty string it should be passed as the location expression for CreateBreakpoint instead of the original location expression
}

type FollowExecEnabledIn added in v1.21.0

type FollowExecEnabledIn struct {
}

type FollowExecEnabledOut added in v1.21.0

type FollowExecEnabledOut struct {
	Enabled bool
}

type FollowExecIn added in v1.21.0

type FollowExecIn struct {
	Enable bool
	Regex  string
}

type FollowExecOut added in v1.21.0

type FollowExecOut struct {
}

type FunctionReturnLocationsIn added in v1.2.0

type FunctionReturnLocationsIn struct {
	// FnName is the name of the function for which all
	// return locations should be given.
	FnName string
}

FunctionReturnLocationsIn holds arguments for the FunctionReturnLocationsRPC call. It holds the name of the function for which all return locations should be given.

type FunctionReturnLocationsOut added in v1.2.0

type FunctionReturnLocationsOut struct {
	// Addrs is the list of all locations where the given function returns.
	Addrs []uint64
}

FunctionReturnLocationsOut holds the result of the FunctionReturnLocations RPC call. It provides the list of addresses that the given function returns, for example with a `RET` instruction or `CALL runtime.deferreturn`.

type GetBreakpointIn

type GetBreakpointIn struct {
	Id   int
	Name string
}

type GetBreakpointOut

type GetBreakpointOut struct {
	Breakpoint api.Breakpoint
}

type GetBufferedTracepointsIn added in v1.7.1

type GetBufferedTracepointsIn struct {
}

type GetBufferedTracepointsOut added in v1.7.1

type GetBufferedTracepointsOut struct {
	TracepointResults []api.TracepointResult
}

type GetThreadIn

type GetThreadIn struct {
	Id int
}

type GetThreadOut

type GetThreadOut struct {
	Thread *api.Thread
}

type IsMulticlientIn added in v1.1.0

type IsMulticlientIn struct {
}

type IsMulticlientOut added in v1.1.0

type IsMulticlientOut struct {
	// IsMulticlient returns true if the headless instance was started with --accept-multiclient
	IsMulticlient bool
}

type LastModifiedIn

type LastModifiedIn struct {
}

type LastModifiedOut

type LastModifiedOut struct {
	Time time.Time
}

type ListBreakpointsIn

type ListBreakpointsIn struct {
	All bool
}

type ListBreakpointsOut

type ListBreakpointsOut struct {
	Breakpoints []*api.Breakpoint
}

type ListCheckpointsIn added in v1.0.0

type ListCheckpointsIn struct {
}

type ListCheckpointsOut added in v1.0.0

type ListCheckpointsOut struct {
	Checkpoints []api.Checkpoint
}

type ListDynamicLibrariesIn added in v1.3.0

type ListDynamicLibrariesIn struct {
}

ListDynamicLibrariesIn holds the arguments of ListDynamicLibraries

type ListDynamicLibrariesOut added in v1.3.0

type ListDynamicLibrariesOut struct {
	List []api.Image
}

ListDynamicLibrariesOut holds the return values of ListDynamicLibraries

type ListFunctionArgsIn

type ListFunctionArgsIn struct {
	Scope api.EvalScope
	Cfg   api.LoadConfig
}

type ListFunctionArgsOut

type ListFunctionArgsOut struct {
	Args []api.Variable
}

type ListFunctionsIn

type ListFunctionsIn struct {
	Filter      string
	FollowCalls int
}

type ListFunctionsOut

type ListFunctionsOut struct {
	Funcs []string
}

type ListGoroutinesIn

type ListGoroutinesIn struct {
	Start int
	Count int

	Filters []api.ListGoroutinesFilter
	api.GoroutineGroupingOptions

	EvalScope *api.EvalScope
}

type ListGoroutinesOut

type ListGoroutinesOut struct {
	Goroutines    []*api.Goroutine
	Nextg         int
	Groups        []api.GoroutineGroup
	TooManyGroups bool
}

type ListLocalVarsIn

type ListLocalVarsIn struct {
	Scope api.EvalScope
	Cfg   api.LoadConfig
}

type ListLocalVarsOut

type ListLocalVarsOut struct {
	Variables []api.Variable
}

type ListPackageVarsIn

type ListPackageVarsIn struct {
	Filter string
	Cfg    api.LoadConfig
}

type ListPackageVarsOut

type ListPackageVarsOut struct {
	Variables []api.Variable
}

type ListPackagesBuildInfoIn added in v1.4.0

type ListPackagesBuildInfoIn struct {
	IncludeFiles bool
	Filter       string // if not empty, returns only packages matching the regexp.
}

ListPackagesBuildInfoIn holds the arguments of ListPackagesBuildInfo.

type ListPackagesBuildInfoOut added in v1.4.0

type ListPackagesBuildInfoOut struct {
	List []api.PackageBuildInfo
}

ListPackagesBuildInfoOut holds the return values of ListPackagesBuildInfo.

type ListRegistersIn

type ListRegistersIn struct {
	ThreadID  int
	IncludeFp bool
	Scope     *api.EvalScope
}

type ListRegistersOut

type ListRegistersOut struct {
	Registers string
	Regs      api.Registers
}

type ListSourcesIn

type ListSourcesIn struct {
	Filter string
}

type ListSourcesOut

type ListSourcesOut struct {
	Sources []string
}

type ListTargetsIn added in v1.21.0

type ListTargetsIn struct {
}

type ListTargetsOut added in v1.21.0

type ListTargetsOut struct {
	Targets []api.Target
}

type ListThreadsIn

type ListThreadsIn struct {
}

type ListThreadsOut

type ListThreadsOut struct {
	Threads []*api.Thread
}

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
}

RPCClient is a RPC service.Client.

func NewClient

func NewClient(addr string) *RPCClient

NewClient creates a new RPCClient.

func NewClientFromConn added in v1.2.0

func NewClientFromConn(conn net.Conn) *RPCClient

NewClientFromConn creates a new RPCClient from the given connection.

func (*RPCClient) AmendBreakpoint

func (c *RPCClient) AmendBreakpoint(bp *api.Breakpoint) error

func (*RPCClient) Ancestors added in v1.3.0

func (c *RPCClient) Ancestors(goroutineID int64, numAncestors int, depth int) ([]api.Ancestor, error)

func (*RPCClient) AttachedToExistingProcess

func (c *RPCClient) AttachedToExistingProcess() bool

func (*RPCClient) BuildID added in v1.8.1

func (c *RPCClient) BuildID() string

func (*RPCClient) Call added in v1.1.0

func (c *RPCClient) Call(goroutineID int64, expr string, unsafe bool) (*api.DebuggerState, error)

func (*RPCClient) CallAPI added in v1.3.0

func (c *RPCClient) CallAPI(method string, args, reply interface{}) error

func (*RPCClient) CancelNext

func (c *RPCClient) CancelNext() error

func (*RPCClient) Checkpoint added in v1.0.0

func (c *RPCClient) Checkpoint(where string) (checkpointID int, err error)

Checkpoint sets a checkpoint at the current position.

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) ClearCheckpoint added in v1.0.0

func (c *RPCClient) ClearCheckpoint(id int) error

ClearCheckpoint removes a checkpoint

func (*RPCClient) Continue

func (c *RPCClient) Continue() <-chan *api.DebuggerState

func (*RPCClient) CoreDumpCancel added in v1.6.1

func (c *RPCClient) CoreDumpCancel() error

func (*RPCClient) CoreDumpStart added in v1.6.1

func (c *RPCClient) CoreDumpStart(dest string) (api.DumpState, error)

func (*RPCClient) CoreDumpWait added in v1.6.1

func (c *RPCClient) CoreDumpWait(msec int) api.DumpState

func (*RPCClient) CreateBreakpoint

func (c *RPCClient) CreateBreakpoint(breakPoint *api.Breakpoint) (*api.Breakpoint, error)

CreateBreakpoint will send a request to the RPC server to create a breakpoint. Please refer to the documentation for `Debugger.CreateBreakpoint` for a description of how the requested breakpoint parameters are interpreted and used: https://pkg.go.dev/github.com/go-delve/delve/service/debugger#Debugger.CreateBreakpoint

func (*RPCClient) CreateBreakpointWithExpr added in v1.20.0

func (c *RPCClient) CreateBreakpointWithExpr(breakPoint *api.Breakpoint, locExpr string, substitutePathRules [][2]string, suspended bool) (*api.Breakpoint, error)

CreateBreakpointWithExpr is like CreateBreakpoint but will also set a location expression to be used to restore the breakpoint after it is disabled.

func (*RPCClient) CreateEBPFTracepoint added in v1.7.1

func (c *RPCClient) CreateEBPFTracepoint(fnName string) error

func (*RPCClient) CreateWatchpoint added in v1.7.0

func (c *RPCClient) CreateWatchpoint(scope api.EvalScope, expr string, wtype api.WatchType) (*api.Breakpoint, error)

func (*RPCClient) Detach

func (c *RPCClient) Detach(kill bool) error

func (*RPCClient) DirectionCongruentContinue added in v1.4.1

func (c *RPCClient) DirectionCongruentContinue() <-chan *api.DebuggerState

func (*RPCClient) DisassemblePC

func (c *RPCClient) DisassemblePC(scope api.EvalScope, pc uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)

DisassemblePC disassembles function containing pc

func (*RPCClient) DisassembleRange

func (c *RPCClient) DisassembleRange(scope api.EvalScope, startPC, endPC uint64, flavour api.AssemblyFlavour) (api.AsmInstructions, error)

DisassembleRange disassembles code between startPC and endPC

func (*RPCClient) Disconnect added in v1.1.0

func (c *RPCClient) Disconnect(cont bool) error

func (*RPCClient) EvalVariable

func (c *RPCClient) EvalVariable(scope api.EvalScope, expr string, cfg api.LoadConfig) (*api.Variable, error)

func (*RPCClient) ExamineMemory added in v1.4.1

func (c *RPCClient) ExamineMemory(address uint64, count int) ([]byte, bool, error)

func (*RPCClient) FindLocation

func (c *RPCClient) FindLocation(scope api.EvalScope, loc string, findInstructions bool, substitutePathRules [][2]string) ([]api.Location, string, error)

func (*RPCClient) FollowExec added in v1.21.0

func (c *RPCClient) FollowExec(v bool, regex string) error

FollowExec enabled or disabled follow exec mode. When follow exec is enabled Delve will automatically attach to new subprocesses with a command line matched by regex, if regex is nil all new subprocesses are automatically debugged.

func (*RPCClient) FollowExecEnabled added in v1.21.0

func (c *RPCClient) FollowExecEnabled() bool

FollowExecEnabled returns true if follow exec mode is enabled.

func (*RPCClient) FunctionReturnLocations added in v1.2.0

func (c *RPCClient) FunctionReturnLocations(fnName string) ([]uint64, error)

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) GetBufferedTracepoints added in v1.7.1

func (c *RPCClient) GetBufferedTracepoints() ([]api.TracepointResult, error)

func (*RPCClient) GetDebugInfoDirectories added in v1.21.0

func (c *RPCClient) GetDebugInfoDirectories() ([]string, error)

func (*RPCClient) GetState

func (c *RPCClient) GetState() (*api.DebuggerState, error)

func (*RPCClient) GetStateNonBlocking added in v1.1.0

func (c *RPCClient) GetStateNonBlocking() (*api.DebuggerState, error)

func (*RPCClient) GetThread

func (c *RPCClient) GetThread(id int) (*api.Thread, error)

func (*RPCClient) Halt

func (c *RPCClient) Halt() (*api.DebuggerState, error)

func (*RPCClient) IsMulticlient added in v1.1.0

func (c *RPCClient) IsMulticlient() bool

func (*RPCClient) LastModified

func (c *RPCClient) LastModified() time.Time

func (*RPCClient) ListBreakpoints

func (c *RPCClient) ListBreakpoints(all bool) ([]*api.Breakpoint, error)

func (*RPCClient) ListCheckpoints added in v1.0.0

func (c *RPCClient) ListCheckpoints() ([]api.Checkpoint, error)

ListCheckpoints gets all checkpoints.

func (*RPCClient) ListDynamicLibraries added in v1.3.0

func (c *RPCClient) ListDynamicLibraries() ([]api.Image, error)

func (*RPCClient) ListFunctionArgs

func (c *RPCClient) ListFunctionArgs(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)

func (*RPCClient) ListFunctions

func (c *RPCClient) ListFunctions(filter string, TraceFollow int) ([]string, error)

func (*RPCClient) ListGoroutines

func (c *RPCClient) ListGoroutines(start, count int) ([]*api.Goroutine, int, error)

func (*RPCClient) ListGoroutinesWithFilter added in v1.7.0

func (c *RPCClient) ListGoroutinesWithFilter(start, count int, filters []api.ListGoroutinesFilter, group *api.GoroutineGroupingOptions, scope *api.EvalScope) ([]*api.Goroutine, []api.GoroutineGroup, int, bool, error)

func (*RPCClient) ListLocalVariables

func (c *RPCClient) ListLocalVariables(scope api.EvalScope, cfg api.LoadConfig) ([]api.Variable, error)

func (*RPCClient) ListPackageVariables

func (c *RPCClient) ListPackageVariables(filter string, cfg api.LoadConfig) ([]api.Variable, error)

func (*RPCClient) ListPackagesBuildInfo added in v1.21.1

func (c *RPCClient) ListPackagesBuildInfo(filter string, includeFiles bool) ([]api.PackageBuildInfo, error)

func (*RPCClient) ListScopeRegisters added in v1.4.1

func (c *RPCClient) ListScopeRegisters(scope api.EvalScope, includeFp bool) (api.Registers, error)

func (*RPCClient) ListSources

func (c *RPCClient) ListSources(filter string) ([]string, error)

func (*RPCClient) ListTargets added in v1.21.0

func (c *RPCClient) ListTargets() ([]api.Target, error)

ListTargets returns the current list of debug targets.

func (*RPCClient) ListThreadRegisters added in v1.4.1

func (c *RPCClient) ListThreadRegisters(threadID int, includeFp bool) (api.Registers, error)

func (*RPCClient) ListThreads

func (c *RPCClient) ListThreads() ([]*api.Thread, error)

func (*RPCClient) ListTypes

func (c *RPCClient) ListTypes(filter string) ([]string, error)

func (*RPCClient) Next

func (c *RPCClient) Next() (*api.DebuggerState, error)

func (*RPCClient) ProcessPid

func (c *RPCClient) ProcessPid() int

func (*RPCClient) Recorded added in v1.0.0

func (c *RPCClient) Recorded() bool

Recorded returns true if the debugger target is a recording.

func (*RPCClient) Restart

func (c *RPCClient) Restart(rebuild bool) ([]api.DiscardedBreakpoint, error)

func (*RPCClient) RestartFrom added in v1.0.0

func (c *RPCClient) RestartFrom(rerecord bool, pos string, resetArgs bool, newArgs []string, newRedirects [3]string, rebuild bool) ([]api.DiscardedBreakpoint, error)

func (*RPCClient) ReverseNext added in v1.4.1

func (c *RPCClient) ReverseNext() (*api.DebuggerState, error)

func (*RPCClient) ReverseStep added in v1.4.1

func (c *RPCClient) ReverseStep() (*api.DebuggerState, error)

func (*RPCClient) ReverseStepInstruction added in v1.3.0

func (c *RPCClient) ReverseStepInstruction(skipCalls bool) (*api.DebuggerState, error)

func (*RPCClient) ReverseStepOut added in v1.4.1

func (c *RPCClient) ReverseStepOut() (*api.DebuggerState, error)

func (*RPCClient) Rewind added in v1.0.0

func (c *RPCClient) Rewind() <-chan *api.DebuggerState

func (*RPCClient) SetDebugInfoDirectories added in v1.21.0

func (c *RPCClient) SetDebugInfoDirectories(v []string) error

func (*RPCClient) SetReturnValuesLoadConfig added in v1.1.0

func (c *RPCClient) SetReturnValuesLoadConfig(cfg *api.LoadConfig)

func (*RPCClient) SetVariable

func (c *RPCClient) SetVariable(scope api.EvalScope, symbol, value string) error

func (*RPCClient) Stacktrace

func (c *RPCClient) Stacktrace(goroutineId int64, depth int, opts api.StacktraceOptions, cfg *api.LoadConfig) ([]api.Stackframe, error)

func (*RPCClient) Step

func (c *RPCClient) Step() (*api.DebuggerState, error)

func (*RPCClient) StepInstruction

func (c *RPCClient) StepInstruction(skipCalls bool) (*api.DebuggerState, error)

func (*RPCClient) StepOut

func (c *RPCClient) StepOut() (*api.DebuggerState, error)

func (*RPCClient) StopRecording added in v1.4.1

func (c *RPCClient) StopRecording() error

func (*RPCClient) SwitchGoroutine

func (c *RPCClient) SwitchGoroutine(goroutineID int64) (*api.DebuggerState, error)

func (*RPCClient) SwitchThread

func (c *RPCClient) SwitchThread(threadID int) (*api.DebuggerState, error)

func (*RPCClient) ToggleBreakpoint added in v1.6.1

func (c *RPCClient) ToggleBreakpoint(id int) (*api.Breakpoint, error)

func (*RPCClient) ToggleBreakpointByName added in v1.6.1

func (c *RPCClient) ToggleBreakpointByName(name string) (*api.Breakpoint, error)

func (*RPCClient) TraceDirectory added in v1.0.0

func (c *RPCClient) TraceDirectory() (string, error)

TraceDirectory returns the path to the trace directory for a recording.

type RPCServer

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

func NewServer

func NewServer(config *service.Config, debugger *debugger.Debugger) *RPCServer

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) Ancestors added in v1.3.0

func (s *RPCServer) Ancestors(arg AncestorsIn, out *AncestorsOut) error

Ancestors returns the stacktraces for the ancestors of a goroutine.

func (*RPCServer) AttachedToExistingProcess

func (s *RPCServer) AttachedToExistingProcess(arg AttachedToExistingProcessIn, out *AttachedToExistingProcessOut) error

AttachedToExistingProcess returns whether we attached to a running process or not

func (*RPCServer) BuildID added in v1.8.1

func (s *RPCServer) BuildID(arg BuildIDIn, out *BuildIDOut) error

func (*RPCServer) CancelNext

func (s *RPCServer) CancelNext(arg CancelNextIn, out *CancelNextOut) error

func (*RPCServer) Checkpoint added in v1.0.0

func (s *RPCServer) Checkpoint(arg CheckpointIn, out *CheckpointOut) 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) ClearCheckpoint added in v1.0.0

func (s *RPCServer) ClearCheckpoint(arg ClearCheckpointIn, out *ClearCheckpointOut) error

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. The client is expected to populate `CreateBreakpointIn` with an `api.Breakpoint` struct describing where to set the breakpoint. For more information on how to properly request a breakpoint via the `api.Breakpoint` struct see the documentation for `debugger.CreateBreakpoint` here: https://pkg.go.dev/github.com/go-delve/delve/service/debugger#Debugger.CreateBreakpoint.

func (*RPCServer) CreateEBPFTracepoint added in v1.7.1

func (s *RPCServer) CreateEBPFTracepoint(arg CreateEBPFTracepointIn, out *CreateEBPFTracepointOut) error

func (*RPCServer) CreateWatchpoint added in v1.7.0

func (s *RPCServer) CreateWatchpoint(arg CreateWatchpointIn, out *CreateWatchpointOut) error

func (*RPCServer) DebugInfoDirectories added in v1.21.0

func (s *RPCServer) DebugInfoDirectories(arg DebugInfoDirectoriesIn, out *DebugInfoDirectoriesOut) error

func (*RPCServer) Detach

func (s *RPCServer) Detach(arg DetachIn, out *DetachOut) error

Detach detaches the debugger, optionally killing the process.

func (*RPCServer) Disassemble

func (s *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 goroutine 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) DumpCancel added in v1.6.1

func (s *RPCServer) DumpCancel(arg DumpCancelIn, out *DumpCancelOut) error

DumpCancel cancels the core dump.

func (*RPCServer) DumpStart added in v1.6.1

func (s *RPCServer) DumpStart(arg DumpStartIn, out *DumpStartOut) error

DumpStart starts a core dump to arg.Destination.

func (*RPCServer) DumpWait added in v1.6.1

func (s *RPCServer) DumpWait(arg DumpWaitIn, out *DumpWaitOut) error

DumpWait waits for the core dump to finish or for arg.Wait milliseconds. Wait == 0 means return immediately. Returns the core dump status

func (*RPCServer) Eval

func (s *RPCServer) Eval(arg EvalIn, out *EvalOut) error

Eval returns a variable in the specified context.

See https://github.com/go-delve/delve/blob/master/Documentation/cli/expr.md for a description of acceptable values of arg.Expr.

func (*RPCServer) ExamineMemory added in v1.4.1

func (s *RPCServer) ExamineMemory(arg ExamineMemoryIn, out *ExaminedMemoryOut) error

func (*RPCServer) FindLocation

func (s *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) FollowExec added in v1.21.0

func (s *RPCServer) FollowExec(arg FollowExecIn, out *FollowExecOut) error

FollowExec enables or disables follow exec mode.

func (*RPCServer) FollowExecEnabled added in v1.21.0

func (s *RPCServer) FollowExecEnabled(arg FollowExecEnabledIn, out *FollowExecEnabledOut) error

FollowExecEnabled returns true if follow exec mode is enabled.

func (*RPCServer) FunctionReturnLocations added in v1.2.0

func (s *RPCServer) FunctionReturnLocations(in FunctionReturnLocationsIn, out *FunctionReturnLocationsOut) error

FunctionReturnLocations is the implements the client call of the same name. Look at client documentation for more information.

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) GetBufferedTracepoints added in v1.7.1

func (s *RPCServer) GetBufferedTracepoints(arg GetBufferedTracepointsIn, out *GetBufferedTracepointsOut) error

func (*RPCServer) GetThread

func (s *RPCServer) GetThread(arg GetThreadIn, out *GetThreadOut) error

GetThread gets a thread by its ID.

func (*RPCServer) IsMulticlient added in v1.1.0

func (s *RPCServer) IsMulticlient(arg IsMulticlientIn, out *IsMulticlientOut) error

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) ListCheckpoints added in v1.0.0

func (s *RPCServer) ListCheckpoints(arg ListCheckpointsIn, out *ListCheckpointsOut) error

func (*RPCServer) ListDynamicLibraries added in v1.3.0

func (s *RPCServer) ListDynamicLibraries(in ListDynamicLibrariesIn, out *ListDynamicLibrariesOut) error

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. If Count is specified ListGoroutines will return at the first Count goroutines and an index in Nextg, that can be passed as the Start parameter, to get more goroutines from ListGoroutines. Passing a value of Start that wasn't returned by ListGoroutines will skip an undefined number of goroutines.

If arg.Filters are specified the list of returned goroutines is filtered applying the specified filters. For example:

ListGoroutinesFilter{ Kind: ListGoroutinesFilterUserLoc, Negated: false, Arg: "afile.go" }

will only return goroutines whose UserLoc contains "afile.go" as a substring. More specifically a goroutine matches a location filter if the specified location, formatted like this:

filename:lineno in function

contains Arg[0] as a substring.

Filters can also be applied to goroutine labels:

ListGoroutineFilter{ Kind: ListGoroutinesFilterLabel, Negated: false, Arg: "key=value" }

this filter will only return goroutines that have a key=value label.

If arg.GroupBy is not GoroutineFieldNone then the goroutines will be grouped with the specified criterion. If the value of arg.GroupBy is GoroutineLabel goroutines will be grouped by the value of the label with key GroupByKey. For each group a maximum of MaxGroupMembers example goroutines are returned, as well as the total number of goroutines in the group.

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) ListPackagesBuildInfo added in v1.4.0

func (s *RPCServer) ListPackagesBuildInfo(in ListPackagesBuildInfoIn, out *ListPackagesBuildInfoOut) error

ListPackagesBuildInfo returns the list of packages used by the program along with the directory where each package was compiled and optionally the list of files constituting the package. Note that the directory path is a best guess and may be wrong is a tool other than cmd/go is used to perform the build.

func (*RPCServer) ListRegisters

func (s *RPCServer) ListRegisters(arg ListRegistersIn, out *ListRegistersOut) error

ListRegisters lists registers and their values. If ListRegistersIn.Scope is not nil the registers of that eval scope will be returned, otherwise ListRegistersIn.ThreadID will be used.

func (*RPCServer) ListSources

func (s *RPCServer) ListSources(arg ListSourcesIn, out *ListSourcesOut) error

ListSources lists all source files in the process matching filter.

func (*RPCServer) ListTargets added in v1.21.0

func (s *RPCServer) ListTargets(arg ListTargetsIn, out *ListTargetsOut) error

ListTargets returns the list of targets we are currently attached to.

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) Recorded added in v1.0.0

func (s *RPCServer) Recorded(arg RecordedIn, out *RecordedOut) error

func (*RPCServer) Restart

func (s *RPCServer) Restart(arg RestartIn, cb service.RPCCallback)

Restart restarts program.

func (*RPCServer) Set

func (s *RPCServer) Set(arg SetIn, out *SetOut) error

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.

func (*RPCServer) State

func (s *RPCServer) State(arg StateIn, cb service.RPCCallback)

State returns the current debugger state.

func (*RPCServer) StopRecording added in v1.4.1

func (s *RPCServer) StopRecording(arg StopRecordingIn, cb service.RPCCallback)

func (*RPCServer) ToggleBreakpoint added in v1.6.1

func (s *RPCServer) ToggleBreakpoint(arg ToggleBreakpointIn, out *ToggleBreakpointOut) error

ToggleBreakpoint toggles on or off a breakpoint by Name (if Name is not an empty string) or by ID.

type RecordedIn added in v1.0.0

type RecordedIn struct {
}

type RecordedOut added in v1.0.0

type RecordedOut struct {
	Recorded       bool
	TraceDirectory string
}

type RestartIn

type RestartIn struct {
	// Position to restart from, if it starts with 'c' it's a checkpoint ID,
	// otherwise it's an event number. Only valid for recorded targets.
	Position string

	// ResetArgs tell whether NewArgs and NewRedirects should take effect.
	ResetArgs bool
	// NewArgs are arguments to launch a new process.  They replace only the
	// argv[1] and later. Argv[0] cannot be changed.
	NewArgs []string

	// When Rerecord is set the target will be rerecorded
	Rerecord bool

	// When Rebuild is set the process will be build again
	Rebuild bool

	NewRedirects [3]string
}

type RestartOut

type RestartOut struct {
	DiscardedBreakpoints []api.DiscardedBreakpoint
}

type SetIn

type SetIn struct {
	Scope  api.EvalScope
	Symbol string
	Value  string
}

type SetOut

type SetOut struct {
}

type StacktraceIn

type StacktraceIn struct {
	Id     int64
	Depth  int
	Full   bool
	Defers bool // read deferred functions (equivalent to passing StacktraceReadDefers in Opts)
	Opts   api.StacktraceOptions
	Cfg    *api.LoadConfig
}

type StacktraceOut

type StacktraceOut struct {
	Locations []api.Stackframe
}

type StateIn

type StateIn struct {
	// If NonBlocking is true State will return immediately even if the target process is running.
	NonBlocking bool
}

type StateOut

type StateOut struct {
	State *api.DebuggerState
}

type StopRecordingIn added in v1.4.1

type StopRecordingIn struct {
}

type StopRecordingOut added in v1.4.1

type StopRecordingOut struct {
}

type ToggleBreakpointIn added in v1.6.1

type ToggleBreakpointIn struct {
	Id   int
	Name string
}

type ToggleBreakpointOut added in v1.6.1

type ToggleBreakpointOut struct {
	Breakpoint *api.Breakpoint
}

Jump to

Keyboard shortcuts

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