From 39f43120fc40b8b7cd0bfb19cfda67f43a18e96d Mon Sep 17 00:00:00 2001 From: Jaewon Lim Date: Tue, 13 Nov 2012 20:24:31 +0900 Subject: [PATCH] [Title] bug fix of oprofile and valgrind [Desc.] problem that cannot launch oprofile and valgrind [Issue] nabi 13872 --- .../oprofile/launch/TizenOprofileLaunchDelegate.java | 15 +++++++++++++++ .../valgrind/launch/TizenValgrindLaunchDelegate.java | 6 ++++++ .../linuxtools/valgrind/massif/MassifLaunchDelegate.java | 2 ++ .../valgrind/memcheck/MemcheckLaunchDelegate.java | 4 +++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java index d964649..ce4ea03 100644 --- a/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java +++ b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java @@ -52,6 +52,7 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.tizen.common.TizenPlatformConstants; import org.tizen.nativecommon.launch.IProjectLaunchCommand; +import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchDelegate; import org.tizen.nativecommon.launch.TizenLaunchMessages; import org.tizen.oprofile.core.CommandManager; @@ -65,6 +66,7 @@ public class TizenOprofileLaunchDelegate extends TizenLaunchDelegate { protected static final String PACKAGE_NAME = "oprofile"; protected static final String PACKAGE_FILENAME_ARM = "oprofile_armel.deb"; + protected static final String BADA_EXT = ".exe"; protected static String appName = null; @@ -93,6 +95,11 @@ public class TizenOprofileLaunchDelegate extends TizenLaunchDelegate { verifyBuildConfiguration(config, mode, new SubProgressMonitor( monitor, 11)); + setConsole(config); + tizenCommand = new TizenLaunchCommand(currentDevice, launchConsole); + // FIXME: ad-hoc code. + launchConsole.show(); + Oprofile.getOpInfo(); // ISession session = getLaunchSession(config, new @@ -131,6 +138,14 @@ public class TizenOprofileLaunchDelegate extends TizenLaunchDelegate { IPath exeFile = CDebugUtils.verifyProgramPath(config); remoteExePath += exeFile.toFile().getName(); + + // for bada application + // execute non-exe file instead of .exe file + if(remoteExePath.endsWith(BADA_EXT)) + { + remoteExePath = remoteExePath.substring(0, remoteExePath.length() - BADA_EXT.length()); + } + String cmd = "ls " + remoteExePath + TizenPlatformConstants.CMD_SUFFIX; // resultRsp = session.run(cmd, null); String[] resultRsp = CommandManager.runCommandReturningResultArray(cmd); diff --git a/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java b/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java index 89d4ea2..d12e55c 100644 --- a/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java +++ b/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java @@ -54,6 +54,7 @@ import org.tizen.common.TizenPlatformConstants; import org.tizen.common.connection.ConnectionPlugin; import org.tizen.nativecommon.ProjectUtil; import org.tizen.nativecommon.launch.IProjectLaunchCommand; +import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchDelegate; import org.tizen.nativecommon.launch.TizenLaunchMessages; import org.tizen.sdblib.IDevice; @@ -103,6 +104,11 @@ public class TizenValgrindLaunchDelegate extends TizenLaunchDelegate { new SubProgressMonitor(monitor, 9)); verifyBuildConfiguration(config, mode, new SubProgressMonitor(monitor, 11)); + setConsole(config); + tizenCommand = new TizenLaunchCommand(currentDevice, launchConsole); + // FIXME: ad-hoc code. + launchConsole.show(); + // getLaunchSession(config, new SubProgressMonitor(monitor, 1)); if (mode.equals(ILaunchManager.PROFILE_MODE)) { diff --git a/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java b/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java index d010c28..501d8d4 100644 --- a/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java +++ b/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java @@ -29,6 +29,7 @@ import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin; import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView; import org.eclipse.linuxtools.valgrind.ui.ValgrindUIPlugin; import org.eclipse.linuxtools.valgrind.ui.ValgrindViewPart; +import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchDelegate; public class MassifLaunchDelegate extends TizenLaunchDelegate implements @@ -89,6 +90,7 @@ public class MassifLaunchDelegate extends TizenLaunchDelegate implements String targetlog_massif = ValgrindLaunchPlugin.RESULT_DIR + OUT_FILE; String hostlog_massif = ValgrindHostdir + File.separator + OUT_FILE; + // --bery sftp dowonload // session.downloadFile(targetlog_massif,hostlog_massif); File file = new File(hostlog_massif); diff --git a/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java b/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java index f980d28..cbffe30 100644 --- a/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java +++ b/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java @@ -29,6 +29,7 @@ import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin; import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView; import org.eclipse.linuxtools.valgrind.ui.ValgrindUIPlugin; import org.eclipse.linuxtools.valgrind.ui.ValgrindViewPart; +import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchDelegate; import org.xml.sax.SAXException; @@ -59,7 +60,8 @@ public class MemcheckLaunchDelegate extends TizenLaunchDelegate implements IValg String ValgrindHostdir = ValgrindUIPlugin.getDefault().getStateLocation().toOSString(); String targetlog=ValgrindLaunchPlugin.RESULT_DIR +"valgrind.xml"; String hostlog =ValgrindHostdir + File.separator + "valgrind_out.xml"; - //--bery sftp dowonload + + //--bery sftp dowonload File file = new File(hostlog); if(file.exists()){ file.delete(); -- 2.7.4