aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-08-17 16:34:43 +0200
committerhjk <hjk@qt.io>2018-08-17 16:03:42 +0000
commit0769b0d65f2805033839fb2f60b35456e62574d2 (patch)
tree24c3013e9d924889e57e17149be8c858be353c57
parent7866f62892d752f6bebb52aa1486b471319e40ea (diff)
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>
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index be3fa49049..a5b80b7e7c 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -4464,32 +4464,13 @@ void GdbEngine::handleExecRun(const DebuggerResponse &response)
{
CHECK_STATE(EngineRunRequested);
- if (isRemoteEngine()) {
-
- if (response.resultClass == ResultRunning) {
- notifyEngineRunAndInferiorRunOk();
- showMessage("INFERIOR STARTED");
- showMessage(msgInferiorSetupOk(), StatusBar);
- } else {
- 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();
- }
-
+ if (response.resultClass == ResultRunning) {
+ notifyEngineRunAndInferiorRunOk();
+ showMessage("INFERIOR STARTED");
+ showMessage(msgInferiorSetupOk(), StatusBar);
+ } else {
+ showMessage(response.data["msg"].data());
+ notifyEngineRunFailed();
}
}