add valgrind error message for real device execution
authorjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 28 Jul 2011 14:52:49 +0000 (23:52 +0900)
committerjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 28 Jul 2011 14:52:49 +0000 (23:52 +0900)
org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckLaunchDelegate.java

index 2d032fc..144628f 100644 (file)
@@ -31,6 +31,8 @@ import org.eclipse.linuxtools.valgrind.ui.ValgrindViewPart;
 import org.xml.sax.SAXException;
 
 import com.samsung.ide.common.util.DialogUtil;
+import com.samsung.ide.connection.device.DeviceManager;
+import com.samsung.ide.connection.machine.IMachine;
 import com.samsung.ide.connection.session.ISession;
 import com.samsung.freshide.launch.SLPLaunchDelegate;
 
@@ -78,7 +80,15 @@ public class MemcheckLaunchDelegate extends SLPLaunchDelegate implements IValgri
                                abort(Messages.getString("MemcheckLaunchDelegate.Error_parsing_output"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
                                e.printStackTrace();
                        } catch (SAXException e) {
-                               abort(Messages.getString("MemcheckLaunchDelegate.Error_parsing_output"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
+                               Exception te;
+                               if(DeviceManager.getSelectedDevice().getMachineType().equals(IMachine.REAL_DEVICE))
+                               {
+                                       te = new Exception("Currently valgrind profiling is not supported in 'Real Device'. Please use valgrind profiling in 'Emulator'.");
+                               }
+                               else
+                                       te = e;
+
+                               abort(Messages.getString("MemcheckLaunchDelegate.Error_parsing_output"), te, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
                                e.printStackTrace();
                        } catch (InterruptedException e) {
                        }