dlv: Misc refactors

This commit is contained in:
Hubert Krauze
2016-03-09 15:11:58 +00:00
committed by Derek Parker
parent ff0ec8ce00
commit 37f124817d
12 changed files with 71 additions and 77 deletions

View File

@ -396,16 +396,16 @@ func (thread *Thread) onRuntimeBreakpoint() bool {
return loc.Fn != nil && loc.Fn.Name == "runtime.breakpoint"
}
// Returns true if this thread is on the goroutine requested by the current 'next' command
func (th *Thread) onNextGoroutine() (bool, error) {
// onNextGorutine returns true if this thread is on the goroutine requested by the current 'next' command
func (thread *Thread) onNextGoroutine() (bool, error) {
var bp *Breakpoint
for i := range th.dbp.Breakpoints {
if th.dbp.Breakpoints[i].Temp {
bp = th.dbp.Breakpoints[i]
for i := range thread.dbp.Breakpoints {
if thread.dbp.Breakpoints[i].Temp {
bp = thread.dbp.Breakpoints[i]
}
}
if bp == nil {
return false, nil
}
return bp.checkCondition(th)
return bp.checkCondition(thread)
}