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()
|
threads := dbp.ThreadList()
|
||||||
|
|
||||||
callInjectionDone, err := callInjectionProtocol(dbp, threads)
|
callInjectionDone, callErr := callInjectionProtocol(dbp, threads)
|
||||||
if err != nil {
|
// callErr check delayed until after pickCurrentThread, which must always
|
||||||
return err
|
// happen, otherwise the debugger could be left in an inconsistent
|
||||||
}
|
// state.
|
||||||
|
|
||||||
if err := pickCurrentThread(dbp, trapthread, threads); err != nil {
|
if err := pickCurrentThread(dbp, trapthread, threads); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if callErr != nil {
|
||||||
|
return callErr
|
||||||
|
}
|
||||||
|
|
||||||
curthread := dbp.CurrentThread()
|
curthread := dbp.CurrentThread()
|
||||||
curbp := curthread.Breakpoint()
|
curbp := curthread.Breakpoint()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user