summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-12 17:34:34 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-12 19:56:58 +0200
commit199dfbb4851ef62a665823910c7b4689a1a8afb6 (patch)
tree8dac5fb03c9aa7f6e676be6eb1efea752da12387
parentaa898a531298409c68c518398e876f025399b0a9 (diff)
downloadqt-creator-199dfbb4851ef62a665823910c7b4689a1a8afb6.tar.gz
fix gdb shutdown logic on gdb crash
Reviewed-by: hjk
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 65f866b583..130d4608b2 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -205,14 +205,17 @@ void GdbEngine::initializeVariables()
void GdbEngine::gdbProcError(QProcess::ProcessError error)
{
QString msg;
+ bool kill = true;
switch (error) {
case QProcess::FailedToStart:
+ kill = false;
msg = tr("The Gdb process failed to start. Either the "
"invoked program '%1' is missing, or you may have insufficient "
"permissions to invoke the program.")
.arg(theDebuggerStringSetting(GdbLocation));
break;
case QProcess::Crashed:
+ kill = false;
msg = tr("The Gdb process crashed some time after starting "
"successfully.");
break;
@@ -238,7 +241,8 @@ void GdbEngine::gdbProcError(QProcess::ProcessError error)
q->showStatusMessage(msg);
QMessageBox::critical(q->mainWindow(), tr("Error"), msg);
// act as if it was closed by the core
- q->exitDebugger();
+ if (kill)
+ q->exitDebugger();
}
void GdbEngine::uploadProcError(QProcess::ProcessError error)