Bug 511993 - Sync GCC Command Parser fails on Windows
Summary: Sync GCC Command Parser fails on Windows
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: RDT.sync (show other bugs)
Version: 9.1.1   Edit
Hardware: All Windows All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 13:02 EST by John Eblen CLA
Modified: 2017-02-09 13:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Eblen CLA 2017-02-09 13:02:05 EST
The Sync GCC command parser fails on Windows, using Linux on remote, in some (all ?) cases, because the first argument of "replaceFirst" is parsed as a regex. The backslashes in the path name are interpreted as escape characters:

java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 30

\data\user\depot\FMW\FH\MDP3FH\main

                              ^

      at java.util.regex.Pattern.error(Unknown Source)

      at java.util.regex.Pattern.escape(Unknown Source)

      at java.util.regex.Pattern.atom(Unknown Source)

      at java.util.regex.Pattern.sequence(Unknown Source)

      at java.util.regex.Pattern.expr(Unknown Source)

      at java.util.regex.Pattern.compile(Unknown Source)

      at java.util.regex.Pattern.<init>(Unknown Source)

      at java.util.regex.Pattern.compile(Unknown Source)

      at java.lang.String.replaceFirst(Unknown Source)

      at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncGCCBuildCommandParser.getWorkspacePath(SyncGCCBuildCommandParser.java:121)

      at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncGCCBuildCommandParser.setSettingEntries(SyncGCCBuildCommandParser.java:71)

      at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractLanguageSettingsOutputScanner.processLine(AbstractLanguageSettingsOutputScanner.java:492)

      at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuildCommandParser.processLine(AbstractBuildCommandParser.java:274)

      at org.eclipse.cdt.internal.core.ConsoleOutputSniffer.processLine(ConsoleOutputSniffer.java:178)

      at org.eclipse.cdt.internal.core.ConsoleOutputSniffer.access$0(ConsoleOutputSniffer.java:174)

      at org.eclipse.cdt.internal.core.ConsoleOutputSniffer$ConsoleOutputStream.checkLine(ConsoleOutputSniffer.java:99)

      at org.eclipse.cdt.internal.core.ConsoleOutputSniffer$ConsoleOutputStream.write(ConsoleOutputSniffer.java:58)

      at java.io.OutputStream.write(Unknown Source)

      at org.eclipse.ptp.internal.rdt.sync.cdt.core.remotemake.RemoteProcessClosure$ReaderThread.run(RemoteProcessClosure.java:95)