mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug 424483 - Accept yet anther GDB version format
Change-Id: Ic88352eb5d726c08361386b47c48b913b0cc91c0 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
ec1a750af3
commit
b3223dace6
2 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2012 Ericsson and others.
|
||||
* Copyright (c) 2010, 2013 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -250,8 +250,9 @@ public class LaunchUtils {
|
|||
// GNU gdb (Ericsson GDB 1.0-10) 6.8.50.20080730-cvs
|
||||
// GNU gdb (GDB) Fedora (7.0-3.fc12)
|
||||
// GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh)
|
||||
// GNU gdb (GDB) STMicroelectronics/Linux Base 7.4-71 [build Mar 1 2013]
|
||||
|
||||
Pattern pattern = Pattern.compile(" gdb( \\(.*?\\))? (\\w* )*\\(?(\\d*(\\.\\d*)*)", Pattern.MULTILINE); //$NON-NLS-1$
|
||||
Pattern pattern = Pattern.compile(" gdb( \\(.*?\\))? (\\D* )*\\(?(\\d*(\\.\\d*)*)", Pattern.MULTILINE); //$NON-NLS-1$
|
||||
|
||||
Matcher matcher = pattern.matcher(versionOutput);
|
||||
if (matcher.find()) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Ericsson and others.
|
||||
* Copyright (c) 2010, 2013 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -42,7 +42,8 @@ public class LaunchUtilsTest {
|
|||
versions.put("GNU gdb 7.0", "7.0");
|
||||
versions.put("GNU gdb Fedora (6.8-27.el5)", "6.8");
|
||||
versions.put("GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh)", "6.3.0.0");
|
||||
|
||||
versions.put("GNU gdb (GDB) STMicroelectronics/Linux Base 7.4-71 [build Mar 1 2013]", "7.4");
|
||||
|
||||
for (String key : versions.keySet()) {
|
||||
assertEquals("From \"" + key + "\"", versions.get(key), LaunchUtils.getGDBVersionFromText(key));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue