aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-01-06 16:08:14 +0100
committerhjk <hjk@qt.io>2023-01-13 07:17:38 +0000
commitccff024a66f9213b6ac811a098058061cd2f37f5 (patch)
tree7ad218873da62da610ee0a834454c7cb712cc2bc /src/plugins/remotelinux/remotelinuxdebugsupport.cpp
parent44a9f5a63a09e5994542df6265b6813f44d29dbe (diff)
RemoteLinux: Use dedicated classes for run worker factories
I put the normal run in the debugsupport file for now, I plan to squash all three afterwards. Change-Id: I855772f7dff8c8ccce07193733c26468fec40b85 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxdebugsupport.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp51
1 files changed, 39 insertions, 12 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index 351daa025f..2f706c6e94 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -3,30 +3,57 @@
#include "remotelinuxdebugsupport.h"
+#include "remotelinux_constants.h"
+
+#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runconfigurationaspects.h>
+#include <debugger/debuggerruncontrol.h>
+
using namespace Debugger;
using namespace ProjectExplorer;
namespace RemoteLinux::Internal {
-LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
- : DebuggerRunTool(runControl, DebuggerRunTool::DoNotAllowTerminal)
+class RemoteLinuxDebugWorker final : public DebuggerRunTool
{
- setId("LinuxDeviceDebugSupport");
+public:
+ RemoteLinuxDebugWorker(RunControl *runControl)
+ : DebuggerRunTool(runControl, DoNotAllowTerminal)
+ {
+ setId("RemoteLinuxDebugWorker");
+
+ setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
+ addQmlServerInferiorCommandLineArgumentIfNeeded();
+
+ auto debugServer = new DebugServerRunner(runControl, portsGatherer());
+ debugServer->setEssential(true);
- setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
- addQmlServerInferiorCommandLineArgumentIfNeeded();
+ addStartDependency(debugServer);
- auto debugServer = new DebugServerRunner(runControl, portsGatherer());
- debugServer->setEssential(true);
+ setStartMode(AttachToRemoteServer);
+ setCloseMode(KillAndExitMonitorAtClose);
+ setUseExtendedRemote(true);
+ setLldbPlatform("remote-linux");
+ }
+};
- addStartDependency(debugServer);
+// Factories
- setStartMode(AttachToRemoteServer);
- setCloseMode(KillAndExitMonitorAtClose);
- setUseExtendedRemote(true);
- setLldbPlatform("remote-linux");
+RemoteLinuxRunWorkerFactory::RemoteLinuxRunWorkerFactory(const QList<Utils::Id> &runConfigs)
+{
+ setProduct<SimpleTargetRunner>();
+ addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
+ setSupportedRunConfigs(runConfigs);
+ addSupportedDeviceType(Constants::GenericLinuxOsType);
+}
+
+RemoteLinuxDebugWorkerFactory::RemoteLinuxDebugWorkerFactory(const QList<Utils::Id> &runConfigs)
+{
+ setProduct<RemoteLinuxDebugWorker>();
+ addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
+ setSupportedRunConfigs(runConfigs);
+ addSupportedDeviceType(Constants::GenericLinuxOsType);
}
} // Internal::Internal