Skip to content
Snippets Groups Projects
Commit 5fb7e6f1 authored by Tobias Nätterlund's avatar Tobias Nätterlund Committed by Tobias Nätterlund
Browse files

QNX: Use slog2info on pure QNX devices for debug output


If available, slog2info should be used even for pure QNX devices
to get hold of the debug output.

Task-number: QTCREATORBUG-10442

Change-Id: If85855e94803a4b8648e84c0295bfdd2271e8d76
Reviewed-by: default avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent 51a25763
No related branches found
No related tags found
No related merge requests found
...@@ -30,16 +30,38 @@ ...@@ -30,16 +30,38 @@
****************************************************************************/ ****************************************************************************/
#include "qnxruncontrol.h" #include "qnxruncontrol.h"
#include "qnxdeviceconfiguration.h"
#include "qnxrunconfiguration.h" #include "qnxrunconfiguration.h"
#include "slog2inforunner.h"
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include <remotelinux/remotelinuxrunconfiguration.h> #include <projectexplorer/target.h>
#include <QFileInfo>
using namespace Qnx; using namespace Qnx;
using namespace Qnx::Internal; using namespace Qnx::Internal;
using namespace RemoteLinux; using namespace RemoteLinux;
QnxRunControl::QnxRunControl(ProjectExplorer::RunConfiguration *runConfig) QnxRunControl::QnxRunControl(ProjectExplorer::RunConfiguration *runConfig)
: RemoteLinuxRunControl(runConfig) : RemoteLinuxRunControl(runConfig)
, m_slog2Info(0)
{
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit());
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
QnxRunConfiguration *qnxRunConfig = qobject_cast<QnxRunConfiguration *>(runConfig);
QTC_CHECK(qnxRunConfig);
const QString applicationId = QFileInfo(qnxRunConfig->remoteExecutableFilePath()).fileName();
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(appendMessage(QString,Utils::OutputFormat)));
connect(this, SIGNAL(started()), m_slog2Info, SLOT(start()));
}
ProjectExplorer::RunControl::StopResult QnxRunControl::stop()
{ {
m_slog2Info->stop();
return RemoteLinuxRunControl::stop();
} }
...@@ -37,11 +37,18 @@ ...@@ -37,11 +37,18 @@
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
class Slog2InfoRunner;
class QnxRunControl : public RemoteLinux::RemoteLinuxRunControl class QnxRunControl : public RemoteLinux::RemoteLinuxRunControl
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QnxRunControl(ProjectExplorer::RunConfiguration *runConfig); explicit QnxRunControl(ProjectExplorer::RunConfiguration *runConfig);
RemoteLinux::RemoteLinuxRunControl::StopResult stop();
private:
Slog2InfoRunner *m_slog2Info;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -52,11 +52,13 @@ class Slog2InfoRunner : public QObject ...@@ -52,11 +52,13 @@ class Slog2InfoRunner : public QObject
public: public:
explicit Slog2InfoRunner(const QString &applicationId, const RemoteLinux::LinuxDevice::ConstPtr &device, QObject *parent = 0); explicit Slog2InfoRunner(const QString &applicationId, const RemoteLinux::LinuxDevice::ConstPtr &device, QObject *parent = 0);
void start();
void stop(); void stop();
bool commandFound() const; bool commandFound() const;
public slots:
void start();
signals: signals:
void commandMissing(); void commandMissing();
void started(); void started();
......
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