1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Bug 558488: Fix GDB version number comparisons for GDB 10 and above

The previous code would treat GDB 10.0 as earlier than 6.8

Change-Id: Ie95d9459462636c9ae0713c65686eec64cb553fa
This commit is contained in:
Jonah Graham 2019-12-19 16:43:10 -05:00
parent 9a03a7c9d4
commit 995bf9320c

View file

@ -156,7 +156,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 {
if (LaunchUtils.getIsPostMortemTracing(config) && !isPostMortemTracingSupportedInGdbVersion(gdbVersion)) { if (LaunchUtils.getIsPostMortemTracing(config) && !isPostMortemTracingSupportedInGdbVersion(gdbVersion)) {
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED,
"Post-mortem tracing is not supported for GDB " + gdbVersion + ", GDB " + NON_STOP_FIRST_VERSION //$NON-NLS-1$//$NON-NLS-2$ "Post-mortem tracing is not supported for GDB " + gdbVersion + ", GDB " + TRACING_FIRST_VERSION //$NON-NLS-1$//$NON-NLS-2$
+ " or higher is required.", //$NON-NLS-1$ + " or higher is required.", //$NON-NLS-1$
null)); null));
} }
@ -465,7 +465,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 {
* @since 4.0 * @since 4.0
*/ */
protected boolean isNonStopSupportedInGdbVersion(String version) { protected boolean isNonStopSupportedInGdbVersion(String version) {
if (NON_STOP_FIRST_VERSION.compareTo(version) <= 0) {// XXX: 7.2 > 7.11 !!! if (LaunchUtils.compareVersions(NON_STOP_FIRST_VERSION, version) <= 0) {
return true; return true;
} }
return false; return false;
@ -477,7 +477,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 {
* @since 4.0 * @since 4.0
*/ */
protected boolean isPostMortemTracingSupportedInGdbVersion(String version) { protected boolean isPostMortemTracingSupportedInGdbVersion(String version) {
if (TRACING_FIRST_VERSION.compareTo(version) <= 0 if (LaunchUtils.compareVersions(TRACING_FIRST_VERSION, version) <= 0
// This feature will be available for GDB 7.2. But until that GDB is itself available // This feature will be available for GDB 7.2. But until that GDB is itself available
// there is a pre-release that has a version of 6.8.50.20090414 // there is a pre-release that has a version of 6.8.50.20090414
|| "6.8.50.20090414".equals(version)) { //$NON-NLS-1$ || "6.8.50.20090414".equals(version)) { //$NON-NLS-1$