[yocto] [PATCH] [eclipse-poky] Fix setting remote debug launcher for DSF [YOCTO #8317]

Madan Teo teodor.madan at freescale.com
Fri Sep 18 08:37:45 PDT 2015


From: Teodor Madan <teodor.madan at freescale.com>

- Set LC attributes for both launch delegates: legacy CDI and DSF
- Do not override preferred launch delegate. Leave to the workspace
setting according to user preferences.
- Tweak is no longer needed for avoiding reseting settings to defaults

Signed-off-by: Teodor Madan <teodor.madan at freescale.com>
---
 plugins/org.yocto.sdk.ide/META-INF/MANIFEST.MF     |    3 ++-
 .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java |   17 ++++++++++-------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/plugins/org.yocto.sdk.ide/META-INF/MANIFEST.MF b/plugins/org.yocto.sdk.ide/META-INF/MANIFEST.MF
index 294af38..afb31b4 100644
--- a/plugins/org.yocto.sdk.ide/META-INF/MANIFEST.MF
+++ b/plugins/org.yocto.sdk.ide/META-INF/MANIFEST.MF
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.cdt.autotools.core;bundle-version="1.2.0",
  org.eclipse.cdt.autotools.ui;bundle-version="1.0.1",
  org.eclipse.cdt.managedbuilder.ui;bundle-version="8.2.0",
- org.eclipse.core.expressions;bundle-version="3.4.500"
+ org.eclipse.core.expressions;bundle-version="3.4.500",
+ org.eclipse.cdt.dsf.gdb;bundle-version="4.8.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.yocto.sdk.ide,
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java
index 2ab4972..9dcab55 100644
--- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java
@@ -39,6 +39,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
 import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
@@ -333,13 +334,15 @@ public class YoctoSDKUtils {
 			ILaunchConfigurationWorkingCopy w_copy = configType.newInstance(project, configName);
 			Set<String> modes=new HashSet<String>();
 			modes.add("debug");
-			w_copy.setPreferredLaunchDelegate(modes, "org.eclipse.rse.remotecdt.launch");
-			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, sDebugInitFile);
-			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, false);
-			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, strDebugger);
-			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, "mi");
-			//TWEAK avoid loading default values in org.eclipse.cdt.launch.remote.tabs.RemoteCDebuggerTab
-			w_copy.setAttribute("org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET",true);
+			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, sDebugInitFile); // CDI
+			w_copy.setAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, sDebugInitFile); // DSF
+			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, false); // CDI
+			w_copy.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, false); // DSF
+			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, strDebugger); // CDI
+			w_copy.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, strDebugger); // DSF
+			
+			w_copy.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, "mi"); // CDI
+
 			w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
 			if (!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID)) {
 				String pathToCompiledBinary = "";
-- 
1.7.9.5




More information about the yocto mailing list