Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2013-12-20 21:13:06 +0000
committerMarc Khouzam2013-12-20 21:14:31 +0000
commitb3223dace67fde0c14c7215e3d52eb89641341dc (patch)
tree09c686bfa53a18267239e8e3b9199755ce7fe17e /dsf-gdb
parentec1a750af34b8cf5ffc9c9f3cc1d7d19d28206c9 (diff)
downloadorg.eclipse.cdt-b3223dace67fde0c14c7215e3d52eb89641341dc.tar.gz
org.eclipse.cdt-b3223dace67fde0c14c7215e3d52eb89641341dc.tar.xz
org.eclipse.cdt-b3223dace67fde0c14c7215e3d52eb89641341dc.zip
Bug 424483 - Accept yet anther GDB version format
Change-Id: Ic88352eb5d726c08361386b47c48b913b0cc91c0 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchUtilsTest.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java
index 02f246939f1..fbb9a7812aa 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java
@@ -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()) {
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchUtilsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchUtilsTest.java
index 798eb125af8..9330497c8e2 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchUtilsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchUtilsTest.java
@@ -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));
}

Back to the top