forked from qt-creator/qt-creator
RemoteLinux: Inline RemoteLinuxDebugWorker
Task-number: QTCREATORBUG-29168 Change-Id: Iad8304d96a850f52863fa848fe703d81ef6f1d72 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -743,6 +743,11 @@ void DebuggerRunTool::setUsePortsGatherer(bool useCpp, bool useQml)
|
||||
runControl()->requestQmlChannel();
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setupPortsGatherer()
|
||||
{
|
||||
setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setSolibSearchPath(const Utils::FilePaths &list)
|
||||
{
|
||||
m_runParameters.solibSearchPath = list;
|
||||
|
@@ -81,6 +81,10 @@ public:
|
||||
|
||||
Internal::DebuggerRunParameters &runParameters() { return m_runParameters; }
|
||||
|
||||
void setLldbPlatform(const QString &platform);
|
||||
void addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||
void setupPortsGatherer();
|
||||
|
||||
protected:
|
||||
bool isCppDebugging() const;
|
||||
bool isQmlDebugging() const;
|
||||
@@ -88,11 +92,9 @@ protected:
|
||||
void setUsePortsGatherer(bool useCpp, bool useQml);
|
||||
|
||||
void addSolibSearchDir(const QString &str);
|
||||
void addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||
void modifyDebuggerEnvironment(const Utils::EnvironmentItems &item);
|
||||
void addSearchDirectory(const Utils::FilePath &dir);
|
||||
|
||||
void setLldbPlatform(const QString &platform);
|
||||
void setRemoteChannel(const QUrl &url);
|
||||
void setUseTargetAsync(bool on);
|
||||
void setSkipExecutableValidation(bool on);
|
||||
|
@@ -18,29 +18,6 @@ using namespace Utils;
|
||||
|
||||
namespace RemoteLinux::Internal {
|
||||
|
||||
class RemoteLinuxDebugWorker final : public DebuggerRunTool
|
||||
{
|
||||
public:
|
||||
explicit RemoteLinuxDebugWorker(RunControl *runControl)
|
||||
: DebuggerRunTool(runControl, DoNotAllowTerminal)
|
||||
{
|
||||
setId("RemoteLinuxDebugWorker");
|
||||
|
||||
setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
|
||||
addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||
setUseDebugServer({}, true, true);
|
||||
|
||||
setStartMode(AttachToRemoteServer);
|
||||
setCloseMode(KillAndExitMonitorAtClose);
|
||||
setUseExtendedRemote(true);
|
||||
|
||||
if (runControl->device()->osType() == Utils::OsTypeMac)
|
||||
setLldbPlatform("remote-macosx");
|
||||
else
|
||||
setLldbPlatform("remote-linux");
|
||||
}
|
||||
};
|
||||
|
||||
class RemoteLinuxQmlToolingSupport final : public SimpleTargetRunner
|
||||
{
|
||||
public:
|
||||
@@ -93,7 +70,24 @@ class RemoteLinuxDebugWorkerFactory final : public ProjectExplorer::RunWorkerFac
|
||||
public:
|
||||
RemoteLinuxDebugWorkerFactory()
|
||||
{
|
||||
setProduct<RemoteLinuxDebugWorker>();
|
||||
setProducer([](RunControl *rc) {
|
||||
auto debugger = new DebuggerRunTool(rc, DebuggerRunTool::DoNotAllowTerminal);
|
||||
debugger->setId("RemoteLinuxDebugWorker");
|
||||
|
||||
debugger->setupPortsGatherer();
|
||||
debugger->addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||
debugger->setUseDebugServer({}, true, true);
|
||||
|
||||
debugger->setStartMode(AttachToRemoteServer);
|
||||
debugger->setCloseMode(KillAndExitMonitorAtClose);
|
||||
debugger->setUseExtendedRemote(true);
|
||||
|
||||
if (rc->device()->osType() == Utils::OsTypeMac)
|
||||
debugger->setLldbPlatform("remote-macosx");
|
||||
else
|
||||
debugger->setLldbPlatform("remote-linux");
|
||||
return debugger;
|
||||
});
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
addSupportedDeviceType(Constants::GenericLinuxOsType);
|
||||
setSupportedRunConfigs(supportedRunConfigs());
|
||||
|
Reference in New Issue
Block a user