From 74346143217a708f49a77d03c8eda485774e72bb Mon Sep 17 00:00:00 2001 From: "wonhyoung2.park" Date: Mon, 31 Oct 2011 21:37:53 +0900 Subject: [PATCH] [title] raise exception when the valgrind run in emulator. (for window) [Type] [Module] profiler [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- .../linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 fdf641a..a0dcc5d 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 @@ -20,6 +20,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Platform; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.linuxtools.valgrind.core.ValgrindCommand; @@ -64,7 +65,14 @@ public class MemcheckLaunchDelegate extends SLPLaunchDelegate implements IValgri DialogUtil.openErrorDialog("Application is terminated forcefully. Profiling cannot complete."); return; } - + if (DeviceManager.getSelectedDevice().getMachineType() + .equals(IMachine.VIRTUAL_DEVICE) + && Platform.getOS().equals(Platform.OS_WIN32)) { + Exception te; + te = new Exception( + "Can not use valgrind, because the host doesn't support Intel VT"); + throw (te); + } String ValgrindHostdir = ValgrindUIPlugin.getDefault().getStateLocation().append("Valgrind_XML").toOSString(); String targetlog=ValgrindLaunchPlugin.RESULT_DIR +"valgrind.xml"; String hostlog =ValgrindHostdir + File.separator + "valgrind_out.xml"; -- 2.7.4