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:
parent
1c0440682f
commit
7506ff7d02
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue