From f1a4a10cfea95833f5591b557357b23832d38a0d Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 19 Oct 2017 14:24:33 +0200 Subject: [PATCH] RemoteLinux: Use the optional PortGatherer from the DebuggerRunTool Change-Id: I4a79abff197ea72df421fbafe11823480719f4a6 Reviewed-by: Christian Kandeler --- .../remotelinux/remotelinuxdebugsupport.cpp | 18 ++++-------------- .../remotelinux/remotelinuxdebugsupport.h | 5 ----- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index 1687eb1808e..cf12971ec78 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -39,12 +39,11 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl) { setDisplayName("LinuxDeviceDebugSupport"); - m_portsGatherer = new GdbServerPortsGatherer(runControl); - m_portsGatherer->setUseGdbServer(isCppDebugging()); - m_portsGatherer->setUseQmlServer(isQmlDebugging()); + setUsePortsGatherer(isCppDebugging(), isQmlDebugging()); + addQmlServerInferiorCommandLineArgumentIfNeeded(); - auto gdbServer = new GdbServerRunner(runControl, m_portsGatherer); - gdbServer->addStartDependency(m_portsGatherer); + auto gdbServer = new GdbServerRunner(runControl, portsGatherer()); + gdbServer->addStartDependency(portsGatherer()); addStartDependency(gdbServer); @@ -59,14 +58,5 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl) setSymbolFile(rlrc->localExecutableFilePath()); } -void LinuxDeviceDebugSupport::start() -{ - setRemoteChannel(m_portsGatherer->gdbServerChannel()); - setQmlServer(m_portsGatherer->qmlServer()); - addQmlServerInferiorCommandLineArgumentIfNeeded(); - - DebuggerRunTool::start(); -} - } // namespace Internal } // namespace RemoteLinux diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.h b/src/plugins/remotelinux/remotelinuxdebugsupport.h index 1b7a0ee3ac2..34df20d2daf 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.h +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.h @@ -34,11 +34,6 @@ class LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool { public: LinuxDeviceDebugSupport(ProjectExplorer::RunControl *runControl); - -private: - void start() override; - - Debugger::GdbServerPortsGatherer *m_portsGatherer = nullptr; }; } // namespace Internal