forked from qt-creator/qt-creator
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: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
committed by
Tobias Nätterlund
parent
51a257637e
commit
5fb7e6f1f7
@@ -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 @@
|
|||||||
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
|
|||||||
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user