Commit cbb3aee0 authored by Denis Shienkov's avatar Denis Shienkov Committed by Tim Sander
Browse files

BareMetal: Kill the GDB server provider when debugging stopped

On Windows when debugging is stopped, the QProcess::terminate()
method does nothing. At least it belongs to the started OpenOCD
process. It is better to use Utils::QtcProcess with setup of a
setUseCtrlCStub(true) instead of QProcess.

Change-Id: I954377dc94de77fbae630e096a252530f12aaf2d
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
Reviewed-by: default avatarTim Sander <>
parent ac8626aa
......@@ -45,8 +45,11 @@ GdbServerProviderProcess::GdbServerProviderProcess(
const QSharedPointer<const ProjectExplorer::IDevice> &device,
QObject *parent)
: ProjectExplorer::DeviceProcess(device, parent)
, m_process(new QProcess(this))
, m_process(new Utils::QtcProcess(this))
if (Utils::HostOsInfo::isWindowsHost())
connect(m_process, SIGNAL(error(QProcess::ProcessError)),
connect(m_process, SIGNAL(finished(int)), SIGNAL(finished()));
......@@ -62,7 +65,10 @@ GdbServerProviderProcess::GdbServerProviderProcess(
void GdbServerProviderProcess::start(const QString &executable, const QStringList &arguments)
QTC_ASSERT(m_process->state() == QProcess::NotRunning, return);
m_process->start(executable, arguments);
QString args;
Utils::QtcProcess::addArgs(&args, arguments);
m_process->setCommand(executable, args);
void GdbServerProviderProcess::interrupt()
......@@ -33,6 +33,8 @@
#include <projectexplorer/devicesupport/deviceprocess.h>
namespace Utils { class QtcProcess; }
namespace BareMetal {
namespace Internal {
......@@ -64,7 +66,7 @@ public:
qint64 write(const QByteArray &data);
QProcess * const m_process;
Utils::QtcProcess *m_process;
} // namespace Internal
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