Commit 8f1f3330 authored by hjk's avatar hjk

Debugger: Use a SimpleTargetLaucher for gdbserver

Makes remote output appear again in the Application Output pane,
and is arguably the right thing to do anyway.

Change-Id: I05c365eec43f60a85482b8ae7d5856b3a31ee6f8
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent e2becd2b
...@@ -740,7 +740,7 @@ void GdbServerPortsGatherer::start() ...@@ -740,7 +740,7 @@ void GdbServerPortsGatherer::start()
// GdbServerRunner // GdbServerRunner
GdbServerRunner::GdbServerRunner(RunControl *runControl, GdbServerPortsGatherer *portsGatherer) GdbServerRunner::GdbServerRunner(RunControl *runControl, GdbServerPortsGatherer *portsGatherer)
: RunWorker(runControl), m_portsGatherer(portsGatherer) : SimpleTargetRunner(runControl), m_portsGatherer(portsGatherer)
{ {
setDisplayName("GdbServerRunner"); setDisplayName("GdbServerRunner");
} }
...@@ -778,22 +778,11 @@ void GdbServerRunner::start() ...@@ -778,22 +778,11 @@ void GdbServerRunner::start()
r.executable = command; r.executable = command;
r.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux); r.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
connect(&m_gdbServer, &ApplicationLauncher::error, this, [this] { setRunnable(r);
reportFailure(tr("GDBserver start failed"));
});
connect(&m_gdbServer, &ApplicationLauncher::remoteProcessStarted, this, [this] {
appendMessage(tr("GDBserver started") + '\n', NormalMessageFormat);
reportStarted();
});
appendMessage(tr("Starting GDBserver...") + '\n', NormalMessageFormat); appendMessage(tr("Starting GDBserver..."), NormalMessageFormat);
m_gdbServer.start(r, device());
}
void GdbServerRunner::stop() SimpleTargetRunner::start();
{
m_gdbServer.stop();
reportStopped();
} }
} // namespace Debugger } // namespace Debugger
...@@ -120,7 +120,7 @@ private: ...@@ -120,7 +120,7 @@ private:
Utils::Port m_qmlServerPort; Utils::Port m_qmlServerPort;
}; };
class DEBUGGER_EXPORT GdbServerRunner : public ProjectExplorer::RunWorker class DEBUGGER_EXPORT GdbServerRunner : public ProjectExplorer::SimpleTargetRunner
{ {
Q_OBJECT Q_OBJECT
...@@ -131,9 +131,7 @@ public: ...@@ -131,9 +131,7 @@ public:
private: private:
void start() override; void start() override;
void stop() override;
ProjectExplorer::ApplicationLauncher m_gdbServer;
GdbServerPortsGatherer *m_portsGatherer; GdbServerPortsGatherer *m_portsGatherer;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment