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()
// 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
......@@ -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;
};
......
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