Skip to content
Snippets Groups Projects
Commit 466eb0b0 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/3.0' into 3.1

parents ef8b1916 e8d4349c
No related branches found
No related tags found
No related merge requests found
...@@ -29,13 +29,21 @@ ...@@ -29,13 +29,21 @@
#include "qnxanalyzesupport.h" #include "qnxanalyzesupport.h"
#include "qnxdeviceconfiguration.h"
#include "qnxrunconfiguration.h"
#include "slog2inforunner.h"
#include <analyzerbase/analyzerruncontrol.h> #include <analyzerbase/analyzerruncontrol.h>
#include <analyzerbase/analyzerstartparameters.h> #include <analyzerbase/analyzerstartparameters.h>
#include <projectexplorer/devicesupport/deviceapplicationrunner.h> #include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
#include <QFileInfo>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Qnx; using namespace Qnx;
...@@ -59,6 +67,16 @@ QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig, ...@@ -59,6 +67,16 @@ QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig,
SLOT(handleAdapterSetupRequested())); SLOT(handleAdapterSetupRequested()));
connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)), connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
SLOT(remoteIsRunning())); SLOT(remoteIsRunning()));
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit());
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
const QString applicationId = QFileInfo(runConfig->remoteExecutableFilePath()).fileName();
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(showMessage(QString,Utils::OutputFormat)));
connect(runner, SIGNAL(remoteProcessStarted()), m_slog2Info, SLOT(start()));
if (qnxDevice->qnxVersion() > 0x060500)
connect(m_slog2Info, SIGNAL(commandMissing()), this, SLOT(printMissingWarning()));
} }
void QnxAnalyzeSupport::handleAdapterSetupRequested() void QnxAnalyzeSupport::handleAdapterSetupRequested()
...@@ -89,13 +107,15 @@ void QnxAnalyzeSupport::startExecution() ...@@ -89,13 +107,15 @@ void QnxAnalyzeSupport::startExecution()
void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success) void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success)
{ {
if (m_runControl || state() == Inactive) if (!m_runControl)
return; return;
if (!success) if (!success)
showMessage(tr("The %1 process closed unexpectedly.").arg(executable()), showMessage(tr("The %1 process closed unexpectedly.").arg(executable()),
Utils::NormalMessageFormat); Utils::NormalMessageFormat);
m_runControl->notifyRemoteFinished(success); m_runControl->notifyRemoteFinished(success);
m_slog2Info->stop();
} }
void QnxAnalyzeSupport::handleProfilingFinished() void QnxAnalyzeSupport::handleProfilingFinished()
...@@ -137,3 +157,8 @@ void QnxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat form ...@@ -137,3 +157,8 @@ void QnxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat form
m_runControl->logApplicationMessage(msg, format); m_runControl->logApplicationMessage(msg, format);
m_outputParser.processOutput(msg); m_outputParser.processOutput(msg);
} }
void QnxAnalyzeSupport::printMissingWarning()
{
showMessage(tr("Warning: \"slog2info\" is not found on the device, debug output not available!"), Utils::ErrorMessageFormat);
}
...@@ -42,6 +42,7 @@ namespace Qnx { ...@@ -42,6 +42,7 @@ namespace Qnx {
namespace Internal { namespace Internal {
class QnxRunConfiguration; class QnxRunConfiguration;
class Slog2InfoRunner;
class QnxAnalyzeSupport : public QnxAbstractRunSupport class QnxAnalyzeSupport : public QnxAbstractRunSupport
{ {
...@@ -60,15 +61,19 @@ private slots: ...@@ -60,15 +61,19 @@ private slots:
void handleRemoteOutput(const QByteArray &output); void handleRemoteOutput(const QByteArray &output);
void handleError(const QString &error); void handleError(const QString &error);
void showMessage(const QString &, Utils::OutputFormat);
void printMissingWarning();
void remoteIsRunning(); void remoteIsRunning();
private: private:
void startExecution(); void startExecution();
void showMessage(const QString &, Utils::OutputFormat);
Analyzer::AnalyzerRunControl *m_runControl; Analyzer::AnalyzerRunControl *m_runControl;
QmlDebug::QmlOutputParser m_outputParser; QmlDebug::QmlOutputParser m_outputParser;
int m_qmlPort; int m_qmlPort;
Slog2InfoRunner *m_slog2Info;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -127,6 +127,7 @@ static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfigu ...@@ -127,6 +127,7 @@ static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfigu
if (mode == QmlProfilerRunMode) if (mode == QmlProfilerRunMode)
params.startMode = StartLocal; params.startMode = StartLocal;
params.runMode = mode;
params.debuggee = runConfig->remoteExecutableFilePath(); params.debuggee = runConfig->remoteExecutableFilePath();
params.debuggeeArgs = runConfig->arguments().join(QLatin1String(" ")); params.debuggeeArgs = runConfig->arguments().join(QLatin1String(" "));
params.connParams = DeviceKitInformation::device(runConfig->target()->kit())->sshParameters(); params.connParams = DeviceKitInformation::device(runConfig->target()->kit())->sshParameters();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment