summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2017-02-19 16:00:13 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2017-02-22 16:57:29 +0000
commit2276845ed83a9a0425655246f9713efc9061f290 (patch)
treec869ae0147f4b5c10e20cc7fb01640d3eef28fa2
parent5c8b6f8a08f18210ed8b734d64e8244113e4d763 (diff)
downloadqt-creator-2276845ed83a9a0425655246f9713efc9061f290.tar.gz
BareMetal: Fix startup of OpenOCD in TCP/IP mode on Windows
Previously, the OpenOCD utility fails as the startup arguments contains a wrong quotes wrapping for Windows OS. For example the 'gdb_port 3333' argument contains a single quotes, instead of double quotes, due to passed the Utils::OsTypeLinux parameter for any OS. We need to use the Utils::HostOsInfo::hostOs() function instead. Task-number: QTCREATORBUG-17765 Change-Id: I08acc4158baeca04e1b8685f1fdac40684f1c70c Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/baremetal/baremetaldebugsupport.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/baremetal/baremetaldebugsupport.cpp b/src/plugins/baremetal/baremetaldebugsupport.cpp
index 3bbf232311..f0990b2115 100644
--- a/src/plugins/baremetal/baremetaldebugsupport.cpp
+++ b/src/plugins/baremetal/baremetaldebugsupport.cpp
@@ -171,7 +171,10 @@ void BareMetalDebugSupport::startExecution()
StandardRunnable r;
r.executable = p->executable();
- r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::OsTypeLinux);
+ // We need to wrap the command arguments depending on a host OS,
+ // as the bare metal's GDB servers are launched on a host,
+ // but not on a target.
+ r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::HostOsInfo::hostOs());
m_appRunner->start(dev, r);
}