forked from qt-creator/qt-creator
Maemo: Detect unexpected gdbserver exit.
Task-number: QTCREATORBUG-4535
This commit is contained in:
@@ -294,17 +294,34 @@ void MaemoDebugSupport::startDebugging()
|
|||||||
args += QString(QLatin1String(" -qmljsdebugger=port:%1,block"))
|
args += QString(QLatin1String(" -qmljsdebugger=port:%1,block"))
|
||||||
.arg(m_qmlPort);
|
.arg(m_qmlPort);
|
||||||
}
|
}
|
||||||
const QString remoteCommandLine
|
|
||||||
= m_debuggingType == MaemoRunConfiguration::DebugQmlOnly
|
QString remoteCommandLine;
|
||||||
? QString::fromLocal8Bit("%1 %2 %3 %4").arg(cmdPrefix).arg(env)
|
if (m_debuggingType == MaemoRunConfiguration::DebugQmlOnly) {
|
||||||
.arg(remoteExe).arg(args)
|
remoteCommandLine = QString::fromLocal8Bit("%1 %2 %3 %4")
|
||||||
: QString::fromLocal8Bit("%1 %2 gdbserver :%3 %4 %5")
|
.arg(cmdPrefix).arg(env).arg(remoteExe).arg(args);
|
||||||
.arg(cmdPrefix).arg(env).arg(m_gdbServerPort)
|
} else {
|
||||||
.arg(remoteExe).arg(args);
|
remoteCommandLine = QString::fromLocal8Bit("%1 %2 gdbserver :%3 %4 %5")
|
||||||
|
.arg(cmdPrefix).arg(env).arg(m_gdbServerPort)
|
||||||
|
.arg(remoteExe).arg(args);
|
||||||
|
connect(m_runner, SIGNAL(remoteProcessFinished(qint64)),
|
||||||
|
SLOT(handleGdbServerFinished(qint64)));
|
||||||
|
}
|
||||||
|
|
||||||
m_runner->startExecution(remoteCommandLine.toUtf8());
|
m_runner->startExecution(remoteCommandLine.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MaemoDebugSupport::handleGdbServerFinished(qint64 exitCode)
|
||||||
|
{
|
||||||
|
if (!m_engine || m_state == Inactive || exitCode == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_state == Debugging)
|
||||||
|
m_engine->notifyInferiorIll();
|
||||||
|
else
|
||||||
|
m_engine->handleRemoteSetupFailed(tr("The gdbserver process closed unexpectedly."));
|
||||||
|
}
|
||||||
|
|
||||||
void MaemoDebugSupport::handleDebuggingFinished()
|
void MaemoDebugSupport::handleDebuggingFinished()
|
||||||
{
|
{
|
||||||
setState(Inactive);
|
setState(Inactive);
|
||||||
|
@@ -80,6 +80,7 @@ private slots:
|
|||||||
void handleRemoteErrorOutput(const QByteArray &output);
|
void handleRemoteErrorOutput(const QByteArray &output);
|
||||||
void handleProgressReport(const QString &progressOutput);
|
void handleProgressReport(const QString &progressOutput);
|
||||||
void handleRemoteProcessStarted();
|
void handleRemoteProcessStarted();
|
||||||
|
void handleGdbServerFinished(qint64 exitCode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum State {
|
enum State {
|
||||||
|
Reference in New Issue
Block a user