1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Better pattern matching to be able to find a GDB build from the GDB HEAD

This commit is contained in:
Marc Khouzam 2008-07-26 19:05:04 +00:00
parent 1c0440682f
commit 7506ff7d02

View file

@ -212,12 +212,12 @@ public class LaunchUtils {
InputStream stream = process.getInputStream();
Reader r = new InputStreamReader(stream);
BufferedReader reader = new BufferedReader(r);
Pattern pattern = Pattern.compile(" gdb (\\d*(\\.\\d*)*)", Pattern.MULTILINE); //$NON-NLS-1$
Pattern pattern = Pattern.compile(" gdb( \\(GDB\\))? (\\d*(\\.\\d*)*)", Pattern.MULTILINE); //$NON-NLS-1$
while ((line = reader.readLine()) != null) {
Matcher matcher = pattern.matcher(line);
if (matcher.find()) {
version = matcher.group(1);
version = matcher.group(2);
}
}
} catch (IOException e) {