提交 aa71d787 编写于 作者: D Derek Parker

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.
上级 587a758a
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册