Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorMarc Khouzam2015-07-22 10:06:24 -0400
committerGerrit Code Review @ Eclipse.org2015-08-10 10:47:49 -0400
commit0d7432318e8098bf8c50bcfedfccfb36cbce94fd (patch)
treea8864e01f3bf65bce5c99144d7de9012865a5a30 /jtag
parent7168d36c5810d8ce01f9cf855c6aa6196e9fc010 (diff)
downloadorg.eclipse.cdt-0d7432318e8098bf8c50bcfedfccfb36cbce94fd.tar.gz
org.eclipse.cdt-0d7432318e8098bf8c50bcfedfccfb36cbce94fd.tar.xz
org.eclipse.cdt-0d7432318e8098bf8c50bcfedfccfb36cbce94fd.zip
Bug 469763 - DSF-GDB top-level service classes for better extensibility
Change-Id: Ie01af2df69a4c12bc3489ab5ecb76a3f5b6bfa79 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/pom.xml2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java53
3 files changed, 56 insertions, 2 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF b/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF
index 94be6b84e2..d798c7dbcf 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.core;singleton:=true
-Bundle-Version: 8.4.0.qualifier
+Bundle-Version: 8.5.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
@@ -17,6 +17,7 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.debug.gdbjtag.core,
org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service,
+ org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.extensions,
org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.macos,
org.eclipse.cdt.debug.gdbjtag.core.jtagdevice
Bundle-Vendor: %providerName
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/pom.xml b/jtag/org.eclipse.cdt.debug.gdbjtag.core/pom.xml
index dcd97ba568..382c5d9448 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/pom.xml
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/pom.xml
@@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>8.4.0-SNAPSHOT</version>
+ <version>8.5.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.debug.gdbjtag.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java
new file mode 100644
index 0000000000..ad7211098f
--- /dev/null
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2015 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.extensions;
+
+import org.eclipse.cdt.debug.gdbjtag.core.dsf.gdb.service.GDBJtagControl_7_7;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
+import org.eclipse.cdt.dsf.gdb.service.GdbDebugServicesFactory;
+import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+/**
+ * Top-level class in the version hierarchy of the JTag implementations of {@link ICommandControlService}.
+ * <br>
+ * Extenders should subclass this class for their special needs, which will allow
+ * them to always extend the most recent version of the service.
+ * For example, if GDB<Service>_7_9 is added, this GDB<Service>_HEAD class
+ * will be changed to extend it instead of the previous version, therefore
+ * automatically allowing extenders to be extending the new class.
+ *
+ * NOTE: Older versions of GDB that were already using an extending class,
+ * will automatically start using the new service version, which may
+ * not be desirable. Extenders should update how they extend
+ * GdbDebugServicesFactory to properly choose the version of the
+ * service that should be used for older GDBs.
+ *
+ * On the contrary, not using GDB<Service>_HEAD requires the
+ * extender to update how they extend GdbDebugServicesFactory
+ * whenever a new GDB<Service> version is added.
+ *
+ * Extenders that prefer to focus on the latest GDB version are
+ * encouraged to extend GDB<Service>_HEAD.
+ *
+ * @since 8.5
+ */
+public class GDBJtagControl_HEAD extends GDBJtagControl_7_7 {
+ public GDBJtagControl_HEAD(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
+ super(session, config, factory);
+
+ validateGdbVersion(session);
+ }
+
+ protected String getMinGDBVersionSupported() { return GdbDebugServicesFactory.GDB_7_7_VERSION; }
+
+ protected void validateGdbVersion(DsfSession session) {
+ GdbDebugServicesFactory.validateGdbVersion(session, getMinGDBVersionSupported(), this);
+ }
+}

Back to the top