rpc2

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: GPL-3.0, GPL-3.0 Imports: 9 Imported by: 0

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

type AncestorsIn struct {
	GoroutineID  int
	NumAncestors int
	Depth        int
}

type AncestorsOut

type AncestorsOut struct {
	Ancestors []api.Ancestor
}

type AttachedToExistingProcessIn

type AttachedToExistingProcessIn struct {
}

type AttachedToExistingProcessOut

type AttachedToExistingProcessOut struct {
	Answer bool
}

type CancelNextIn

type CancelNextIn struct {
}

type CancelNextOut

type CancelNextOut struct {
}

type CheckpointIn

type CheckpointIn struct {
	Where string
}

type CheckpointOut

type CheckpointOut struct {
	ID int
}

type ClearBreakpointIn

type ClearBreakpointIn struct {
	Id   int
	Name string
}

type ClearBreakpointOut

type ClearBreakpointOut struct {
	Breakpoint *api.Breakpoint
}

type ClearCheckpointIn

type ClearCheckpointIn struct {
	ID int
}

type ClearCheckpointOut

type ClearCheckpointOut struct {
}

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 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.0

type DumpCancelIn struct {
}

type DumpCancelOut added in v1.6.0

type DumpCancelOut struct {
}

type DumpStartIn added in v1.6.0

type DumpStartIn struct {
	Destination string
}

type DumpStartOut added in v1.6.0

type DumpStartOut struct {
	State api.DumpState
}

type DumpWaitIn added in v1.6.0

type DumpWaitIn struct {
	Wait int
}

type DumpWaitOut added in v1.6.0

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.5.0

type ExamineMemoryIn struct {
	Address uint64
	Length  int
}

ExamineMemoryIn holds the arguments of ExamineMemory

type ExaminedMemoryOut added in v1.5.0

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
}

type FunctionReturnLocationsIn

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

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 GetThreadIn

type GetThreadIn struct {
	Id int
}

type GetThreadOut

type GetThreadOut struct {
	Thread *api.Thread
}

type IsMulticlientIn

type IsMulticlientIn struct {
}

type IsMulticlientOut

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 {
}

type ListBreakpointsOut

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

type ListCheckpointsIn

type ListCheckpointsIn struct {
}

type ListCheckpointsOut

type ListCheckpointsOut struct {
	Checkpoints []api.Checkpoint
}

type ListDynamicLibrariesIn

type ListDynamicLibrariesIn struct {
}

ListDynamicLibrariesIn holds the arguments of ListDynamicLibraries

type ListDynamicLibrariesOut

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
}

type ListFunctionsOut

type ListFunctionsOut struct {
	Funcs []string
}

type ListGoroutinesIn

type ListGoroutinesIn struct {
	Start int
	Count int
}

type ListGoroutinesOut

type ListGoroutinesOut struct {
	Goroutines []*api.Goroutine
	Nextg      int
}

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.5.0

type ListPackagesBuildInfoIn struct {
	IncludeFiles bool
}

ListPackagesBuildInfoIn holds the arguments of ListPackages.

type ListPackagesBuildInfoOut added in v1.5.0

type ListPackagesBuildInfoOut struct {
	List []api.PackageBuildInfo
}

ListPackagesBuildInfoOut holds the return values of ListPackages.

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 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 LogClient

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

func (*LogClient) Close

func (c *LogClient) Close() error

func (*LogClient) Read

func (c *LogClient) Read(buf []byte) (int, error)

func (*LogClient) Write

func (c *LogClient) Write(buf []byte) (int, error)

type ProcessExitedError

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

func (*ProcessExitedError) Error

func (err *ProcessExitedError) Error() 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 NewClient

func NewClient(addr string, logFile io.Writer) (*RPCClient, error)

NewClient creates a new RPCClient.

func (*RPCClient) AmendBreakpoint

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

func (*RPCClient) Ancestors

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

func (*RPCClient) AttachedToExistingProcess

func (c *RPCClient) AttachedToExistingProcess() bool

func (*RPCClient) Call added in v1.5.0

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

func (*RPCClient) CallAPI

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

func (*RPCClient) CancelNext

func (c *RPCClient) CancelNext() error

func (*RPCClient) Checkpoint

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

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.0

func (c *RPCClient) CoreDumpCancel() error

func (*RPCClient) CoreDumpStart added in v1.6.0

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

func (*RPCClient) CoreDumpWait added in v1.6.0

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

func (*RPCClient) CreateBreakpoint

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

func (*RPCClient) Detach

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

func (*RPCClient) DirectionCongruentContinue added in v1.4.0

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)

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) Disconnect

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.5.0

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, error)

func (*RPCClient) FunctionReturnLocations added in v1.5.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) GetState

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

func (*RPCClient) GetStateNonBlocking

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

func (c *RPCClient) IsMulticlient() bool

func (*RPCClient) LastModified

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

func (*RPCClient) ListBreakpoints

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

func (*RPCClient) ListCheckpoints

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

ListCheckpoints gets all checkpoints.

func (*RPCClient) ListDynamicLibraries added in v1.5.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) ([]string, error)

func (*RPCClient) ListGoroutines

func (c *RPCClient) ListGoroutines(start, count int) ([]*api.Goroutine, int, 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) ListScopeRegisters added in v1.5.0

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) ListThreadRegisters added in v1.5.0

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

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

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.0

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

func (*RPCClient) ReverseStep added in v1.4.0

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

func (*RPCClient) ReverseStepInstruction added in v1.4.0

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

func (*RPCClient) ReverseStepOut added in v1.4.0

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

func (*RPCClient) Rewind

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

func (*RPCClient) Running

func (c *RPCClient) Running() bool

func (*RPCClient) SetReturnValuesLoadConfig

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, 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() (*api.DebuggerState, error)

func (*RPCClient) StepOut

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

func (*RPCClient) StopRecording added in v1.3.0

func (c *RPCClient) StopRecording() 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)

func (*RPCClient) ToggleBreakpoint added in v1.6.0

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

func (*RPCClient) ToggleBreakpointByName added in v1.6.0

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

func (*RPCClient) TraceDirectory

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

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

func (*RPCClient) WaitForRecordingDone added in v1.3.0

func (c *RPCClient) WaitForRecordingDone()

type RecordedIn

type RecordedIn struct {
}

type RecordedOut

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     int
	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.3.0

type StopRecordingIn struct {
}

type StopRecordingOut added in v1.3.0

type StopRecordingOut struct {
}

type ToggleBreakpointIn added in v1.6.0

type ToggleBreakpointIn struct {
	Id   int
	Name string
}

type ToggleBreakpointOut added in v1.6.0

type ToggleBreakpointOut struct {
	Breakpoint *api.Breakpoint
}

Jump to

Keyboard shortcuts

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