[Esbox-commits] r1921 - in branches/work_Ed: org.maemo.esbox.help/html/concepts org.maemo.esbox.help/html/images/flash org.maemo.esbox.help/html/images/profiling org.maemo.esbox.help/html/reference org.maemo.esbox.help/html/tasks org.maemo.esbox.launch.analysis org.maemo.esbox.launch.analysis/icons/full/obj16 org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools

eswartz at garage.maemo.org eswartz at garage.maemo.org
Mon Aug 3 17:25:09 EEST 2009


Author: eswartz
Date: 2009-08-03 17:25:01 +0300 (Mon, 03 Aug 2009)
New Revision: 1921

Added:
   branches/work_Ed/org.maemo.esbox.help/html/images/profiling/ltrace-menu.png
   branches/work_Ed/org.maemo.esbox.help/html/images/profiling/ltrace-view.png
   branches/work_Ed/org.maemo.esbox.launch.analysis/icons/full/obj16/ltrace.gif
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchConfigurationTabGroup.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchShortcut.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchConfigurationTabGroup.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchShortcut.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchConfigurationTabGroup.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchShortcut.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchConfigurationTabGroup.java
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchShortcut.java
Modified:
   branches/work_Ed/org.maemo.esbox.help/html/concepts/ProfilingApplications.html
   branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-3.png
   branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-4.png
   branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-4b.png
   branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-5.png
   branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-sessions.png
   branches/work_Ed/org.maemo.esbox.help/html/reference/FAQ.html
   branches/work_Ed/org.maemo.esbox.help/html/tasks/ProfilingMaemoApplications.html
   branches/work_Ed/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html
   branches/work_Ed/org.maemo.esbox.launch.analysis/plugin.xml
   branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/IESboxAnalysisLaunchConstants.java
   branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/XLauncher.java
Log:
Merge to rev 1918 from trunk

Modified: branches/work_Ed/org.maemo.esbox.help/html/concepts/ProfilingApplications.html
===================================================================
--- branches/work_Ed/org.maemo.esbox.help/html/concepts/ProfilingApplications.html	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.help/html/concepts/ProfilingApplications.html	2009-08-03 14:25:01 UTC (rev 1921)
@@ -16,8 +16,9 @@
 By simply profiling an application, it becomes immediately apparent where the 
 overwhelming memory and CPU burdens exist, and allows you to quickly squash them.
 ESbox provides support for <a href="http://www.valgrind.org/">Valgrind</a> 
-memory profiler and <a href="http://oprofile.sourceforge.net/news/">OProfile</a> 
-system-wide profiler for both C/C++ and Python Projects.</p>
+memory profiler, <a href="http://oprofile.sourceforge.net/news/">OProfile</a> 
+system-wide profiler and <a href="http://www.ltrace.org">Ltrace</a> library call monitor
+ for both C/C++ and Python Projects.</p>
 
 <h3 class="style1">Valgrind</h3>
 <p>Valgrind is an Open Source suite of tools for debugging and profiling Linux programs. 
@@ -42,6 +43,15 @@
 of a wide variety of interesting statistics, which can also be used for basic 
 time-spent profiling. All code is profiled: hardware and software interrupt handlers, 
 kernel modules, the kernel, shared libraries, and applications.</p>
+
+
+
+<h3 class="style1">Ltrace</h3>
+<p>Ltrace is a debugging program which runs a specified command until it exits. 
+While the command is executing, ltrace intercepts and records the dynamic library calls 
+which are called by the executed process and the signals received by that process.</p>
+
+
 <h3>Related Topic</h3>
 <ul>
   <li><a href="../tasks/ProfilingMaemoApplications.html">Profiling Maemo Applications</a>  </li>

Modified: branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-3.png
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-4.png
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-4b.png
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-5.png
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.help/html/images/flash/wiz-flash-sessions.png
===================================================================
(Binary files differ)

Copied: branches/work_Ed/org.maemo.esbox.help/html/images/profiling/ltrace-menu.png (from rev 1920, trunk/org.maemo.esbox.help/html/images/profiling/ltrace-menu.png)
===================================================================
(Binary files differ)

Copied: branches/work_Ed/org.maemo.esbox.help/html/images/profiling/ltrace-view.png (from rev 1920, trunk/org.maemo.esbox.help/html/images/profiling/ltrace-view.png)
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.help/html/reference/FAQ.html
===================================================================
--- branches/work_Ed/org.maemo.esbox.help/html/reference/FAQ.html	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.help/html/reference/FAQ.html	2009-08-03 14:25:01 UTC (rev 1921)
@@ -239,7 +239,7 @@
 Samba sharing from the host to the VM.</p>
 <p>See the <a href="http://maemovmware.garage.maemo.org/">Maemo SDK virtual image page</a>
 for configured and supported images and the
-<a href="http://esbox.garage.maemo.org/2nd_edition/virtual_machines.html">ESbox virtual machine support documentation</a>.
+<a href="../tasks/virtual_machines.html">ESbox virtual machine documentation</a>.
 </div>
 <hr>
 <div id="ask" dir="LTR">

Modified: branches/work_Ed/org.maemo.esbox.help/html/tasks/ProfilingMaemoApplications.html
===================================================================
--- branches/work_Ed/org.maemo.esbox.help/html/tasks/ProfilingMaemoApplications.html	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.help/html/tasks/ProfilingMaemoApplications.html	2009-08-03 14:25:01 UTC (rev 1921)
@@ -32,9 +32,9 @@
   Profiling is one of the most important techniques available for programmers to discover problems
   in applications. By profiling an application, it becomes immediately apparent where the 
   overwhelming memory and CPU burdens exist, and allows you to quickly squash them. ESbox provides
-  support for <a href="http://www.valgrind.org/">Valgrind</a> memory profiler and 
-  <a href="http://oprofile.sourceforge.net/news/">OProfile</a> system-wide profiler for both C/C++
-  and Python Projects.
+  support for <a href="http://www.valgrind.org/">Valgrind</a> memory profiler, <a href="http://oprofile.sourceforge.net/news/">OProfile</a> 
+  system-wide profiler and <a href="http://www.ltrace.org">Ltrace</a> library call monitor 
+  for both C/C++ and Python Projects.
  </p>
 
  <h3>Using Valgrind</h3>
@@ -95,7 +95,33 @@
  <p>
   <img src="../images/profiling/oprofile-view.png">
  </p>
+ 
+  <h3>Using Ltrace</h3>
+ <p>
+  Ltrace is a debugging program which runs a specified command until it exits. 
+  While the command is executing, ltrace intercepts and records the dynamic library 
+  calls which are called by the executed process and the signals received by that process.
+ </p>
 
+ <p>
+  To run LTrace, right-click on the application (binary for C/C++ projects or the Python script
+  for Python projects) and select <strong>Profile As &gt; Local/Remote Ltrace Profiler</strong>. 
+ </p> 
+ 
+ <p>
+  <img src="../images/profiling/ltrace-menu.png">
+ </p>
+ 
+ <p>
+  After Ltrace starts, ESbox launches your application on the SDKTarget and
+  the result is shown in Ltrace view. All Library and System calls are shown
+  as a tree: parent nodes and child nodes for each new nested call.
+ </p>
+ 
+ <p>
+  <img src="../images/profiling/ltrace-view.png">
+ </p>
+
 </body>
 </html>
 

Modified: branches/work_Ed/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html
===================================================================
--- branches/work_Ed/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html	2009-08-03 14:25:01 UTC (rev 1921)
@@ -479,6 +479,28 @@
 	</li>
 	<li>Shared folder configuration
 	<ul>
+		<li>If you cannot mount to shared folders published from Windows, and
+		you get the error <tt>"mount error 12 = cannot allocate memory"</tt>,
+		then this is a host issue.  You can fix this in your Windows registry.
+		<p>Edit the key 
+		<pre>
+		HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\IRPStackSize
+		</pre>
+		<p>
+		Define it as a DWORD value (if missing).  Set it to a value in
+		the decimal range 15 to 18.  (The documentation is unclear what this
+		value indicates, so it may require some experimentation.)
+		</p>
+		<p>The new setting will only be read when the sharing service
+		is restarted.  You may do this via 
+		<strong>Control Panel &gt; Administrative Tools &gt; Services &gt;
+		Server</strong> and restart, or if you've got more time to kill,
+		reboot your system.
+		</p>
+		<p>
+		Also see <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;177078">the Microsoft Knowledge Base article</a>
+		for more information.
+		</li>
 		<li>Be careful about the time synchronization configuration in the VM or the timezone
 		used in the VM image.
 		<p>

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/icons/full/obj16/ltrace.gif (from rev 1920, trunk/org.maemo.esbox.launch.analysis/icons/full/obj16/ltrace.gif)
===================================================================
(Binary files differ)

Modified: branches/work_Ed/org.maemo.esbox.launch.analysis/plugin.xml
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/plugin.xml	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/plugin.xml	2009-08-03 14:25:01 UTC (rev 1921)
@@ -26,7 +26,26 @@
             sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
             sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
       </launchConfigurationType>
-
+      
+	 <launchConfigurationType
+            delegate="org.maemo.mica.cpp.launch.analysis.ltrace.CppLtraceLocalLaunchDelegate"
+            id="org.maemo.esbox.analysis.launch.cpp.LtraceLocalLaunchType"
+            modes="profile"
+            name="Local Ltrace Profiler"
+            public="true"
+            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+      </launchConfigurationType>
+      
+	 <launchConfigurationType
+            delegate="org.maemo.mica.cpp.launch.analysis.ltrace.CppLtraceRemoteLaunchDelegate"
+            id="org.maemo.esbox.analysis.launch.cpp.LtraceRemoteLaunchType"
+            modes="profile"
+            name="Remote Ltrace Profiler"
+            public="true"
+            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+      </launchConfigurationType>
  	</extension>
     <extension
          point="org.eclipse.debug.ui.launchConfigurationTabGroups">
@@ -40,6 +59,18 @@
             id="valgrindLaunchTabGroup"
             type="org.maemo.esbox.analysis.launch.cpp.ValgrindLocalLaunchType">
       </launchConfigurationTabGroup>
+      
+     <launchConfigurationTabGroup
+            class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceLocalLaunchConfigurationTabGroup"
+            id="ltraceLocalLaunchTabGroup"
+            type="org.maemo.esbox.analysis.launch.cpp.LtraceLocalLaunchType">
+      </launchConfigurationTabGroup>
+      
+     <launchConfigurationTabGroup
+            class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceRemoteLaunchConfigurationTabGroup"
+            id="ltraceRemoteLaunchTabGroup"
+            type="org.maemo.esbox.analysis.launch.cpp.LtraceRemoteLaunchType">
+      </launchConfigurationTabGroup>
 	</extension>
 	
  	
@@ -55,7 +86,18 @@
             icon="icons/full/obj16/valgrind_local.gif"
             id="valgrindLaunchTypeImage">
       </launchConfigurationTypeImage>
- 		
+      
+      <launchConfigurationTypeImage
+            configTypeID="org.maemo.esbox.analysis.launch.cpp.LtraceLocalLaunchType"
+            icon="icons/full/obj16/ltrace.gif"
+            id="ltraceLocalLaunchTypeImage">
+      </launchConfigurationTypeImage>
+      
+      <launchConfigurationTypeImage
+            configTypeID="org.maemo.esbox.analysis.launch.cpp.LtraceRemoteLaunchType"
+            icon="icons/full/obj16/ltrace.gif"
+            id="ltraceRemoteLaunchTypeImage">
+      </launchConfigurationTypeImage>
  	</extension>
  	
    <extension
@@ -139,7 +181,94 @@
                id="org.maemo.esbox.analysis.launch.cpp.ValgrindLocalLaunchType">
          </configurationType>
       </shortcut>
+      
+      
+      <shortcut
+            class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceLocalLaunchShortcut"
+            icon="icons/full/obj16/ltrace.gif"
+            id="maemoLtraceShortcut"
+            label="Local Ltrace Profiler"
+            modes="profile">
+         <contextualLaunch>
+            <enablement>
+               <with
+                     variable="selection">
+                  <count
+                        value="1">
+                  </count>
+                  <iterate>
+                   <and>
+	                     <test
+		                      forcePluginActivation="true"
+                              property="org.maemo.mica.common.hasNature"
+ 		                      value="org.maemo.esbox.cpp.project.cppNature"/>
+                        <test
+                              forcePluginActivation="true"
+                              property="org.maemo.mica.maemosdk.isEmulatorTarget"/>
+                       <test
+                          	  forcePluginActivation="true"
+                          	  property="org.maemo.mica.cpp.isCppLaunchable"/>
+
+                    </and> 
+                    </iterate>
+               </with></enablement>
+            <contextLabel
+                  label="Local Ltrace Profiler"
+                  mode="profile">
+            </contextLabel></contextualLaunch>
+         <configurationType
+               id="org.maemo.esbox.analysis.launch.cpp.LtraceLocalLaunchType">
+         </configurationType>
+      </shortcut>
+ 	 
+ 	 <shortcut
+            class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceRemoteLaunchShortcut"
+            icon="icons/full/obj16/ltrace.gif"
+            id="maemoLtraceShortcut"
+            label="Remote Ltrace Profiler"
+            modes="profile">
+         <contextualLaunch>
+            <enablement>
+               <with
+                     variable="selection">
+                  <count
+                        value="1">
+                  </count>
+                  <iterate>
+                   <and>
+	                     <test
+		                      forcePluginActivation="true"
+                              property="org.maemo.mica.common.hasNature"
+ 		                      value="org.maemo.esbox.cpp.project.cppNature"/>
+
+                        <test
+                              forcePluginActivation="true"
+                              property="org.maemo.mica.maemosdk.isRemoteTarget"/>
+                              
+                        <test
+	                              forcePluginActivation="true"
+	                              property="org.maemo.mica.maemosdk.isARMELTarget"/>
+	                              
+                        <test
+                              forcePluginActivation="true"
+                              property="org.maemo.mica.maemosdk.isEmulatorTarget"/>
+                       <test
+                          	  forcePluginActivation="true"
+                          	  property="org.maemo.mica.cpp.isCppLaunchable"/>
+
+                    </and> 
+                    </iterate>
+               </with></enablement>
+            <contextLabel
+                  label="Remote Ltrace Profiler"
+                  mode="profile">
+            </contextLabel></contextualLaunch>
+         <configurationType
+               id="org.maemo.esbox.analysis.launch.cpp.LtraceRemoteLaunchType">
+         </configurationType>
+      </shortcut>
  	
+ 	
  	</extension>
  	
  	<!-- Python -->
@@ -161,6 +290,23 @@
             name="Local Valgrind Profiler (Python)"
             public="true">
       </launchConfigurationType>
+      
+       <launchConfigurationType
+            delegate="org.maemo.mica.python.launch.analysis.ltrace.PythonLtraceLocalLaunchDelegate"
+            id="org.maemo.esbox.analysis.launch.python.LtraceLocalLaunchType"
+            modes="profile"
+            name="Local Ltrace Profiler (Python)"
+            public="true">
+      </launchConfigurationType>
+      
+     <launchConfigurationType
+            delegate="org.maemo.mica.python.launch.analysis.ltrace.PythonLtraceRemoteLaunchDelegate"
+            id="org.maemo.esbox.analysis.launch.python.LtraceRemoteLaunchType"
+            modes="profile"
+            name="Remote Ltrace Profiler (Python)"
+            public="true">
+      </launchConfigurationType>
+      
 	</extension>
    <extension
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
@@ -174,7 +320,20 @@
             icon="icons/full/obj16/valgrind_local.gif"
             id="esboxPythonValgrindLaunchTypeImage">
       </launchConfigurationTypeImage>
+      
+     <launchConfigurationTypeImage
+            configTypeID="org.maemo.esbox.analysis.launch.python.LtraceLocalLaunchType"
+            icon="icons/full/obj16/ltrace.gif"
+            id="esboxPythonLtraceLocalLaunchTypeImage">
+      </launchConfigurationTypeImage>
+      
+     <launchConfigurationTypeImage
+            configTypeID="org.maemo.esbox.analysis.launch.python.LtraceRemoteLaunchType"
+            icon="icons/full/obj16/ltrace.gif"
+            id="esboxPythonLtraceRemoteLaunchTypeImage">
+      </launchConfigurationTypeImage>
 	</extension>
+	
     <extension
          point="org.eclipse.debug.ui.launchConfigurationTabGroups">
       <launchConfigurationTabGroup
@@ -187,6 +346,19 @@
             id="org.maemo.esbox.analysis.launch.python.ValgrindLocalLaunchTabGroup"
             type="org.maemo.esbox.analysis.launch.python.ValgrindLocalLaunchType">
       </launchConfigurationTabGroup>
+      
+     <launchConfigurationTabGroup
+            class="org.maemo.esbox.internal.analysis.launch.ESboxPythonLtraceLocalLaunchConfigurationTabGroup"
+            id="org.maemo.esbox.analysis.launch.python.LtraceLocalLaunchTabGroup"
+            type="org.maemo.esbox.analysis.launch.python.LtraceLocalLaunchType">
+      </launchConfigurationTabGroup>
+      
+      <launchConfigurationTabGroup
+            class="org.maemo.esbox.internal.analysis.launch.ESboxPythonLtraceRemoteLaunchConfigurationTabGroup"
+            id="org.maemo.esbox.analysis.launch.python.LtraceRemoteLaunchTabGroup"
+            type="org.maemo.esbox.analysis.launch.python.LtraceRemoteLaunchType">
+      </launchConfigurationTabGroup>
+      
 	</extension>
    <extension
          point="org.eclipse.debug.ui.launchShortcuts">
@@ -278,8 +450,102 @@
          <configurationType
                id="org.maemo.esbox.analysis.launch.python.OProfileRemoteLaunchType">
          </configurationType>
-    	        	
         </shortcut>
+        
+         <shortcut
+              class="org.maemo.esbox.internal.analysis.launch.ESboxPythonLtraceLocalLaunchShortcut"
+              icon="icons/full/obj16/ltrace.gif"
+              id="org.maemo.esbox.analysis.launch.python.LocalLtraceShortcut"
+              label="Local Ltrace Profiler (Python)"
+              modes="profile">
+        	<contextualLaunch>
+            	<enablement>
+               		<with
+                     	variable="selection">
+                  	<count
+                        value="1">
+                  	</count>
+                  	<iterate>
+                  		<and>
+	                     <test
+		                     	 forcePluginActivation="true"
+                              	 property="org.maemo.mica.common.hasNature"
+ 			                     value="org.maemo.esbox.python.project.pythonNature"/>
+		                    <test
+	                              forcePluginActivation="true"
+	                              property="org.maemo.mica.maemosdk.isEmulatorTarget"/>
+	                       <test
+	                          	forcePluginActivation="true"
+	                          	property="org.maemo.mica.python.isPythonLaunchable"/>
+
+	                     </and>
+                  	</iterate>
+               		</with>
+            	</enablement>
+            	<contextLabel
+                  label="Local Ltrace Python Profiler"
+                  mode="profile">
+            	</contextLabel>
+        	</contextualLaunch>
+ 			<!-- this maps the shortcut back to the launch configuration type,
+	         allowing the Run/Debug Settings UI in the Resource properties view 
+	         to show associated launch configs -->
+	         <configurationType
+	               id="org.maemo.esbox.analysis.launch.python.LtraceLocalLaunchType">
+	         </configurationType>        	
+        </shortcut>
+        
+        
+         <shortcut
+              class="org.maemo.esbox.internal.analysis.launch.ESboxPythonLtraceRemoteLaunchShortcut"
+              icon="icons/full/obj16/ltrace.gif"
+              id="org.maemo.esbox.analysis.launch.python.RemoteLtraceShortcut"
+              label="Remote Ltrace Profiler (Python)"
+              modes="profile">
+        	<contextualLaunch>
+            	<enablement>
+               		<with
+                     	variable="selection">
+                  	<count
+                        value="1">
+                  	</count>
+                  	<iterate>
+                  		<and>
+	                     <test
+		                     	 forcePluginActivation="true"
+                              	 property="org.maemo.mica.common.hasNature"
+ 			                     value="org.maemo.esbox.python.project.pythonNature"/>
+		                    <test
+	                              forcePluginActivation="true"
+	                              property="org.maemo.mica.maemosdk.isEmulatorTarget"/>
+	                       <test
+	                          	forcePluginActivation="true"
+	                          	property="org.maemo.mica.python.isPythonLaunchable"/>
+	                        
+	                        <test
+	                              forcePluginActivation="true"
+	                              property="org.maemo.mica.maemosdk.isRemoteTarget"/>
+	                        
+	                        <test
+	                              forcePluginActivation="true"
+	                              property="org.maemo.mica.maemosdk.isARMELTarget"/>
+
+	                     </and>
+                  	</iterate>
+               		</with>
+            	</enablement>
+            	<contextLabel
+                  label="Remote Ltrace Python Profiler"
+                  mode="profile">
+            	</contextLabel>
+        	</contextualLaunch>
+ 			<!-- this maps the shortcut back to the launch configuration type,
+	         allowing the Run/Debug Settings UI in the Resource properties view 
+	         to show associated launch configs -->
+	         <configurationType
+	               id="org.maemo.esbox.analysis.launch.python.LtraceRemoteLaunchType">
+	         </configurationType>        	
+        </shortcut>
 	</extension>	   
  	      
 </plugin>

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchConfigurationTabGroup.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchConfigurationTabGroup.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchConfigurationTabGroup.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchConfigurationTabGroup.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.maemo.mica.cpp.launch.analysis.ltrace.AbstractCppLtraceLocalLaunchConfigurationTabGroup;
+import org.maemo.mica.internal.api.cpp.launch.AbstractCppLaunchShortcut;
+
+/**
+ * @author Fabr�cio S Epaminondas (UFCG)
+ * 
+ */
+public class ESboxCppLtraceLocalLaunchConfigurationTabGroup extends
+		AbstractCppLtraceLocalLaunchConfigurationTabGroup {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.maemo.mica.cpp.launch.AbstractCppLaunchConfigurationTabGroup#
+	 * getLaunchShortcut()
+	 */
+	@Override
+	protected AbstractCppLaunchShortcut getLaunchShortcut() {
+		return new ESboxCppLtraceLocalLaunchShortcut();
+	}
+
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchShortcut.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchShortcut.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchShortcut.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceLocalLaunchShortcut.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.eclipse.debug.ui.ILaunchShortcut;
+import org.maemo.mica.cpp.launch.analysis.ltrace.AbstractCppLtraceLocalLaunchShortcut;
+
+/**
+ * @author Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxCppLtraceLocalLaunchShortcut extends
+		AbstractCppLtraceLocalLaunchShortcut implements ILaunchShortcut {
+
+	public String getLaunchConfigurationType() {
+		return IESboxAnalysisLaunchConstants.CPP_LTRACE_LOCAL_LAUNCH_TYPE;
+	}
+
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchConfigurationTabGroup.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchConfigurationTabGroup.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchConfigurationTabGroup.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchConfigurationTabGroup.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.maemo.mica.cpp.launch.analysis.ltrace.AbstractCppLtraceRemoteLaunchConfigurationTabGroup;
+import org.maemo.mica.internal.api.cpp.launch.AbstractCppLaunchShortcut;
+
+/**
+ * @author Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxCppLtraceRemoteLaunchConfigurationTabGroup extends
+			AbstractCppLtraceRemoteLaunchConfigurationTabGroup{
+
+	/* (non-Javadoc)
+	 * @see org.maemo.mica.internal.api.cpp.launch.AbstractCppLaunchConfigurationTabGroup#getLaunchShortcut()
+	 */
+	@Override
+	protected AbstractCppLaunchShortcut getLaunchShortcut() {
+		return new ESboxCppLtraceRemoteLaunchShortcut();
+	}
+
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchShortcut.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchShortcut.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchShortcut.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxCppLtraceRemoteLaunchShortcut.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.eclipse.debug.ui.ILaunchShortcut;
+import org.maemo.mica.cpp.launch.analysis.ltrace.AbstractCppLtraceRemoteLaunchShortcut;
+
+/**
+ * @author Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxCppLtraceRemoteLaunchShortcut extends
+		AbstractCppLtraceRemoteLaunchShortcut implements ILaunchShortcut {
+	public String getLaunchConfigurationType() {
+		return IESboxAnalysisLaunchConstants.CPP_LTRACE_REMOTE_LAUNCH_TYPE;
+	}
+
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchConfigurationTabGroup.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchConfigurationTabGroup.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchConfigurationTabGroup.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchConfigurationTabGroup.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceLocalLaunchConfigurationTabGroup;
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceLocalLaunchShortcut;
+
+/**
+ * @author  Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxPythonLtraceLocalLaunchConfigurationTabGroup extends
+		AbstractPythonLtraceLocalLaunchConfigurationTabGroup {
+
+	/* (non-Javadoc)
+	 * @see org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceLocalLaunchConfigurationTabGroup#getLaunchShortcut()
+	 */
+	@Override
+	protected AbstractPythonLtraceLocalLaunchShortcut getLaunchShortcut() {
+		return new ESboxPythonLtraceLocalLaunchShortcut();
+	}
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchShortcut.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchShortcut.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchShortcut.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceLocalLaunchShortcut.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.eclipse.debug.ui.ILaunchShortcut;
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceLocalLaunchShortcut;
+
+/**
+ * @author Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxPythonLtraceLocalLaunchShortcut extends
+		AbstractPythonLtraceLocalLaunchShortcut implements ILaunchShortcut {
+
+	/* (non-Javadoc)
+	 * @see org.maemo.mica.common.launch.IMicaLaunchShortcut#getLaunchConfigurationType()
+	 */
+	public String getLaunchConfigurationType() {
+		return IESboxAnalysisLaunchConstants.PYTHON_LTRACE_LOCAL_LAUNCH_TYPE;
+	}
+
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchConfigurationTabGroup.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchConfigurationTabGroup.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchConfigurationTabGroup.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchConfigurationTabGroup.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceRemoteLaunchConfigurationTabGroup;
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceRemoteLaunchShortcut;
+
+/**
+ * @author  Fabrício S Epaminondas (UFCG)
+ *
+ */
+public class ESboxPythonLtraceRemoteLaunchConfigurationTabGroup extends
+		AbstractPythonLtraceRemoteLaunchConfigurationTabGroup{
+
+	/* (non-Javadoc)
+	 * @see org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceRemoteLaunchConfigurationTabGroup#getLaunchShortcut()
+	 */
+	@Override
+	protected AbstractPythonLtraceRemoteLaunchShortcut getLaunchShortcut() {
+		return new ESboxPythonLtraceRemoteLaunchShortcut();
+	}
+}

Copied: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchShortcut.java (from rev 1920, trunk/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchShortcut.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchShortcut.java	                        (rev 0)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/ESboxPythonLtraceRemoteLaunchShortcut.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Fabrício S Epaminondas (UFCG) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.analysis.launch;
+
+import org.eclipse.debug.ui.ILaunchShortcut;
+import org.maemo.mica.python.launch.analysis.ltrace.AbstractPythonLtraceRemoteLaunchShortcut;
+
+/**
+ * @author Fabrício S Epaminondas (UFCG)
+ * 
+ */
+public class ESboxPythonLtraceRemoteLaunchShortcut extends
+		AbstractPythonLtraceRemoteLaunchShortcut implements ILaunchShortcut {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.maemo.mica.common.launch.IMicaLaunchShortcut#getLaunchConfigurationType
+	 * ()
+	 */
+	public String getLaunchConfigurationType() {
+		return IESboxAnalysisLaunchConstants.PYTHON_LTRACE_REMOTE_LAUNCH_TYPE;
+	}
+
+}

Modified: branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/IESboxAnalysisLaunchConstants.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/IESboxAnalysisLaunchConstants.java	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.launch.analysis/src/org/maemo/esbox/internal/analysis/launch/IESboxAnalysisLaunchConstants.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -20,8 +20,11 @@
 
 	String CPP_OPROFILE_REMOTE_LAUNCH_TYPE = Activator.PLUGIN_ID + ".cpp.OProfileRemoteLaunchType";
 	String CPP_VALGRIND_LOCAL_LAUNCH_TYPE = Activator.PLUGIN_ID + ".cpp.ValgrindLocalLaunchType";
+	String CPP_LTRACE_LOCAL_LAUNCH_TYPE = Activator.PLUGIN_ID + ".cpp.LtraceLocalLaunchType";
+	String CPP_LTRACE_REMOTE_LAUNCH_TYPE = Activator.PLUGIN_ID + ".cpp.LtraceRemoteLaunchType";
 	
 	String PYTHON_OPROFILE_REMOTE_LAUNCH_TYPE = Activator.PLUGIN_ID + ".python.OProfileRemoteLaunchType";
 	String PYTHON_VALGRIND_LOCAL_LAUNCH_TYPE = Activator.PLUGIN_ID + ".python.ValgrindLocalLaunchType";
-
+	String PYTHON_LTRACE_LOCAL_LAUNCH_TYPE = Activator.PLUGIN_ID + ".python.LtraceLocalLaunchType";
+	String PYTHON_LTRACE_REMOTE_LAUNCH_TYPE = Activator.PLUGIN_ID + ".python.LtraceRemoteLaunchType";
 }

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/XLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/XLauncher.java	2009-08-03 14:16:46 UTC (rev 1920)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/XLauncher.java	2009-08-03 14:25:01 UTC (rev 1921)
@@ -12,7 +12,17 @@
 
 package org.maemo.esbox.internal.api.maemosdk.core.tools;
 
-import org.eclipse.core.runtime.*;
+import java.io.IOException;
+import java.net.Socket;
+import java.text.MessageFormat;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.jobs.Job;
 import org.maemo.esbox.internal.maemosdk.core.Activator;
 import org.maemo.esbox.maemosdk.core.MaemoPreferenceConstants;
@@ -26,16 +36,15 @@
 import org.maemo.mica.common.core.machine.ProcessFilterCmdLineRegexp;
 import org.maemo.mica.common.core.preferences.CorePreferenceManager;
 import org.maemo.mica.common.core.preferences.IPreferenceProvider;
-import org.maemo.mica.common.core.process.*;
+import org.maemo.mica.common.core.process.CommandLineArguments;
+import org.maemo.mica.common.core.process.IProcessLauncher;
+import org.maemo.mica.common.core.process.IProcessLauncherFactory;
+import org.maemo.mica.common.core.process.IProcessMonitor;
+import org.maemo.mica.common.core.process.ProcessLauncherParameters;
+import org.maemo.mica.common.core.process.ProcessLauncherUtils;
 import org.maemo.mica.common.core.sdk.ISDKTarget;
 import org.maemo.mica.maemosdk.core.IMaemoSDKPlatform;
 
-import java.io.IOException;
-import java.net.Socket;
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.regex.Pattern;
-
 /**
  * This class maintains knowledge about whether the X server is running in the
  * host, and controls access to starting, stopping, and querying status.
@@ -228,7 +237,12 @@
 		
 		List<String> newCommandLine = getDisplayXServerCommand(prefProvider);
 		if (previousCommandLine != null) {
-			return previousCommandLine.equals(newCommandLine);
+			// Check if processes match, but ignore full executable path and only check process names.  
+			return previousCommandLine.size() >= 1 && previousCommandLine.size() == newCommandLine.size() &&
+				newCommandLine.subList(1, newCommandLine.size()).equals(
+					previousCommandLine.subList(1, previousCommandLine.size()))
+					&& getSimpleProcessName(previousCommandLine.get(0)).equals(
+							getSimpleProcessName(newCommandLine.get(0)));
 		}
 		
 		// we didn't launch it....
@@ -425,9 +439,31 @@
 		previousDisplay = null;
 		
 		// find server to kill
-		if (cmdLine.size() > 0) {
-			killProcess(cmdLine.get(0), "Killing X Server");
+		
+		if (cmdLine.isEmpty()) {
+			return;
 		}
+
+		String executable = getSimpleProcessName(cmdLine.get(0));
+		String diplay = getDisplayValue(prefProvider);
+		
+		IProcess[] processes = MachineRegistry.getInstance().getLocalMachine().
+			getProcessLister().getProcesses(new ProcessFilterCmdLineRegexp(
+					".*" + Pattern.quote(executable) + ".*\\s+" +
+					Pattern.quote(diplay) + "(?:\\s.*|$)", 
+					Pattern.CASE_INSENSITIVE )).toArray(new IProcess[]{});
+
+		if (processes.length <= 0) {
+			processes = getMatchingXProcesses(executable);
+		}
+	
+		for (IProcess process : processes) {
+			try {
+				process.terminate();
+			} catch (IOException e) {
+				throw new MicaException("Error killing " + executable, e);
+			}
+		}
 	}
 
 	/**
@@ -506,36 +542,29 @@
 	}
 
 	/**
-	 * Kill all instances of a given process
-	 * 
-	 * @param processLabel
-	 *            the user-visible name for the process
+	 * Get pure process name from process name string. 
+	 * Example '/bin/sh' returns 'sh' and 'sh' returns 'sh'.
+	 *
+	 * @param processName the process name
+	 * @return the pure process name
 	 */
-	private void killProcess(String processName,
-			String processLabel) throws MicaException {
-		IProcess[] processes = getMatchingXProcesses(processName);
-		for (IProcess process : processes) {
-			try {
-				process.terminate();
-			} catch (IOException e) {
-				throw new MicaException("Error killing " + processName, e);
-			}
+	private static String getSimpleProcessName(String processName) {
+		// resolve pure process name
+		int slashIndex = processName.lastIndexOf("/");
+		if(slashIndex != -1){
+			processName = processName.substring(slashIndex+1); 
 		}
+		return processName;
 	}
-
+	
 	/**
 	 * @param machine
 	 * @return
 	 */
 	private IProcess[] getMatchingXProcesses(String processName) {
-		// resolve pure process name
-		int slashIndex = processName.lastIndexOf("/");
-		if(slashIndex != -1){
-			processName = processName.substring(slashIndex+1); 
-		}
 		List<IProcess> processes = MachineRegistry.getInstance().getLocalMachine().
 			getProcessLister().getProcesses(
-				new ProcessFilterCmdLineRegexp(".*" + processName + ".*",Pattern.CASE_INSENSITIVE));
+				new ProcessFilterCmdLineRegexp(".*" + Pattern.quote(getSimpleProcessName(processName)) + ".*",Pattern.CASE_INSENSITIVE));
 		return (IProcess[]) processes.toArray(new IProcess[processes.size()]);
 	}
 



More information about the Esbox-commits mailing list