[Title]Fix to Support gdbserver by on-demanded
authorhyunsik.noh <hyunsik.noh@samsung.com>
Thu, 23 Feb 2012 05:48:13 +0000 (14:48 +0900)
committerhyunsik.noh <hyunsik.noh@samsung.com>
Thu, 23 Feb 2012 06:20:26 +0000 (15:20 +0900)
[Type] work
[Module] nativeplatform
[Priority] high
[Redmine#] 4327

Change-Id: I9b28b9992440149c3ab516ede064a86638536ad1

org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForAttach.java

index 6f28e53..ef01062 100644 (file)
@@ -75,6 +75,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.TwoPaneElementSelector;
 
 import org.tizen.common.connection.ConnectionPlugin;
+import org.tizen.common.connection.debugtools.DebugTool;
 import org.tizen.common.util.LocalPortChecker;
 
 import org.tizen.nativecommon.build.CommonConfigurationManager;
@@ -92,7 +93,8 @@ import org.tizen.sdblib.IDevice;
 public class TizenDebianLaunchDelegate extends AbstractCLaunchDelegate {
     protected static final String PACKAGE_EXTENSION = ".deb";
     protected static final String CMD_RESULT_CHECK  = "; echo $?;";
-    protected static final String GDBSERVER_COMMAND = "gdbserver";
+    protected static final String GDBSERVER_DIR = "gdbserver";
+    protected static final String GDBSERVER_BIN = "gdbserver";
     protected IConfiguration selectedConfig;
     protected IDevice currentDevice;
     protected String executeResult = "";
@@ -338,7 +340,7 @@ public class TizenDebianLaunchDelegate extends AbstractCLaunchDelegate {
             monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER, 1);
             monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER);
             String gdbserverPort = config.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
-            String gdbserverCmd = GDBSERVER_COMMAND + " :" + gdbserverPort; 
+            String gdbserverCmd = DebugTool.TOOLS_TARGET_PATH + "/" + GDBSERVER_DIR + "/" + GDBSERVER_BIN + " :" + gdbserverPort;
             String execArg = setArguments(config);
             String envCmd = setEnvironments(config);
             String command = envCmd + gdbserverCmd + " " + execArg;
index e764a0d..444ec90 100644 (file)
@@ -49,6 +49,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.dialogs.TwoPaneElementSelector;
 
+import org.tizen.common.connection.debugtools.DebugTool;
 import org.tizen.nativecommon.launch.TizenDeviceProcessList;
 import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
 import org.tizen.nativecommon.launch.TizenLaunchMessages;
@@ -89,7 +90,7 @@ public class TizenDebianLaunchDelegateForAttach extends TizenDebianLaunchDelegat
 
             String gdbserverPort = config.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);            
             String commandArguments =  ":" + gdbserverPort + ATTACH_OPTION + pid;
-            String gdbserverCmd = GDBSERVER_COMMAND + " " + commandArguments; 
+            String gdbserverCmd = DebugTool.TOOLS_TARGET_PATH + "/" + GDBSERVER_DIR + "/" + GDBSERVER_BIN + " " + commandArguments;
             String envCmd = setEnvironments(config);
             String command = envCmd + gdbserverCmd;
             currentDevice.executeShellCommand(command);