2011-06-16 17:03:43 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2012-07-19 12:26:56 +02:00
|
|
|
** Contact: http://www.qt-project.org/
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
|
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
2012-07-25 17:41:01 +02:00
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
#include "remotelinuxdebugsupport.h"
|
|
|
|
|
|
2011-08-02 12:20:16 +02:00
|
|
|
#include "remotelinuxrunconfiguration.h"
|
2011-06-16 17:03:43 +02:00
|
|
|
|
|
|
|
|
#include <debugger/debuggerengine.h>
|
2011-08-02 12:20:16 +02:00
|
|
|
#include <debugger/debuggerstartparameters.h>
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <debugger/debuggerprofileinformation.h>
|
2011-06-16 17:03:43 +02:00
|
|
|
#include <projectexplorer/abi.h>
|
2012-07-25 17:41:01 +02:00
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
2012-07-26 23:29:00 +02:00
|
|
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <projectexplorer/profile.h>
|
2011-06-27 10:11:17 +02:00
|
|
|
#include <projectexplorer/project.h>
|
2011-07-27 18:04:43 +02:00
|
|
|
#include <projectexplorer/target.h>
|
2011-06-16 17:03:43 +02:00
|
|
|
#include <projectexplorer/toolchain.h>
|
2012-07-26 09:02:34 +02:00
|
|
|
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
|
|
|
|
|
#include <utils/portlist.h>
|
2011-07-20 11:50:01 +02:00
|
|
|
#include <utils/qtcassert.h>
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QPointer>
|
|
|
|
|
#include <QSharedPointer>
|
2011-08-02 12:20:16 +02:00
|
|
|
|
2012-05-18 10:49:35 +02:00
|
|
|
using namespace QSsh;
|
2011-06-16 17:03:43 +02:00
|
|
|
using namespace Debugger;
|
|
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
|
|
|
|
|
namespace RemoteLinux {
|
2011-08-02 12:20:16 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
namespace {
|
2012-07-26 09:02:34 +02:00
|
|
|
enum State { Inactive, GatheringPorts, StartingRunner, Debugging };
|
2011-08-02 12:20:16 +02:00
|
|
|
} // anonymous namespace
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
class LinuxDeviceDebugSupportPrivate
|
2011-08-02 12:20:16 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2012-07-26 09:02:34 +02:00
|
|
|
LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig,
|
2011-08-02 12:20:16 +02:00
|
|
|
DebuggerEngine *engine)
|
2012-06-05 15:36:38 +02:00
|
|
|
: engine(engine),
|
2012-02-23 13:36:09 +01:00
|
|
|
qmlDebugging(runConfig->debuggerAspect()->useQmlDebugger()),
|
2012-02-17 19:05:11 +01:00
|
|
|
cppDebugging(runConfig->debuggerAspect()->useCppDebugger()),
|
2011-11-11 02:52:34 +01:00
|
|
|
state(Inactive),
|
2012-07-26 09:02:34 +02:00
|
|
|
gdbServerPort(-1), qmlPort(-1),
|
|
|
|
|
device(DeviceProfileInformation::device(runConfig->target()->profile())),
|
|
|
|
|
remoteFilePath(runConfig->remoteExecutableFilePath()),
|
|
|
|
|
arguments(runConfig->arguments()),
|
|
|
|
|
commandPrefix(runConfig->commandPrefix())
|
2011-08-02 12:20:16 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-27 15:58:47 +02:00
|
|
|
const QPointer<DebuggerEngine> engine;
|
2011-11-11 02:52:34 +01:00
|
|
|
bool qmlDebugging;
|
|
|
|
|
bool cppDebugging;
|
2011-08-02 12:20:16 +02:00
|
|
|
QByteArray gdbserverOutput;
|
|
|
|
|
State state;
|
|
|
|
|
int gdbServerPort;
|
|
|
|
|
int qmlPort;
|
2012-07-26 09:02:34 +02:00
|
|
|
DeviceApplicationRunner appRunner;
|
|
|
|
|
DeviceUsedPortsGatherer portsGatherer;
|
|
|
|
|
const ProjectExplorer::IDevice::ConstPtr device;
|
|
|
|
|
Utils::PortList portList;
|
|
|
|
|
const QString remoteFilePath;
|
|
|
|
|
const QString arguments;
|
|
|
|
|
const QString commandPrefix;
|
2011-08-02 12:20:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
using namespace Internal;
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLinuxRunConfiguration *runConfig)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
|
|
|
|
DebuggerStartParameters params;
|
2012-06-28 10:00:04 +02:00
|
|
|
Target *target = runConfig->target();
|
|
|
|
|
Profile *profile = target->profile();
|
2012-07-27 13:31:13 +02:00
|
|
|
const IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
2012-06-28 10:00:04 +02:00
|
|
|
|
|
|
|
|
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
|
|
|
|
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
|
|
|
|
if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
|
|
|
|
|
params.toolChainAbi = tc->targetAbi();
|
|
|
|
|
|
2012-02-23 13:36:09 +01:00
|
|
|
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
2012-02-01 09:03:05 +01:00
|
|
|
params.languages |= QmlLanguage;
|
2012-07-27 13:31:13 +02:00
|
|
|
params.qmlServerAddress = device->sshParameters().host;
|
2012-02-21 15:47:55 +01:00
|
|
|
params.qmlServerPort = 0; // port is selected later on
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
2012-02-17 19:05:11 +01:00
|
|
|
if (runConfig->debuggerAspect()->useCppDebugger()) {
|
2012-02-01 09:03:05 +01:00
|
|
|
params.languages |= CppLanguage;
|
2011-06-16 17:03:43 +02:00
|
|
|
params.processArgs = runConfig->arguments();
|
2011-09-16 11:04:11 +02:00
|
|
|
params.startMode = AttachToRemoteServer;
|
2011-06-16 17:03:43 +02:00
|
|
|
params.executable = runConfig->localExecutableFilePath();
|
2012-07-27 13:31:13 +02:00
|
|
|
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
|
2011-06-16 17:03:43 +02:00
|
|
|
} else {
|
2011-09-16 11:04:11 +02:00
|
|
|
params.startMode = AttachToRemoteServer;
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
2012-06-13 11:29:26 +02:00
|
|
|
params.remoteSetupNeeded = true;
|
2011-06-16 17:03:43 +02:00
|
|
|
params.displayName = runConfig->displayName();
|
|
|
|
|
|
2012-06-28 10:00:04 +02:00
|
|
|
if (const Project *project = target->project()) {
|
2011-06-16 17:03:43 +02:00
|
|
|
params.projectSourceDirectory = project->projectDirectory();
|
2012-06-28 10:00:04 +02:00
|
|
|
if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
|
2011-06-16 17:03:43 +02:00
|
|
|
params.projectBuildDirectory = buildConfig->buildDirectory();
|
|
|
|
|
params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunConfiguration *runConfig,
|
2011-08-02 12:20:16 +02:00
|
|
|
DebuggerEngine *engine)
|
2012-07-26 09:02:34 +02:00
|
|
|
: QObject(engine),
|
|
|
|
|
d(new LinuxDeviceDebugSupportPrivate(static_cast<RemoteLinuxRunConfiguration *>(runConfig), engine))
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-06-13 11:29:26 +02:00
|
|
|
connect(d->engine, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested()));
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
LinuxDeviceDebugSupport::~LinuxDeviceDebugSupport()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-08-02 12:20:16 +02:00
|
|
|
setFinished();
|
2011-09-15 09:10:10 +02:00
|
|
|
delete d;
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::setApplicationRunnerPreRunAction(DeviceApplicationHelperAction *action)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
d->appRunner.setPreRunAction(action);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LinuxDeviceDebugSupport::setApplicationRunnerPostRunAction(DeviceApplicationHelperAction *action)
|
|
|
|
|
{
|
|
|
|
|
d->appRunner.setPostRunAction(action);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LinuxDeviceDebugSupport::showMessage(const QString &msg, int channel)
|
|
|
|
|
{
|
|
|
|
|
if (d->state != Inactive && d->engine)
|
2011-09-15 09:10:10 +02:00
|
|
|
d->engine->showMessage(msg, channel);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleRemoteSetupRequested()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
QTC_ASSERT(d->state == Inactive, return);
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
d->state = GatheringPorts;
|
|
|
|
|
showMessage(tr("Checking available ports...\n"), LogStatus);
|
|
|
|
|
connect(&d->portsGatherer, SIGNAL(error(QString)), SLOT(handlePortsGathererError(QString)));
|
|
|
|
|
connect(&d->portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady()));
|
|
|
|
|
d->portsGatherer.start(d->device);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handlePortsGathererError(const QString &message)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
QTC_ASSERT(d->state == GatheringPorts, return);
|
|
|
|
|
handleAdapterSetupFailed(message);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handlePortListReady()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
QTC_ASSERT(d->state == GatheringPorts, return);
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
d->portList = d->device->freePorts();
|
|
|
|
|
startExecution();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LinuxDeviceDebugSupport::startExecution()
|
|
|
|
|
{
|
|
|
|
|
QTC_ASSERT(d->state == GatheringPorts, return);
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2011-11-11 02:52:34 +01:00
|
|
|
if (d->cppDebugging && !setPort(d->gdbServerPort))
|
|
|
|
|
return;
|
|
|
|
|
if (d->qmlDebugging && !setPort(d->qmlPort))
|
2011-06-16 17:03:43 +02:00
|
|
|
return;
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
d->state = StartingRunner;
|
2011-09-15 09:10:10 +02:00
|
|
|
d->gdbserverOutput.clear();
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
connect(&d->appRunner, SIGNAL(remoteStderr(QByteArray)),
|
|
|
|
|
SLOT(handleRemoteErrorOutput(QByteArray)));
|
|
|
|
|
connect(&d->appRunner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
|
|
|
|
if (d->qmlDebugging && !d->cppDebugging)
|
|
|
|
|
connect(&d->appRunner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted()));
|
|
|
|
|
QString args = d->arguments;
|
|
|
|
|
if (d->qmlDebugging)
|
|
|
|
|
args += QString::fromLocal8Bit(" -qmljsdebugger=port:%1,block").arg(d->qmlPort);
|
2011-11-11 02:52:34 +01:00
|
|
|
const QString remoteCommandLine = (d->qmlDebugging && !d->cppDebugging)
|
2012-07-26 09:02:34 +02:00
|
|
|
? QString::fromLatin1("%1 %2 %3").arg(d->commandPrefix).arg(d->remoteFilePath).arg(args)
|
|
|
|
|
: QString::fromLatin1("%1 gdbserver :%2 %3 %4").arg(d->commandPrefix)
|
|
|
|
|
.arg(d->gdbServerPort).arg(d->remoteFilePath).arg(args);
|
|
|
|
|
connect(&d->appRunner, SIGNAL(finished(bool)), SLOT(handleAppRunnerFinished(bool)));
|
|
|
|
|
d->appRunner.start(d->device, remoteCommandLine.toUtf8());
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleAppRunnerError(const QString &error)
|
|
|
|
|
{
|
|
|
|
|
if (d->state == Debugging) {
|
|
|
|
|
showMessage(error, AppError);
|
|
|
|
|
if (d->engine)
|
|
|
|
|
d->engine->notifyInferiorIll();
|
|
|
|
|
} else if (d->state != Inactive) {
|
|
|
|
|
handleAdapterSetupFailed(error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LinuxDeviceDebugSupport::handleAppRunnerFinished(bool success)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
if (!d->engine || d->state == Inactive)
|
2011-06-16 17:03:43 +02:00
|
|
|
return;
|
|
|
|
|
|
2011-09-15 09:10:10 +02:00
|
|
|
if (d->state == Debugging) {
|
2011-07-05 16:15:05 +02:00
|
|
|
// The QML engine does not realize on its own that the application has finished.
|
2011-11-11 02:52:34 +01:00
|
|
|
if (d->qmlDebugging && !d->cppDebugging)
|
2011-09-15 09:10:10 +02:00
|
|
|
d->engine->quitDebugger();
|
2012-07-26 09:02:34 +02:00
|
|
|
else if (!success)
|
2011-09-15 09:10:10 +02:00
|
|
|
d->engine->notifyInferiorIll();
|
2011-07-05 16:15:05 +02:00
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
} else {
|
2012-07-26 09:02:34 +02:00
|
|
|
d->engine->notifyEngineRemoteSetupFailed(tr("Debugging failed."));
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleDebuggingFinished()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-08-02 12:20:16 +02:00
|
|
|
setFinished();
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleRemoteOutput(const QByteArray &output)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
QTC_ASSERT(d->state == Inactive || d->state == Debugging, return);
|
2011-07-20 11:50:01 +02:00
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
showMessage(QString::fromUtf8(output), AppOutput);
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleRemoteErrorOutput(const QByteArray &output)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
QTC_ASSERT(d->state != GatheringPorts, return);
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2011-09-15 09:10:10 +02:00
|
|
|
if (!d->engine)
|
2011-06-16 17:03:43 +02:00
|
|
|
return;
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
showMessage(QString::fromUtf8(output), AppError);
|
|
|
|
|
if (d->state == StartingRunner && d->cppDebugging) {
|
2011-09-15 09:10:10 +02:00
|
|
|
d->gdbserverOutput += output;
|
|
|
|
|
if (d->gdbserverOutput.contains("Listening on port")) {
|
2011-06-16 17:03:43 +02:00
|
|
|
handleAdapterSetupDone();
|
2011-09-15 09:10:10 +02:00
|
|
|
d->gdbserverOutput.clear();
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleProgressReport(const QString &progressOutput)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
showMessage(progressOutput + QLatin1Char('\n'), LogStatus);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-08-02 12:20:16 +02:00
|
|
|
setFinished();
|
2012-06-13 11:29:26 +02:00
|
|
|
d->engine->notifyEngineRemoteSetupFailed(tr("Initial setup failed: %1").arg(error));
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleAdapterSetupDone()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
d->state = Debugging;
|
2012-06-13 11:29:26 +02:00
|
|
|
d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::handleRemoteProcessStarted()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
QTC_ASSERT(d->qmlDebugging && !d->cppDebugging, return);
|
|
|
|
|
QTC_ASSERT(d->state == StartingRunner, return);
|
2011-07-20 11:50:01 +02:00
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
handleAdapterSetupDone();
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
void LinuxDeviceDebugSupport::setFinished()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
if (d->state == Inactive)
|
2011-06-16 17:03:43 +02:00
|
|
|
return;
|
2012-07-26 09:02:34 +02:00
|
|
|
d->portsGatherer.disconnect(this);
|
|
|
|
|
d->appRunner.disconnect(this);
|
2012-08-01 16:26:27 +02:00
|
|
|
if (d->state == StartingRunner) {
|
|
|
|
|
const QString stopCommand
|
|
|
|
|
= d->device->processSupport()->killProcessByNameCommandLine(d->remoteFilePath);
|
|
|
|
|
d->appRunner.stop(stopCommand.toUtf8());
|
|
|
|
|
}
|
2011-09-15 09:10:10 +02:00
|
|
|
d->state = Inactive;
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-07-26 09:02:34 +02:00
|
|
|
bool LinuxDeviceDebugSupport::setPort(int &port)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2012-07-26 09:02:34 +02:00
|
|
|
port = d->portsGatherer.getNextFreePort(&d->portList);
|
2011-06-16 17:03:43 +02:00
|
|
|
if (port == -1) {
|
|
|
|
|
handleAdapterSetupFailed(tr("Not enough free ports on device for debugging."));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace RemoteLinux
|