1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 09:55:29 +02:00

Bug 519529 - fix handling of quotes in the GCCToolChain scanner info.

Some Arduino boards have properties that feed into defines that have
spaces in them. The boards.txt property file adds quotes around those
things. When resolving the recipe property it results in -D gcc
options that have embedded spaces in them. That messes up the
ProcessBuilder and the command fails. We'll just strip the quotes from
all the command args since they aren't needed in this scenario anyway.

Change-Id: I41086ee264b8715823b3eab7931df4371b9ec873
(cherry picked from commit fc7b2f781c)
This commit is contained in:
Doug Schaefer 2017-08-09 16:05:19 -04:00
parent 08ea2dc248
commit 35135aa605
2 changed files with 10 additions and 10 deletions

View file

@ -183,6 +183,16 @@ public class GCCToolChain extends PlatformObject implements IToolChain {
addDiscoveryOptions(commandLine);
commandLine.addAll(commandStrings.subList(1, commandStrings.size()));
// Strip quotes from the args on Windows
if (Platform.OS_WIN32.equals(Platform.getOS())) {
for (int i = 0; i < commandLine.size(); i++) {
String arg = commandLine.get(i);
if (arg.contains("\"")) { //$NON-NLS-1$
commandLine.set(i, arg.replaceAll("\"", "")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
// Change output to stdout
boolean haveOut = false;
for (int i = 0; i < commandLine.size() - 1; ++i) {

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.cdt.debug.gdbjtag.core" version="2">
<resource path="src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java" type="org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.extensions.GDBJtagControl_HEAD">
<filter comment="This change is understood and will not break the API" id="338849923">
<message_arguments>
<message_argument value="org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.extensions.GDBJtagControl_HEAD"/>
</message_arguments>
</filter>
</resource>
</component>