mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 310565: Support for new format for Apple GDB.
This commit is contained in:
parent
b06a0cbd3a
commit
0bd05a8dbc
2 changed files with 3 additions and 2 deletions
|
@ -246,6 +246,7 @@ public class LaunchUtils {
|
|||
// GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)
|
||||
// GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
|
||||
// GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
|
||||
// GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010)
|
||||
// It seems the version that changes is the "Apple version" but we still use both.
|
||||
// The Mac OS prefix and version are appended to the normal version so the
|
||||
// returned string has this format: 6.3.50-20050815APPLE1346. The normal version and the
|
||||
|
@ -253,8 +254,7 @@ public class LaunchUtils {
|
|||
if (versionOutput.indexOf("Apple") != -1) { //$NON-NLS-1$
|
||||
// Add a prefix to indicate we are dealing with an Apple GDB
|
||||
version += MACOS_GDB_MARKER;
|
||||
Pattern aPattern = Pattern.compile(" \\(Apple version gdb-(\\d*)\\)", Pattern.MULTILINE); //$NON-NLS-1$
|
||||
|
||||
Pattern aPattern = Pattern.compile(" \\(Apple version gdb-(\\d+(\\.\\d+)*)\\)", Pattern.MULTILINE); //$NON-NLS-1$
|
||||
Matcher aMatcher = aPattern.matcher(versionOutput);
|
||||
if (aMatcher.find()) {
|
||||
version += aMatcher.group(1);
|
||||
|
|
|
@ -51,6 +51,7 @@ public class LaunchUtilsTest extends TestCase {
|
|||
versions.put("GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)", "6.3.50"+LaunchUtils.MACOS_GDB_MARKER+"696");
|
||||
versions.put("GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)", "6.3.50"+LaunchUtils.MACOS_GDB_MARKER+"966");
|
||||
versions.put("GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)", "6.3.50"+LaunchUtils.MACOS_GDB_MARKER+"1346");
|
||||
versions.put("GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010)", "6.3.50"+LaunchUtils.MACOS_GDB_MARKER+"1461.2");
|
||||
versions.put("GNU gdb 7.0 (Apple version gdb-1) (Fri Sep 18 20:40:51 UTC 2009)", "7.0"+LaunchUtils.MACOS_GDB_MARKER+"1");
|
||||
versions.put("GNU gdb 7.0-20050815 (Apple version gdb-01) (Fri Sep 18 20:40:51 UTC 2009)", "7.0"+LaunchUtils.MACOS_GDB_MARKER+"01");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue