forked from qt-creator/qt-creator
Debugger: Simplify GdbEngine::handleExecRun
Combine two branches. The function is only used in the remote and the local plain case, and the resulting actions were the same. Change-Id: I30c0b4488f04667d88b69f2c8ecd1dead92e0766 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -4464,32 +4464,13 @@ void GdbEngine::handleExecRun(const DebuggerResponse &response)
|
|||||||
{
|
{
|
||||||
CHECK_STATE(EngineRunRequested);
|
CHECK_STATE(EngineRunRequested);
|
||||||
|
|
||||||
if (isRemoteEngine()) {
|
if (response.resultClass == ResultRunning) {
|
||||||
|
notifyEngineRunAndInferiorRunOk();
|
||||||
if (response.resultClass == ResultRunning) {
|
showMessage("INFERIOR STARTED");
|
||||||
notifyEngineRunAndInferiorRunOk();
|
showMessage(msgInferiorSetupOk(), StatusBar);
|
||||||
showMessage("INFERIOR STARTED");
|
} else {
|
||||||
showMessage(msgInferiorSetupOk(), StatusBar);
|
showMessage(response.data["msg"].data());
|
||||||
} else {
|
notifyEngineRunFailed();
|
||||||
showMessage(response.data["msg"].data());
|
|
||||||
notifyEngineRunFailed();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (isPlainEngine()) {
|
|
||||||
|
|
||||||
if (response.resultClass == ResultRunning) {
|
|
||||||
notifyEngineRunAndInferiorRunOk(); // For gdb < 7.0
|
|
||||||
//showStatusMessage(tr("Running..."));
|
|
||||||
showMessage("INFERIOR STARTED");
|
|
||||||
showMessage(msgInferiorSetupOk(), StatusBar);
|
|
||||||
} else {
|
|
||||||
QString msg = response.data["msg"].data();
|
|
||||||
//QTC_CHECK(status() == InferiorRunOk);
|
|
||||||
//interruptInferior();
|
|
||||||
showMessage(msg);
|
|
||||||
notifyEngineRunFailed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user