Documentation ¶
Index ¶
- func ShortType(typ string) string
- type GiDelve
- func (gd *GiDelve) AmendBreak(id int, fname string, line int, cond string, trace bool) error
- func (gd *GiDelve) AttachedToExistingProcess() bool
- func (gd *GiDelve) Call(goroutineID int, expr string, unsafe bool) (*cdebug.State, error)
- func (gd *GiDelve) CancelNext() error
- func (gd *GiDelve) ClearBreak(id int) error
- func (gd *GiDelve) ClearBreakByName(name string) (*cdebug.Break, error)
- func (gd *GiDelve) Continue(all *cdebug.AllState) <-chan *cdebug.State
- func (gd *GiDelve) CurThreadID(all *cdebug.AllState) int
- func (gd *GiDelve) Detach(killProcess bool) error
- func (gd *GiDelve) Disconnect(cont bool) error
- func (gd *GiDelve) FindFrames(all *cdebug.AllState, fname string, line int) ([]*cdebug.Frame, error)
- func (gd *GiDelve) FollowPtr(vr *cdebug.Variable) error
- func (gd *GiDelve) GetBreak(id int) (*cdebug.Break, error)
- func (gd *GiDelve) GetBreakByName(name string) (*cdebug.Break, error)
- func (gd *GiDelve) GetState() (*cdebug.State, error)
- func (gd *GiDelve) GetThread(id int) (*cdebug.Thread, error)
- func (gd *GiDelve) GetVar(expr string, threadID int, frame int) (*cdebug.Variable, error)
- func (gd *GiDelve) HasTasks() bool
- func (gd *GiDelve) InitAllState(all *cdebug.AllState) error
- func (gd *GiDelve) IsActive() bool
- func (gd *GiDelve) LastModified() time.Time
- func (gd *GiDelve) ListBreaks() ([]*cdebug.Break, error)
- func (gd *GiDelve) ListFuncs(filter string) ([]string, error)
- func (gd *GiDelve) ListGlobalVars(filter string) ([]*cdebug.Variable, error)
- func (gd *GiDelve) ListSources(filter string) ([]string, error)
- func (gd *GiDelve) ListTasks() ([]*cdebug.Task, error)
- func (gd *GiDelve) ListThreads() ([]*cdebug.Thread, error)
- func (gd *GiDelve) ListTypes(filter string) ([]string, error)
- func (gd *GiDelve) ListVars(threadID int, frame int) ([]*cdebug.Variable, error)
- func (gd *GiDelve) LogErr(err error) error
- func (gd *GiDelve) ProcessPid() int
- func (gd *GiDelve) Restart() error
- func (gd *GiDelve) RestartFrom(pos string, resetArgs bool, newArgs []string) error
- func (gd *GiDelve) SetBreak(fname string, line int) (*cdebug.Break, error)
- func (gd *GiDelve) SetParams(params *cdebug.Params)
- func (gd *GiDelve) SetVar(name, value string, threadID int, frame int) error
- func (gd *GiDelve) Stack(goroutineID int, depth int) ([]*cdebug.Frame, error)
- func (gd *GiDelve) Start(path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) error
- func (gd *GiDelve) StartedCheck() error
- func (gd *GiDelve) StepInto() (*cdebug.State, error)
- func (gd *GiDelve) StepOut() (*cdebug.State, error)
- func (gd *GiDelve) StepOver() (*cdebug.State, error)
- func (gd *GiDelve) StepSingle() (*cdebug.State, error)
- func (gd *GiDelve) Stop() (*cdebug.State, error)
- func (gd *GiDelve) SwitchTask(goroutineID int) (*cdebug.State, error)
- func (gd *GiDelve) SwitchThread(threadID int) (*cdebug.State, error)
- func (gd *GiDelve) UpdateAllState(all *cdebug.AllState, threadID int, frame int) error
- func (gd *GiDelve) UpdateBreaks(brk *[]*cdebug.Break) error
- func (gd *GiDelve) WriteToConsole(msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GiDelve ¶
type GiDelve struct {
// contains filtered or unexported fields
}
GiDelve is the Delve implementation of the GiDebug interface
func NewGiDelve ¶
func NewGiDelve(path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) (*GiDelve, error)
NewGiDelve creates a new debugger exe and client for given path, and project root path test = run in test mode, and args are optional additional args to pass to the debugger.
func (*GiDelve) AmendBreak ¶
AmmendBreak 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
func (*GiDelve) AttachedToExistingProcess ¶
Returns whether we attached to a running process or not
func (*GiDelve) CancelNext ¶
Cancels a Next or Step call that was interrupted by a manual stop or by another breakpoint
func (*GiDelve) ClearBreak ¶
ClearBreak deletes a breakpoint by ID.
func (*GiDelve) ClearBreakByName ¶
ClearBreakByName deletes a breakpoint by name
func (*GiDelve) CurThreadID ¶
CurThreadID returns the proper current threadID (task or thread) based on debugger, from given state.
func (*GiDelve) Disconnect ¶
Disconnect closes the connection to the server without sending a Detach request first. If cont is true a continue command will be sent instead.
func (*GiDelve) FindFrames ¶
func (gd *GiDelve) FindFrames(all *cdebug.AllState, fname string, line int) ([]*cdebug.Frame, error)
FindFrames looks through the Stacks of all Tasks / Threads for the closest Stack Frame to given file and line number. Results are sorted by line number proximity to given line.
func (*GiDelve) GetBreakByName ¶
GetBreakByName gets a breakpoint by name.
func (*GiDelve) GetState ¶
GetState returns the current debugger state. This will return immediately -- if the target is running then the Running flag will be set and a Stop bus be called to get any further information about the target.
func (*GiDelve) GetVar ¶
GetVariable returns a variable based on expression in the context of the current thread.
func (*GiDelve) InitAllState ¶
InitAllState initializes the given AllState with relevant info for current state of things. Does Not get AllVars
func (*GiDelve) LastModified ¶
LastModified returns the time that the process' executable was modified.
func (*GiDelve) ListBreaks ¶
ListBreaks gets all breakpoints.
func (*GiDelve) ListGlobalVars ¶
ListGlobalVars lists all package variables in the context of the current thread.
func (*GiDelve) ListSources ¶
ListSources lists all source files in the process matching filter.
func (*GiDelve) ListThreads ¶
ListThreads lists all threads.
func (*GiDelve) ProcessPid ¶
Returns the pid of the process we are debugging.
func (*GiDelve) RestartFrom ¶
Restarts program from the specified position.
func (*GiDelve) Start ¶
func (gd *GiDelve) Start(path, rootPath string, outbuf *texteditor.Buffer, pars *cdebug.Params) error
Start starts the debugger for a given exe path
func (*GiDelve) StartedCheck ¶
StartedCheck checks that delve client is running properly
func (*GiDelve) StepSingle ¶
StepSingle steps a single cpu instruction.
func (*GiDelve) SwitchTask ¶
SwitchTask switches the current goroutine (and the current thread as well)
func (*GiDelve) SwitchThread ¶
SwitchThread switches the current thread context.
func (*GiDelve) UpdateAllState ¶
UpdateAllState updates the state for given threadId and frame number (only info different from current results is updated). For given thread (lowest-level supported by language, e.g., Task if supported, else Thread), and frame number.
func (*GiDelve) UpdateBreaks ¶
UpdateBreaks updates current breakpoints based on given list of breakpoints. first gets the current list, and does actions to ensure that the list is set.