service,terminal: propagating simultaneous breakpoints

This commit is contained in:
aarzilli
2015-10-29 10:59:22 +01:00
parent a9e2696f46
commit 708cf2f290
7 changed files with 166 additions and 113 deletions

View File

@ -66,7 +66,21 @@ func (c *RPCClient) Continue() <-chan *api.DebuggerState {
state.Err = fmt.Errorf("Process %d has exited with status %d", c.ProcessPid(), state.ExitStatus)
}
ch <- state
if err != nil || state.Exited || state.Breakpoint == nil || !state.Breakpoint.Tracepoint {
if err != nil || state.Exited {
close(ch)
return
}
isbreakpoint := false
istracepoint := true
for i := range state.Threads {
if state.Threads[i].Breakpoint != nil {
isbreakpoint = true
istracepoint = istracepoint && state.Threads[i].Breakpoint.Tracepoint
}
}
if !isbreakpoint || !istracepoint {
close(ch)
return
}