mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
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:
@ -383,6 +383,9 @@ func (dbp *Process) resume() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := dbp.Halt(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if dbp.CurrentThread != thread {
|
if dbp.CurrentThread != thread {
|
||||||
dbp.SwitchThread(thread.Id)
|
dbp.SwitchThread(thread.Id)
|
||||||
}
|
}
|
||||||
@ -390,7 +393,7 @@ func (dbp *Process) resume() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if dbp.CurrentBreakpoint != nil || dbp.halt {
|
if dbp.CurrentBreakpoint() != nil || dbp.halt {
|
||||||
return dbp.Halt()
|
return dbp.Halt()
|
||||||
}
|
}
|
||||||
// Check to see if we hit a runtime.breakpoint
|
// Check to see if we hit a runtime.breakpoint
|
||||||
@ -402,10 +405,8 @@ func (dbp *Process) resume() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dbp.Halt()
|
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
return fmt.Errorf("unrecognized breakpoint %#v", pc)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Single step, will execute a single instruction.
|
// Single step, will execute a single instruction.
|
||||||
|
|||||||
Reference in New Issue
Block a user