diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 6e283ba130195f31e127025c46b0165ba825cd7a..cb56f3e47f7c1e4c053c7b27bf5b0723552624fb 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -740,7 +740,7 @@ void GdbServerPortsGatherer::start() // GdbServerRunner GdbServerRunner::GdbServerRunner(RunControl *runControl, GdbServerPortsGatherer *portsGatherer) - : RunWorker(runControl), m_portsGatherer(portsGatherer) + : SimpleTargetRunner(runControl), m_portsGatherer(portsGatherer) { setDisplayName("GdbServerRunner"); } @@ -778,22 +778,11 @@ void GdbServerRunner::start() r.executable = command; r.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux); - connect(&m_gdbServer, &ApplicationLauncher::error, this, [this] { - reportFailure(tr("GDBserver start failed")); - }); - connect(&m_gdbServer, &ApplicationLauncher::remoteProcessStarted, this, [this] { - appendMessage(tr("GDBserver started") + '\n', NormalMessageFormat); - reportStarted(); - }); + setRunnable(r); - appendMessage(tr("Starting GDBserver...") + '\n', NormalMessageFormat); - m_gdbServer.start(r, device()); -} + appendMessage(tr("Starting GDBserver..."), NormalMessageFormat); -void GdbServerRunner::stop() -{ - m_gdbServer.stop(); - reportStopped(); + SimpleTargetRunner::start(); } } // namespace Debugger diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index cf211b36bc6128a35f4b64a64166340804bf8c31..c22a4c969f5936ec35411983dbc0cb92ad1b5355 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -120,7 +120,7 @@ private: Utils::Port m_qmlServerPort; }; -class DEBUGGER_EXPORT GdbServerRunner : public ProjectExplorer::RunWorker +class DEBUGGER_EXPORT GdbServerRunner : public ProjectExplorer::SimpleTargetRunner { Q_OBJECT @@ -131,9 +131,7 @@ public: private: void start() override; - void stop() override; - ProjectExplorer::ApplicationLauncher m_gdbServer; GdbServerPortsGatherer *m_portsGatherer; };