Always stop the world after trapWait in resume

We do not need to verify a current breakpoint, nor do a redundant check
on whether we have been asked to manually halt. Assume trapWait has done
its due diligence and stop the world once it returns.
This commit is contained in:
Derek Parker
2015-07-09 23:13:20 -05:00
parent 587a758afa
commit aa71d787aa

View File

@ -383,6 +383,9 @@ func (dbp *Process) resume() error {
if err != nil {
return err
}
if err := dbp.Halt(); err != nil {
return err
}
if dbp.CurrentThread != thread {
dbp.SwitchThread(thread.Id)
}
@ -390,7 +393,7 @@ func (dbp *Process) resume() error {
if err != nil {
return err
}
if dbp.CurrentBreakpoint != nil || dbp.halt {
if dbp.CurrentBreakpoint() != nil || dbp.halt {
return dbp.Halt()
}
// Check to see if we hit a runtime.breakpoint
@ -402,10 +405,8 @@ func (dbp *Process) resume() error {
return err
}
}
return dbp.Halt()
}
return fmt.Errorf("unrecognized breakpoint %#v", pc)
return nil
}
// Single step, will execute a single instruction.