diff options
| author | hjk <qtc-committer@nokia.com> | 2009-02-17 16:25:48 +0100 |
|---|---|---|
| committer | hjk <qtc-committer@nokia.com> | 2009-02-17 17:44:56 +0100 |
| commit | 5a07f48691068aa2aaecce78ab042b8af586c642 (patch) | |
| tree | 1d8d1b35affaa8d33b62255ca86d05a7f7f53d4b /src/plugins/debugger/gdbengine.cpp | |
| parent | fff32b5fd266d9fde7ca762d65019ea897833064 (diff) | |
| download | qt-creator-5a07f48691068aa2aaecce78ab042b8af586c642.tar.gz | |
Fixes: debugger: on async output, first handle all cases where
the inferior exited.
Details: that catches early exits due to startup problems as well
Diffstat (limited to 'src/plugins/debugger/gdbengine.cpp')
| -rw-r--r-- | src/plugins/debugger/gdbengine.cpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index 01db793c35..37f35929ed 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -1115,9 +1115,34 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data) { const QString reason = data.findChild("reason").data(); + if (isExitedReason(reason)) { + qq->notifyInferiorExited(); + QString msg = "Program exited normally"; + if (reason == "exited") { + msg = "Program exited with exit code " + + data.findChild("exit-code").toString(); + } else if (reason == "exited-signalled") { + msg = "Program exited after receiving signal " + + data.findChild("signal-name").toString(); + } else if (reason == "signal-received") { + msg = "Program exited after receiving signal " + + data.findChild("signal-name").toString(); + } + q->showStatusMessage(msg); + // FIXME: shouldn't this use a statis change? + debugMessage("CALLING PARENT EXITDEBUGGER"); + q->exitDebugger(); + return; + } + + //MAC: bool isFirstStop = data.findChild("bkptno").data() == "1"; //!MAC: startSymbolName == data.findChild("frame").findChild("func") if (m_waitingForFirstBreakpointToBeHit) { + // If the executable dies already that early we might get something + // like stdout:49*stopped,reason="exited",exit-code="0177" + // This is handled now above. + qq->notifyInferiorStopped(); m_waitingForFirstBreakpointToBeHit = false; // @@ -1200,26 +1225,6 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data) return; } - if (isExitedReason(reason)) { - qq->notifyInferiorExited(); - QString msg = "Program exited normally"; - if (reason == "exited") { - msg = "Program exited with exit code " - + data.findChild("exit-code").toString(); - } else if (reason == "exited-signalled") { - msg = "Program exited after receiving signal " - + data.findChild("signal-name").toString(); - } else if (reason == "signal-received") { - msg = "Program exited after receiving signal " - + data.findChild("signal-name").toString(); - } - q->showStatusMessage(msg); - // FIXME: shouldn't this use a statis change? - debugMessage("CALLING PARENT EXITDEBUGGER"); - q->exitDebugger(); - return; - } - //tryLoadCustomDumpers(); // jump over well-known frames |
