forked from qt-creator/qt-creator
Debugger: Rework 'Attach to unstarted application' startup
Change-Id: I42c7ce8e413c850e05b02f5d6fe1b83376436c65 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -89,12 +89,17 @@ void GdbAttachEngine::handleAttach(const DebuggerResponse &response)
|
||||
case ResultRunning:
|
||||
showMessage(_("INFERIOR ATTACHED"));
|
||||
if (state() == EngineRunRequested) {
|
||||
// FIXME: Really? Looks like we are always stopped already.
|
||||
// Happens e.g. for "Attach to unstarted application"
|
||||
// We will get a '*stopped' later that we'll interpret as 'spontaneous'
|
||||
// So acknowledge the current state and put a delayed 'continue' in the pipe.
|
||||
showMessage(msgAttachedToStoppedInferior(), StatusBar);
|
||||
showMessage(tr("Attached to running application"), StatusBar);
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
interruptInferior();
|
||||
} else {
|
||||
// InferiorStopOk, e.g. for "Attach to running application".
|
||||
// The *stopped came in between sending the 'attach' and
|
||||
// receiving its '^done'.
|
||||
if (startParameters().continueAfterAttach)
|
||||
continueInferiorInternal();
|
||||
}
|
||||
break;
|
||||
case ResultError:
|
||||
|
||||
Reference in New Issue
Block a user