proc: keep debugger state consistent if callInjectionProtocol fails
pickCurrentThread should always run.
This commit is contained in:
parent
6102c31d6d
commit
bb2525a7d5
@ -78,15 +78,19 @@ func (dbp *Target) Continue() error {
|
||||
|
||||
threads := dbp.ThreadList()
|
||||
|
||||
callInjectionDone, err := callInjectionProtocol(dbp, threads)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
callInjectionDone, callErr := callInjectionProtocol(dbp, threads)
|
||||
// callErr check delayed until after pickCurrentThread, which must always
|
||||
// happen, otherwise the debugger could be left in an inconsistent
|
||||
// state.
|
||||
|
||||
if err := pickCurrentThread(dbp, trapthread, threads); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if callErr != nil {
|
||||
return callErr
|
||||
}
|
||||
|
||||
curthread := dbp.CurrentThread()
|
||||
curbp := curthread.Breakpoint()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user