forked from qt-creator/qt-creator
Maemo: Make QML debugging engine aware of early inferior exit.
This commit is contained in:
@@ -295,31 +295,32 @@ void MaemoDebugSupport::startDebugging()
|
|||||||
.arg(m_qmlPort);
|
.arg(m_qmlPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString remoteCommandLine;
|
const QString remoteCommandLine = m_debuggingType == MaemoRunConfiguration::DebugQmlOnly
|
||||||
if (m_debuggingType == MaemoRunConfiguration::DebugQmlOnly) {
|
? QString::fromLocal8Bit("%1 %2 %3 %4").arg(cmdPrefix).arg(env)
|
||||||
remoteCommandLine = QString::fromLocal8Bit("%1 %2 %3 %4")
|
.arg(remoteExe).arg(args)
|
||||||
.arg(cmdPrefix).arg(env).arg(remoteExe).arg(args);
|
: QString::fromLocal8Bit("%1 %2 gdbserver :%3 %4 %5")
|
||||||
} else {
|
|
||||||
remoteCommandLine = QString::fromLocal8Bit("%1 %2 gdbserver :%3 %4 %5")
|
|
||||||
.arg(cmdPrefix).arg(env).arg(m_gdbServerPort)
|
.arg(cmdPrefix).arg(env).arg(m_gdbServerPort)
|
||||||
.arg(remoteExe).arg(args);
|
.arg(remoteExe).arg(args);
|
||||||
connect(m_runner, SIGNAL(remoteProcessFinished(qint64)),
|
connect(m_runner, SIGNAL(remoteProcessFinished(qint64)),
|
||||||
SLOT(handleGdbServerFinished(qint64)));
|
SLOT(handleRemoteProcessFinished(qint64)));
|
||||||
}
|
|
||||||
|
|
||||||
m_runner->startExecution(remoteCommandLine.toUtf8());
|
m_runner->startExecution(remoteCommandLine.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoDebugSupport::handleGdbServerFinished(qint64 exitCode)
|
void MaemoDebugSupport::handleRemoteProcessFinished(qint64 exitCode)
|
||||||
{
|
{
|
||||||
if (!m_engine || m_state == Inactive || exitCode == 0)
|
if (!m_engine || m_state == Inactive || exitCode == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_state == Debugging)
|
if (m_state == Debugging) {
|
||||||
|
if (m_debuggingType != MaemoRunConfiguration::DebugQmlOnly)
|
||||||
m_engine->notifyInferiorIll();
|
m_engine->notifyInferiorIll();
|
||||||
else
|
} else {
|
||||||
m_engine->handleRemoteSetupFailed(tr("The gdbserver process closed unexpectedly."));
|
const QString errorMsg = m_debuggingType == MaemoRunConfiguration::DebugQmlOnly
|
||||||
|
? tr("Remote application failed with exit code %1.").arg(exitCode)
|
||||||
|
: tr("The gdbserver process closed unexpectedly.");
|
||||||
|
m_engine->handleRemoteSetupFailed(errorMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoDebugSupport::handleDebuggingFinished()
|
void MaemoDebugSupport::handleDebuggingFinished()
|
||||||
|
|||||||
@@ -80,7 +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);
|
void handleRemoteProcessFinished(qint64 exitCode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum State {
|
enum State {
|
||||||
|
|||||||
Reference in New Issue
Block a user