From a68aff709fe2851ec0991fde9d2459b8e8adeabe Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 23 Jun 2011 16:43:30 +0200 Subject: [PATCH] Debugger[CDB]: Do not detach on shutdown in case of console. Do not use effectiveStartMode in shutdown. Change-Id: Ia300f511f335de4a7d9d7c07e2080cecc91042e4 Reviewed-on: http://codereview.qt.nokia.com/680 Reviewed-by: Qt Sanity Bot Reviewed-by: Friedemann Kleint --- src/plugins/debugger/cdb/cdbengine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index dffafdca6da..11b75666cfc 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -866,8 +866,8 @@ void CdbEngine::shutdownInferior() return; } - if (m_accessible) { - if (m_effectiveStartMode == AttachExternal || m_effectiveStartMode == AttachCrashedExternal) + if (m_accessible) { // except console. + if (startParameters().startMode == AttachExternal || startParameters().startMode == AttachCrashedExternal) detachDebugger(); STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorShutdownOk") notifyInferiorShutdownOk(); @@ -915,8 +915,8 @@ void CdbEngine::shutdownEngine() m_ignoreCdbOutput = true; // Go for kill if there are commands pending. if (m_accessible && !commandsPending()) { - // detach: Wait for debugger to finish. - if (m_effectiveStartMode == AttachExternal) + // detach (except console): Wait for debugger to finish. + if (startParameters().startMode == AttachExternal || startParameters().startMode == AttachCrashedExternal) detachDebugger(); // Remote requires a bit more force to quit. if (m_effectiveStartMode == AttachToRemote) {