[yocto] [PATCH 12/13] plugins/sdk.ide: Adapted RemoteDebugLauncher for CMake projects

Atanas Gegov atanas.gegov.oss at gmail.com
Thu May 23 01:39:51 PDT 2013


From: Atanas Gegov <atanas.gegov at bmw-carit.de>

The Yocto CMake projects are built for more
clarity in a Debug folder and not in the source
tree. The binary is therefore not inside the src
folder but in the Debug folder.
---
 .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

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 669157b..287de15 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
@@ -303,10 +303,15 @@ public class YoctoSDKUtils {
 			//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(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
-			if(!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID))
-			{
-				String project_src = "src/"+projectName;
-				w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, project_src);
+			if (!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID)) {
+				String pathToCompiledBinary = "";
+				if (project.hasNature(YoctoSDKCMakeProjectNature.YoctoSDK_CMAKE_NATURE_ID)) {
+					pathToCompiledBinary = "Debug/";
+				} else {
+					pathToCompiledBinary = "src/";
+				}
+				pathToCompiledBinary += projectName;
+				w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, pathToCompiledBinary);
 			}
 
 			w_copy.doSave();
-- 
1.7.9.5




More information about the yocto mailing list