Debugger: Centralize abort handling

... and apply even more force on the second trying by forcing
ramp down of the runControl itself instead of hoping that it
would pick up hints.

Change-Id: I9d0f4130cb9a137b91c9fa81c3d255f236f98be0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-19 12:31:19 +02:00
parent ed2ae5fa81
commit 526e217ce9
10 changed files with 27 additions and 39 deletions

View File

@@ -1353,8 +1353,17 @@ void DebuggerEngine::quitDebugger()
void DebuggerEngine::abortDebugger()
{
// Overridden in e.g. GdbEngine.
quitDebugger();
if (!isDying()) {
// Be friendly the first time. This will change targetState().
showMessage("ABORTING DEBUGGER. FIRST TIME.");
quitDebugger();
} else {
// We already tried. Try harder.
showMessage("ABORTING DEBUGGER. SECOND TIME.");
abortDebuggerProcess();
if (runControl())
runControl()->initiateFinish();
}
}
void DebuggerEngine::requestInterruptInferior()