summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/debugger/debuggerengine.h49
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp36
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h5
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.cpp30
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.h6
5 files changed, 41 insertions, 85 deletions
diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h
index 99cd156d5a..c09cd0d217 100644
--- a/src/plugins/debugger/debuggerengine.h
+++ b/src/plugins/debugger/debuggerengine.h
@@ -340,44 +340,45 @@ protected:
// The base notify*() function implementation should be sufficient
// in most cases, but engines are free to override them to do some
// engine specific cleanup like stopping timers etc.
- virtual void notifyEngineSetupOk();
- virtual void notifyEngineSetupFailed();
- virtual void notifyEngineRunFailed();
+ void notifyEngineSetupOk();
+ void notifyEngineSetupFailed();
+ void notifyEngineRunFailed();
- virtual void notifyInferiorSetupOk();
- virtual void notifyInferiorSetupFailed();
+ void notifyInferiorSetupOk();
+ void notifyInferiorSetupFailed();
- virtual void notifyEngineRunAndInferiorRunOk();
- virtual void notifyEngineRunAndInferiorStopOk();
- virtual void notifyEngineRunOkAndInferiorUnrunnable(); // Called by CoreAdapter.
+ void notifyEngineRunAndInferiorRunOk();
+ void notifyEngineRunAndInferiorStopOk();
+ void notifyEngineRunOkAndInferiorUnrunnable(); // Called by CoreAdapter.
// Use notifyInferiorRunRequested() plus notifyInferiorRunOk() instead.
- //virtual void notifyInferiorSpontaneousRun();
+ // void notifyInferiorSpontaneousRun();
- virtual void notifyInferiorRunRequested();
- virtual void notifyInferiorRunOk();
- virtual void notifyInferiorRunFailed();
+ void notifyInferiorRunRequested();
+ void notifyInferiorRunOk();
+ void notifyInferiorRunFailed();
- virtual void notifyInferiorStopOk();
- virtual void notifyInferiorSpontaneousStop();
- virtual void notifyInferiorStopFailed();
+ void notifyInferiorStopOk();
+ void notifyInferiorSpontaneousStop();
+ void notifyInferiorStopFailed();
- public:
- virtual void notifyInferiorExited();
+ public: // FIXME: Remove, currently needed for Android.
+ void notifyInferiorExited();
+
+ protected:
void notifyDebuggerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus,
const QString &backendName);
-protected:
virtual void setState(DebuggerState state, bool forced = false);
- virtual void notifyInferiorShutdownOk();
- virtual void notifyInferiorShutdownFailed();
+ void notifyInferiorShutdownOk();
+ void notifyInferiorShutdownFailed();
- virtual void notifyEngineSpontaneousShutdown();
- virtual void notifyEngineShutdownOk();
- virtual void notifyEngineShutdownFailed();
+ void notifyEngineSpontaneousShutdown();
+ void notifyEngineShutdownOk();
+ void notifyEngineShutdownFailed();
- virtual void notifyEngineIll();
+ void notifyEngineIll();
virtual void setupEngine() = 0;
virtual void setupInferior() = 0;
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index e3c2cc3cca..30f0146921 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -4106,14 +4106,6 @@ void GdbEngine::handleAdapterStartFailed(const QString &msg, Id settingsIdHint)
notifyEngineSetupFailed();
}
-void GdbEngine::notifyInferiorSetupFailed()
-{
- // FIXME: that's not enough to stop gdb from getting confused
- // by a timeout of the adapter.
- //resetCommandQueue();
- DebuggerEngine::notifyInferiorSetupFailed();
-}
-
void GdbEngine::prepareForRestart()
{
m_rerunPending = false;
@@ -4191,7 +4183,7 @@ void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response)
}
}
-void GdbEngine::notifyInferiorSetupFailed(const QString &msg)
+void GdbEngine::notifyInferiorSetupFailedHelper(const QString &msg)
{
showStatusMessage(tr("Failed to start application:") + ' ' + msg);
if (state() == EngineSetupFailed) {
@@ -4200,7 +4192,7 @@ void GdbEngine::notifyInferiorSetupFailed(const QString &msg)
}
showMessage("INFERIOR START FAILED");
AsynchronousMessageBox::critical(tr("Failed to start application"), msg);
- DebuggerEngine::notifyInferiorSetupFailed();
+ notifyInferiorSetupFailed();
}
void GdbEngine::handleAdapterCrashed(const QString &msg)
@@ -4633,13 +4625,13 @@ void GdbEngine::handleAttach(const DebuggerResponse &response)
}
case ResultError:
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
- notifyInferiorSetupFailed(msgPtraceError(runParameters().startMode));
+ notifyInferiorSetupFailedHelper(msgPtraceError(runParameters().startMode));
break;
}
- notifyInferiorSetupFailed(response.data["msg"].data());
+ notifyInferiorSetupFailedHelper(response.data["msg"].data());
break;
default:
- notifyInferiorSetupFailed(response.data["msg"].data());
+ notifyInferiorSetupFailedHelper(response.data["msg"].data());
break;
}
@@ -4702,7 +4694,7 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
showMessage(msg, StatusBar);
callTargetRemote(); // Proceed nevertheless.
} else {
- notifyInferiorSetupFailed(msg);
+ notifyInferiorSetupFailedHelper(msg);
}
}
@@ -4718,7 +4710,7 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
"in the core file.")
+ ' ' + tr("Try to specify the binary using the "
"<i>Debug->Start Debugging->Attach to Core</i> dialog.");
- notifyInferiorSetupFailed(msg);
+ notifyInferiorSetupFailedHelper(msg);
}
} else if (isPlainEngine()) {
@@ -4730,7 +4722,7 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
// Extend the message a bit in unknown cases.
if (!msg.endsWith("File format not recognized"))
msg = tr("Starting executable failed:") + '\n' + msg;
- notifyInferiorSetupFailed(msg);
+ notifyInferiorSetupFailedHelper(msg);
}
}
@@ -4817,7 +4809,7 @@ void GdbEngine::handleTargetRemote(const DebuggerResponse &response)
handleInferiorPrepared();
} else {
// 16^error,msg="hd:5555: Connection timed out."
- notifyInferiorSetupFailed(msgConnectRemoteServerFailed(response.data["msg"].data()));
+ notifyInferiorSetupFailedHelper(msgConnectRemoteServerFailed(response.data["msg"].data()));
}
}
@@ -4851,14 +4843,14 @@ void GdbEngine::handleTargetExtendedRemote(const DebuggerResponse &response)
mb->button(QMessageBox::Ok)->setText(tr("Stop Debugging"));
if (mb->exec() == QMessageBox::Ok) {
showMessage("KILLING DEBUGGER AS REQUESTED BY USER");
- notifyInferiorSetupFailed(title);
+ notifyInferiorSetupFailedHelper(title);
} else {
showMessage("CONTINUE DEBUGGER AS REQUESTED BY USER");
handleInferiorPrepared(); // This will likely fail.
}
}
} else {
- notifyInferiorSetupFailed(msgConnectRemoteServerFailed(response.data["msg"].data()));
+ notifyInferiorSetupFailedHelper(msgConnectRemoteServerFailed(response.data["msg"].data()));
}
}
@@ -4869,7 +4861,7 @@ void GdbEngine::handleTargetExtendedAttach(const DebuggerResponse &response)
// gdb server will stop the remote application itself.
handleInferiorPrepared();
} else {
- notifyInferiorSetupFailed(msgConnectRemoteServerFailed(response.data["msg"].data()));
+ notifyInferiorSetupFailedHelper(msgConnectRemoteServerFailed(response.data["msg"].data()));
}
}
@@ -4891,7 +4883,7 @@ void GdbEngine::handleTargetQnx(const DebuggerResponse &response)
handleInferiorPrepared();
} else {
// 16^error,msg="hd:5555: Connection timed out."
- notifyInferiorSetupFailed(response.data["msg"].data());
+ notifyInferiorSetupFailedHelper(response.data["msg"].data());
}
}
@@ -4908,7 +4900,7 @@ void GdbEngine::handleSetNtoExecutable(const DebuggerResponse &response)
}
case ResultError:
default:
- notifyInferiorSetupFailed(response.data["msg"].data());
+ notifyInferiorSetupFailedHelper(response.data["msg"].data());
}
}
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index 01b1d86a49..c7122340f0 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -78,7 +78,6 @@ private: ////////// General Interface //////////
DebuggerEngine *cppEngine() final { return this; }
void handleGdbStartFailed();
- void notifyInferiorSetupFailed() final;
void prepareForRestart() final;
bool hasCapability(unsigned) const final;
@@ -118,8 +117,8 @@ private: ////////// General Interface //////////
void handleDebugInfoLocation(const DebuggerResponse &response);
- // The adapter is still running just fine, but it failed to acquire a debuggee.
- void notifyInferiorSetupFailed(const QString &msg);
+ // The engine is still running just fine, but it failed to acquire a debuggee.
+ void notifyInferiorSetupFailedHelper(const QString &msg);
void notifyAdapterShutdownOk();
void notifyAdapterShutdownFailed();
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp
index d8d0a66404..31742a890e 100644
--- a/src/plugins/debugger/qml/qmlcppengine.cpp
+++ b/src/plugins/debugger/qml/qmlcppengine.cpp
@@ -378,36 +378,6 @@ void QmlCppEngine::setupEngine()
m_cppEngine->setupSlaveEngine();
}
-void QmlCppEngine::notifyEngineRunAndInferiorRunOk()
-{
- EDEBUG("\nMASTER NOTIFY ENGINE RUN AND INFERIOR RUN OK");
- DebuggerEngine::notifyEngineRunAndInferiorRunOk();
-}
-
-void QmlCppEngine::notifyInferiorRunOk()
-{
- EDEBUG("\nMASTER NOTIFY INFERIOR RUN OK");
- DebuggerEngine::notifyInferiorRunOk();
-}
-
-void QmlCppEngine::notifyInferiorSpontaneousStop()
-{
- EDEBUG("\nMASTER SPONTANEOUS STOP OK");
- DebuggerEngine::notifyInferiorSpontaneousStop();
-}
-
-void QmlCppEngine::notifyInferiorShutdownOk()
-{
- EDEBUG("\nMASTER INFERIOR SHUTDOWN OK");
- DebuggerEngine::notifyInferiorShutdownOk();
-}
-
-void QmlCppEngine::notifyInferiorSetupOk()
-{
- EDEBUG("\nMASTER INFERIOR SETUP OK");
- DebuggerEngine::notifyInferiorSetupOk();
-}
-
void QmlCppEngine::setupInferior()
{
EDEBUG("\nMASTER SETUP INFERIOR");
diff --git a/src/plugins/debugger/qml/qmlcppengine.h b/src/plugins/debugger/qml/qmlcppengine.h
index 52442d0e89..38a3c00d56 100644
--- a/src/plugins/debugger/qml/qmlcppengine.h
+++ b/src/plugins/debugger/qml/qmlcppengine.h
@@ -114,12 +114,6 @@ protected:
void quitDebugger() override;
void abortDebugger() override;
- void notifyInferiorRunOk() override;
- void notifyInferiorSpontaneousStop() override;
- void notifyEngineRunAndInferiorRunOk() override;
- void notifyInferiorShutdownOk() override;
-
- void notifyInferiorSetupOk() override;
void loadAdditionalQmlStack() override;
private: