Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Baron2010-07-27 00:23:33 -0400
committerElliott Baron2010-07-27 00:23:33 -0400
commita38c074bbd423ffdd9333b061cd07f9b38fb946d (patch)
tree014144f05bbc408a0cc5b3cbbdf2aebaa2b301d6
parentfa48f8744bb5c61b125f8f1d85bb3b1857daeb18 (diff)
downloadorg.eclipse.linuxtools-a38c074bbd423ffdd9333b061cd07f9b38fb946d.tar.gz
org.eclipse.linuxtools-a38c074bbd423ffdd9333b061cd07f9b38fb946d.tar.xz
org.eclipse.linuxtools-a38c074bbd423ffdd9333b061cd07f9b38fb946d.zip
Initial remote profiling work.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java44
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java26
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.classpath7
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.project28
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/ChangeLog26
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/META-INF/MANIFEST.MF36
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/OSGI-INF/l10n/bundle.properties6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/about.html26
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/build.properties8
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/icons/valgrind-icon.pngbin0 -> 713 bytes
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/plugin.xml44
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/Messages.java31
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchConstants.java20
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchPlugin.java60
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchStep.java45
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteCommand.java147
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchDelegate.java593
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchShortcut.java17
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchTabGroup.java25
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteProcess.java106
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFInputStream.java107
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFOutputStream.java96
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/messages.properties7
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog9
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java19
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java7
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java45
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog5
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java12
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.test-feature/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.test-feature/feature.xml4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog7
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui.editor/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui.editor/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog5
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java1
60 files changed, 1642 insertions, 67 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml b/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
index d035af3ae9..401969da63 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.linuxtools.valgrind"
label="%featureName"
- version="0.4.0.qualifier"
+ version="0.7.0.qualifier"
provider-name="%featureProvider"
os="linux,macosx">
@@ -52,7 +52,7 @@
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.cdt.ui"/>
<import plugin="org.eclipse.help"/>
- <import feature="org.eclipse.linuxtools.profiling" version="0.2.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.linuxtools.profiling" version="0.7.0" match="greaterOrEqual"/>
</requires>
<plugin
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
index b061461b9d..c048ab0493 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+
2009-12-22 Roland Grunberg <rgrunber@redhat.com>
* META-INF/MANIFEST.MF: Make necessary changes for switch from JUnit 3 to JUnit 4.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/META-INF/MANIFEST.MF
index 15f3fd1f28..89bf3eea5e 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.cachegrind.tests
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.cachegrind.tests.CachegrindTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
index 2115ab0143..f05da1def4 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java: Remove dependence on
+ internal Valgrind launch delegate.
+
2009-08-11 Elliott Baron <ebaron@redhat.com>
* src/org/eclipse/linuxtools/valgrind/cachegrind: Removed.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
index 0b48c3440d..69150c5c9d 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.cachegrind;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java
index 673ce918d2..125a79a4bb 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java
@@ -19,17 +19,18 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.linuxtools.internal.valgrind.cachegrind.model.CachegrindOutput;
-import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindViewPart;
import org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
-public class CachegrindLaunchDelegate extends
- ValgrindLaunchConfigurationDelegate implements IValgrindLaunchDelegate {
+public class CachegrindLaunchDelegate implements IValgrindLaunchDelegate {
protected static final String OUT_PREFIX = "cachegrind_"; //$NON-NLS-1$
protected static final String OUT_FILE = OUT_PREFIX + "%p.txt"; //$NON-NLS-1$
protected static final FileFilter CACHEGRIND_FILTER = new FileFilter() {
@@ -39,13 +40,15 @@ public class CachegrindLaunchDelegate extends
};
private static final String COMMA = ","; //$NON-NLS-1$
+ private static final String EQUALS = "="; //$NON-NLS-1$
+ private static final String NO = "no"; //$NON-NLS-1$
+ private static final String YES = "yes"; //$NON-NLS-1$
- public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath logDir, IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask(Messages.getString("CachegrindLaunchDelegate.Parsing_Cachegrind_Output"), 3); //$NON-NLS-1$
- IPath outputPath = verifyOutputPath(config);
- File[] cachegrindOutputs = outputPath.toFile().listFiles(CACHEGRIND_FILTER);
+ File[] cachegrindOutputs = logDir.toFile().listFiles(CACHEGRIND_FILTER);
if (cachegrindOutputs.length > 0) {
parseOutput(cachegrindOutputs, monitor);
@@ -75,11 +78,10 @@ public class CachegrindLaunchDelegate extends
monitor.worked(1);
}
- public String[] getCommandArray(ILaunchConfiguration config) throws CoreException {
+ public String[] getCommandArray(ILaunchConfiguration config, IPath logDir) throws CoreException {
ArrayList<String> opts = new ArrayList<String>();
- IPath outputPath = verifyOutputPath(config);
- opts.add(CachegrindCommandConstants.OPT_CACHEGRIND_OUTFILE + EQUALS + outputPath.append(OUT_FILE).toOSString());
+ opts.add(CachegrindCommandConstants.OPT_CACHEGRIND_OUTFILE + EQUALS + logDir.append(OUT_FILE).toOSString());
opts.add(CachegrindCommandConstants.OPT_CACHE_SIM + EQUALS + (config.getAttribute(CachegrindLaunchConstants.ATTR_CACHEGRIND_CACHE_SIM, CachegrindLaunchConstants.DEFAULT_CACHEGRIND_CACHE_SIM) ? YES : NO));
opts.add(CachegrindCommandConstants.OPT_BRANCH_SIM + EQUALS + (config.getAttribute(CachegrindLaunchConstants.ATTR_CACHEGRIND_BRANCH_SIM, CachegrindLaunchConstants.DEFAULT_CACHEGRIND_BRANCH_SIM) ? YES : NO));
if (config.getAttribute(CachegrindLaunchConstants.ATTR_CACHEGRIND_I1, CachegrindLaunchConstants.DEFAULT_CACHEGRIND_I1)) {
@@ -99,5 +101,29 @@ public class CachegrindLaunchDelegate extends
}
return opts.toArray(new String[opts.size()]);
}
+
+ /**
+ * Throws a core exception with an error status object built from the given
+ * message, lower level exception, and error code.
+ *
+ * @param message
+ * the status message
+ * @param exception
+ * lower level exception associated with the error, or
+ * <code>null</code> if none
+ * @param code
+ * error code
+ */
+ private void abort(String message, Throwable exception, int code) throws CoreException {
+ IStatus status;
+ if (exception != null) {
+ MultiStatus multiStatus = new MultiStatus(CachegrindPlugin.PLUGIN_ID, code, message, exception);
+ multiStatus.add(new Status(IStatus.ERROR, CachegrindPlugin.PLUGIN_ID, code, exception.getLocalizedMessage(), exception));
+ status= multiStatus;
+ } else {
+ status= new Status(IStatus.ERROR, CachegrindPlugin.PLUGIN_ID, code, message, null);
+ }
+ throw new CoreException(status);
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
index cd9f33000b..8efb522a90 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java: Extract method to
+ create process.
+
2010-06-06 Elliott Baron <ebaron@fedoraproject.org>
Bug #315890
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
index 847851b7d7..265de3d07c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.core;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.core.ValgrindPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java b/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java
index c7557306e8..d2563e6c70 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java
@@ -49,20 +49,10 @@ public class ValgrindCommand {
return out.toString().trim();
}
- public void execute(String[] commandArray, String[] env, File wd, boolean usePty) throws IOException {
+ public void execute(String[] commandArray, Object env, File wd, String exeFile, boolean usePty) throws IOException {
args = commandArray;
try {
- if (wd == null) {
- process = ProcessFactory.getFactory().exec(commandArray, env);
- }
- else {
- if (PTY.isSupported() && usePty) {
- process = ProcessFactory.getFactory().exec(commandArray, env, wd, new PTY());
- }
- else {
- process = ProcessFactory.getFactory().exec(commandArray, env, wd);
- }
- }
+ process = startProcess(commandArray, env, wd, exeFile, usePty);
}
catch (IOException e) {
if (process != null) {
@@ -83,6 +73,18 @@ public class ValgrindCommand {
}
return ret.toString().trim();
}
+
+ protected Process startProcess(String[] commandArray, Object env, File workDir, String binPath, boolean usePty) throws IOException {
+ if (workDir == null) {
+ return ProcessFactory.getFactory().exec(commandArray, (String[]) env);
+ }
+ if (PTY.isSupported() && usePty) {
+ return ProcessFactory.getFactory().exec(commandArray, (String[]) env, workDir, new PTY());
+ }
+ else {
+ return ProcessFactory.getFactory().exec(commandArray, (String[]) env, workDir);
+ }
+ }
protected void readIntoBuffer(StringBuffer out, Process p) throws IOException {
boolean success;
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.doc/ChangeLog
index 8a138dda1d..ddc6ad9b7c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.doc/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+
2010-04-19 Elliott Baron <ebaron@fedoraproject.org>
* userguide/General-Usage.html: Regenerated to include Mac OSX info.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.doc/META-INF/MANIFEST.MF
index 92e5a06f9b..99b4cd12ec 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.doc/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.doc;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.apache.ant;bundle-version="1.7.0";resolution:=optional,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.classpath b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.project b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.project
new file mode 100644
index 0000000000..d78dff40fe
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.internal.valgrind.launch.remote</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.settings/org.eclipse.jdt.core.prefs b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..17ba2d5b7e
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Jun 03 23:10:42 EDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/ChangeLog
new file mode 100644
index 0000000000..f2e7aeb0db
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/ChangeLog
@@ -0,0 +1,26 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * .classpath: New file.
+ * .project: New file.
+ * .settings/org.eclipse.jdt.core.prefs: New file.
+ * about.html: New file.
+ * build.properties: New file.
+ * icons/valgrind-icon.png: New file.
+ * OSGI-INF/l10n/bundle.properties: New file.
+ * plugin.xml: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/Messages.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/messages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchPlugin.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchStep.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteCommand.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchDelegate.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchShortcut.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchTabGroup.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteProcess.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFInputStream.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFOutputStream.java: New file.
+ * src/org/eclipse/linuxtools/valgrind/launch/remote: New file.
+ * META-INF/MANIFEST.MF: New file.
+
+ \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..6dc87d2ed0
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.launch.remote;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.launch.remote.RemoteLaunchPlugin
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.linuxtools.internal.valgrind.launch.remote
+Import-Package: org.eclipse.cdt.core,
+ org.eclipse.cdt.core.model,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.cdt.launch,
+ org.eclipse.cdt.launch.remote,
+ org.eclipse.core.filesystem,
+ org.eclipse.core.resources,
+ org.eclipse.debug.core,
+ org.eclipse.debug.core.model,
+ org.eclipse.debug.core.sourcelookup.containers,
+ org.eclipse.debug.ui,
+ org.eclipse.debug.ui.sourcelookup,
+ org.eclipse.linuxtools.internal.profiling.launch.remote,
+ org.eclipse.linuxtools.internal.valgrind.core,
+ org.eclipse.linuxtools.internal.valgrind.launch,
+ org.eclipse.linuxtools.internal.valgrind.ui,
+ org.eclipse.linuxtools.profiling.launch,
+ org.eclipse.linuxtools.valgrind.core,
+ org.eclipse.linuxtools.valgrind.launch,
+ org.eclipse.linuxtools.valgrind.ui,
+ org.eclipse.tm.tcf.core;version="0.3.0",
+ org.eclipse.tm.tcf.protocol;version="0.3.0",
+ org.eclipse.tm.tcf.services;version="0.3.0",
+ org.eclipse.tm.tcf.util;version="0.3.0"
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/OSGI-INF/l10n/bundle.properties b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000000..6cba0a93a0
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,6 @@
+#Properties file for org.eclipse.linuxtools.valgrind.launch.remote
+launchConfigurationType.name = Profile With Valgrind (Remote)
+launchConfigurationTabGroup.description = Profile Remote C/C++ Application Using Valgrind
+shortcut.label = Profile With Valgrind (Remote)
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Valgrind Remote Launch Plug-in (Incubation) \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/about.html b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/about.html
new file mode 100644
index 0000000000..e6a2741fc0
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 24, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/build.properties b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/build.properties
new file mode 100644
index 0000000000..ff66e8b7a0
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ OSGI-INF/l10n/bundle.properties,\
+ about.html
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/icons/valgrind-icon.png b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/icons/valgrind-icon.png
new file mode 100644
index 0000000000..099bbda554
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/icons/valgrind-icon.png
Binary files differ
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/plugin.xml b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/plugin.xml
new file mode 100644
index 0000000000..e59981c092
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/plugin.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="org.eclipse.linuxtools.internal.valgrind.launch.remote.ValgrindRemoteLaunchDelegate"
+ id="org.eclipse.linuxtools.valgrind.launch.remote.launchConfigurationType"
+ modes="profile"
+ name="%launchConfigurationType.name"
+ 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">
+ <launchConfigurationTabGroup
+ class="org.eclipse.linuxtools.internal.valgrind.launch.remote.ValgrindRemoteLaunchTabGroup"
+ description="%launchConfigurationTabGroup.description"
+ id="org.eclipse.linuxtools.valgrind.launch.remote.tabGroup"
+ type="org.eclipse.linuxtools.valgrind.launch.remote.launchConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ configTypeID="org.eclipse.linuxtools.valgrind.launch.remote.launchConfigurationType"
+ icon="icons/valgrind-icon.png"
+ id="org.eclipse.linuxtools.valgrind.launch.remote.launchConfigurationTypeImage1">
+ </launchConfigurationTypeImage>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchShortcuts">
+ <shortcut
+ class="org.eclipse.linuxtools.internal.valgrind.launch.remote.ValgrindRemoteLaunchShortcut"
+ icon="icons/valgrind-icon.png"
+ id="org.eclipse.linuxtools.valgrind.launch.remote.shortcut"
+ label="%shortcut.label"
+ modes="profile">
+ </shortcut>
+ </extension>
+
+</plugin>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/Messages.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/Messages.java
new file mode 100644
index 0000000000..1bbba28640
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/Messages.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.valgrind.launch.remote.messages"; //$NON-NLS-1$
+ public static String ValgrindRemoteLaunchDelegate_error_launch_failed;
+ public static String ValgrindRemoteLaunchDelegate_error_no_fs;
+ public static String ValgrindRemoteLaunchDelegate_error_no_peers;
+ public static String ValgrindRemoteLaunchDelegate_error_no_proc;
+ public static String ValgrindRemoteLaunchDelegate_error_no_streams;
+ public static String ValgrindRemoteLaunchDelegate_task_name;
+ public static String ValgrindRemoteProcess_error_proc_not_term;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchConstants.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchConstants.java
new file mode 100644
index 0000000000..ce0cdd35b2
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchConstants.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+public final class RemoteLaunchConstants {
+
+ private static final String PLUGIN_ID = "org.eclipse.linuxtools.valgrind.launch.remote"; //$NON-NLS-1$
+
+ public static final String ATTR_REMOTE_OUTPUTDIR = PLUGIN_ID + ".REMOTE_OUTPUTDIR"; //$NON-NLS-1$
+
+ public static final String DEFAULT_REMOTE_OUTPUTDIR = "/tmp"; //$NON-NLS-1$
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchPlugin.java
new file mode 100644
index 0000000000..7258376dd0
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchPlugin.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RemoteLaunchPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.valgrind.launch.remote"; //$NON-NLS-1$
+
+ // The shared instance
+ private static RemoteLaunchPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public RemoteLaunchPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static RemoteLaunchPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchStep.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchStep.java
new file mode 100644
index 0000000000..cb0b162017
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/RemoteLaunchStep.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.util.LinkedList;
+
+import org.eclipse.tm.tcf.protocol.IChannel;
+
+
+public abstract class RemoteLaunchStep {
+
+ private LinkedList<RemoteLaunchStep> steps;
+ private IChannel channel;
+
+ public RemoteLaunchStep(LinkedList<RemoteLaunchStep> steps, IChannel channel) {
+ this.steps = steps;
+ this.channel = channel;
+ steps.add(this);
+ }
+
+ public abstract void start() throws Exception;
+
+ public void done() {
+ if (channel.getState() != IChannel.STATE_OPEN) {
+ return;
+ }
+ try {
+ if (!steps.isEmpty()) {
+ steps.removeFirst().start();
+ }
+ }
+ catch (Throwable x) {
+ channel.terminate(x);
+ }
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteCommand.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteCommand.java
new file mode 100644
index 0000000000..bd846d5944
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteCommand.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.eclipse.linuxtools.internal.valgrind.core.ValgrindCommand;
+import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tm.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tm.tcf.services.IProcesses.ProcessesListener;
+import org.eclipse.tm.tcf.services.IStreams;
+
+public class ValgrindRemoteCommand extends ValgrindCommand {
+ private IChannel channel;
+ private Map<String, String> streamIds;
+ private LinkedList<RemoteLaunchStep> launchSteps;
+
+ public ValgrindRemoteCommand(IChannel channel, LinkedList<RemoteLaunchStep> launchSteps) {
+ this.channel = channel;
+ this.launchSteps = launchSteps;
+ streamIds = new HashMap<String, String>();
+ }
+
+ @Override
+ protected Process startProcess(final String[] commandArray, final Object env,
+ final File workDir, final String binPath, boolean usePty) throws IOException {
+ final IStreams streamsService = channel.getRemoteService(IStreams.class);
+ final IProcesses procService = channel.getRemoteService(IProcesses.class);
+
+ // Connect streams
+ final IStreams.StreamsListener streamsListener = new IStreams.StreamsListener() {
+
+ public void disposed(String stream_type, String stream_id) {
+ }
+
+ public void created(String stream_type, String stream_id, String context_id) {
+ streamIds.put(stream_id, context_id);
+ }
+ };
+
+ new RemoteLaunchStep(launchSteps, channel) {
+
+ @Override
+ public void start() throws Exception {
+ // Register streams as they are created
+ streamsService.subscribe(IProcesses.NAME, streamsListener, new IStreams.DoneSubscribe() {
+
+ public void doneSubscribe(IToken token, Exception error) {
+ if (error != null) {
+ channel.terminate(error);
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+
+ new RemoteLaunchStep(launchSteps, channel) {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void start() throws Exception {
+ // Create process
+ procService.start(workDir.getAbsolutePath(), binPath, commandArray, (Map<String, String>) env, false, new IProcesses.DoneStart() {
+ public void doneStart(IToken token, Exception error,
+ final ProcessContext context) {
+ if (error != null) {
+ channel.terminate(error);
+ }
+ else {
+ final ValgrindRemoteProcess remoteProcess = new ValgrindRemoteProcess(context, channel, launchSteps);
+ process = remoteProcess;
+
+ // Register as a listener to retrieve exit code
+ ProcessesListener listener = new ProcessesListener() {
+ public void exited(String process_id, int exit_code) {
+ if (process_id.equals(context.getID())) {
+ remoteProcess.setExitCode(exit_code);
+ remoteProcess.setTerminated(true);
+
+ done();
+ }
+ }
+ };
+ procService.addListener(listener);
+ final String stdinID = (String) context.getProperties().get(IProcesses.PROP_STDIN_ID);
+ final String stdoutID = (String) context.getProperties().get(IProcesses.PROP_STDOUT_ID);
+ final String stderrID = (String) context.getProperties().get(IProcesses.PROP_STDERR_ID);
+ for (final String id : streamIds.keySet().toArray(new String[streamIds.size()])) {
+ if (id.equals(stdinID)) {
+ remoteProcess.connectOutputStream(stdinID);
+ }
+ else if (id.equals(stdoutID)) {
+ remoteProcess.connectInputStream(stdoutID);
+ }
+ else if (id.equals(stderrID)) {
+ remoteProcess.connectErrorStream(stderrID);
+ }
+ else {
+ disconnectStream(id);
+ }
+ }
+ }
+ }
+ });
+ }
+ };
+
+ return process;
+ }
+
+ private void disconnectStream(String id) {
+ streamIds.remove(id);
+ if (channel.getState() != IChannel.STATE_OPEN) {
+ return;
+ }
+
+ IStreams streams = channel.getRemoteService(IStreams.class);
+ streams.disconnect(id, new IStreams.DoneDisconnect() {
+ public void doneDisconnect(IToken token, Exception error) {
+ if (channel.getState() != IChannel.STATE_OPEN) {
+ return;
+ }
+ if (error != null) {
+ channel.terminate(error);
+ }
+ }
+ });
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchDelegate.java
new file mode 100644
index 0000000000..db2e489b9d
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchDelegate.java
@@ -0,0 +1,593 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.cdt.debug.core.CDebugUtils;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchPlugin;
+import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin;
+import org.eclipse.linuxtools.valgrind.core.IValgrindMessage;
+import org.eclipse.linuxtools.valgrind.launch.IValgrindOutputDirectoryProvider;
+import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tm.tcf.services.IFileSystem;
+import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tm.tcf.services.IFileSystem.DoneMkDir;
+import org.eclipse.tm.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tm.tcf.services.IStreams;
+
+public class ValgrindRemoteLaunchDelegate extends
+ValgrindLaunchConfigurationDelegate {
+
+ private IChannel channel;
+ private SubMonitor monitor;
+ private IFileSystem fsService;
+ private IProcesses procService;
+ private LinkedList<RemoteLaunchStep> launchSteps;
+ private Throwable ex;
+ private IPath localOutputDir;
+
+ public void launch(final ILaunchConfiguration config, String mode,
+ final ILaunch launch, IProgressMonitor m) throws CoreException {
+ if (m == null) {
+ m = new NullProgressMonitor();
+ }
+ launchSteps = new LinkedList<RemoteLaunchStep>();
+
+ monitor = SubMonitor
+ .convert(
+ m,
+ Messages.ValgrindRemoteLaunchDelegate_task_name, 10);
+ // check for cancellation
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ this.config = config;
+ this.launch = launch;
+ try {
+ // remove any output from previous run
+ ValgrindUIPlugin.getDefault().resetView();
+ // reset stored launch data
+ getPlugin().setCurrentLaunchConfiguration(null);
+ getPlugin().setCurrentLaunch(null);
+
+ // FIXME find Valgrind binary if not already done
+ final IPath valgrindLocation = getPlugin().getValgrindLocation();
+ // also ensure Valgrind version is usable
+ getPlugin().getValgrindVersion();
+
+ monitor.worked(1);
+
+ // Open TCF Channel
+ Map<String, IPeer> peers = Protocol.getLocator().getPeers();
+ // XXX Use 127.0.0.1 to test
+ IPeer peer = null;
+ for (String id : peers.keySet()) {
+ if (id.contains("127.0.0.1")) {
+ peer = peers.get(id);
+ }
+ }
+ if (peer == null) {
+ abort(Messages.ValgrindRemoteLaunchDelegate_error_no_peers, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+ else {
+ channel = peer.openChannel();
+ channel.addChannelListener(new IChannel.IChannelListener() {
+
+ public void onChannelOpened() {
+ try {
+ IStreams streamService = channel.getRemoteService(IStreams.class);
+ if (streamService == null) {
+ abort(Messages.ValgrindRemoteLaunchDelegate_error_no_streams, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+
+ fsService = channel.getRemoteService(IFileSystem.class);
+ if (fsService == null) {
+ abort(Messages.ValgrindRemoteLaunchDelegate_error_no_fs, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+
+ procService = channel.getRemoteService(IProcesses.class);
+ if (procService == null) {
+ abort(Messages.ValgrindRemoteLaunchDelegate_error_no_proc, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+
+ command = new ValgrindRemoteCommand(channel, launchSteps);
+
+ // Copy binary using FileSystem service
+ final IPath exePath = CDebugUtils.verifyProgramPath(config);
+ final IPath remoteDir = Path.fromOSString("/tmp");
+ final IPath remoteFile = remoteDir.append(exePath.lastSegment());
+ final IPath remoteLogDir = Path.fromOSString("/tmp").append("eclipse-valgrind-" + System.currentTimeMillis());
+
+ try {
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ writeFileToRemote(exePath, remoteFile, this);
+ }
+ };
+
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ fsService.mkdir(remoteLogDir.toOSString(), new FileAttrs(0, 0, 0, 0, 0, 0, 0, null), new DoneMkDir() {
+ public void doneMkDir(IToken token,
+ FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+
+
+ String[] arguments = getProgramArgumentsArray(config);
+
+ // Start process using Processes service
+ startRemoteProcess(config, launch,
+ valgrindLocation, remoteFile,
+ arguments, remoteDir.toFile(), remoteLogDir);
+
+ // Copy log files from remote
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ fsService.opendir(outputPath.toOSString(), new IFileSystem.DoneOpen() {
+
+ public void doneOpen(IToken token, FileSystemException error,
+ IFileHandle handle) {
+ if (error != null) {
+ disconnect(error);
+ }
+
+ readDir(handle);
+ }
+
+ private void readDir(final IFileHandle handle) {
+ fsService.readdir(handle, new IFileSystem.DoneReadDir() {
+
+ public void doneReadDir(IToken token, FileSystemException error,
+ DirEntry[] entries, boolean eof) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ for (DirEntry entry : entries) {
+ final IPath remotePath = outputPath.append(entry.filename);
+ final IPath localPath = localOutputDir.append(entry.filename);
+
+ // Copy each log file
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ writeFileToLocal(remotePath, localPath, this);
+ }
+ };
+
+ // Delete log file on remote
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ fsService.remove(remotePath.toOSString(), new IFileSystem.DoneRemove() {
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+ }
+
+ if (!eof) {
+ readDir(handle);
+ }
+ else {
+ // Close the log directory
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ fsService.close(handle, new IFileSystem.DoneClose() {
+ public void doneClose(IToken token, FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+
+ // Delete the remote log directory
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ fsService.rmdir(outputPath.toOSString(), new IFileSystem.DoneRemove() {
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+
+ // Close the channel
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ disconnect(null);
+ done();
+ }
+ };
+
+ done();
+ }
+ }
+ }
+ });
+ }
+ });
+ }
+ };
+
+ // Begin executing launch steps
+ launchSteps.removeFirst().start();
+ } catch (Throwable e) {
+ disconnect(e);
+ }
+ } catch (CoreException e) {
+ disconnect(e);
+ }
+ }
+
+ public void onChannelClosed(Throwable error) {
+ channel.removeChannelListener(this);
+ if (error != null) {
+ ex = error;
+ }
+ }
+
+ public void congestionLevel(int level) {
+ }
+ });
+ }
+
+ // Wait for TCF connection to close
+ while (channel.getState() != IChannel.STATE_CLOSED) {
+ Thread.sleep(100);
+ }
+
+ if (ex != null) {
+ abort(Messages.ValgrindRemoteLaunchDelegate_error_launch_failed, ex, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+
+ // store these for use by other classes
+ getPlugin().setCurrentLaunchConfiguration(config);
+ getPlugin().setCurrentLaunch(launch);
+
+ // parse Valgrind logs
+ IValgrindMessage[] messages = parseLogs(localOutputDir);
+
+ // create launch summary string to distinguish this launch
+ launchStr = createLaunchStr();
+
+ // create view
+ ValgrindUIPlugin.getDefault().createView(launchStr, toolID);
+ // set log messages
+ ValgrindUIPlugin.getDefault().getView().setMessages(messages);
+ monitor.worked(1);
+
+ // pass off control to extender
+ dynamicDelegate.handleLaunch(config, launch, localOutputDir, monitor.newChild(3));
+
+ // refresh view
+ ValgrindUIPlugin.getDefault().refreshView();
+
+ // show view
+ ValgrindUIPlugin.getDefault().showView();
+ monitor.worked(1);
+ } catch (IOException e) {
+ abort("Error starting process", e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ m.done();
+ }
+ }
+
+ protected String createLaunchStr() {
+ return config.getName()
+ + " [" + getPlugin().getToolName(toolID) + "] " + process.getLabel(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Override
+ protected String getPluginID() {
+ return ValgrindLaunchPlugin.PLUGIN_ID;
+ }
+
+ private void disconnect(Throwable t) {
+ if (fsService != null) {
+ // TODO Cleanup log output and binary
+ }
+ channel.terminate(t);
+ }
+
+ private void writeFileToRemote(IPath localFile, IPath remoteFile, final RemoteLaunchStep step) throws CoreException, FileNotFoundException {
+ final InputStream inp = new FileInputStream(localFile.toOSString());
+ int flags = IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC;
+ fsService.open(remoteFile.toOSString(), flags, new FileAttrs(IFileSystem.ATTR_PERMISSIONS, 0, 0, 0,
+ IFileSystem.S_IRUSR | IFileSystem.S_IWUSR | IFileSystem.S_IXUSR, 0, 0, null), new IFileSystem.DoneOpen() {
+
+ IFileHandle handle;
+ long offset = 0;
+ final Set<IToken> cmds = new HashSet<IToken>();
+ final byte[] buf = new byte[0x1000];
+
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ this.handle = handle;
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ writeNext();
+ }
+ }
+
+ private void writeNext() {
+ try {
+ while (cmds.size() < 8) {
+ int rd = inp.read(buf);
+ if (rd < 0) {
+ close();
+ break;
+ }
+ cmds.add(fsService.write(handle, offset, buf, 0, rd, new IFileSystem.DoneWrite() {
+
+ public void doneWrite(IToken token, FileSystemException error) {
+ cmds.remove(token);
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ writeNext();
+ }
+ }
+ }));
+ offset += rd;
+ }
+ }
+ catch (Throwable x) {
+ disconnect(x);
+ }
+ }
+
+ private void close() {
+ if (cmds.size() > 0) {
+ return;
+ }
+ try {
+ inp.close();
+ fsService.close(handle, new IFileSystem.DoneClose() {
+
+ public void doneClose(IToken token, FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ step.done();
+ }
+ }
+ });
+ }
+ catch (Throwable x) {
+ disconnect(x);
+ }
+ }
+ });
+ }
+
+ private void writeFileToLocal(IPath remoteFile, IPath localFile, final RemoteLaunchStep step) throws CoreException, FileNotFoundException {
+ final OutputStream out = new FileOutputStream(localFile.toOSString());
+ int flags = IFileSystem.TCF_O_READ;
+ fsService.open(remoteFile.toOSString(), flags, null, new IFileSystem.DoneOpen() {
+
+ IFileHandle handle;
+ long offset = 0;
+ Set<IToken> cmds = new HashSet<IToken>();
+ static final int BUF_LENGTH = 0x1000;
+
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ this.handle = handle;
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ readNext();
+ }
+ }
+
+ private void readNext() {
+ try {
+ cmds.add(fsService.read(handle, offset, BUF_LENGTH, new IFileSystem.DoneRead() {
+
+ public void doneRead(IToken token, FileSystemException error, byte[] data,
+ boolean eof) {
+ cmds.remove(token);
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ try {
+ out.write(data);
+ offset += data.length;
+ if (eof) {
+ close();
+ }
+ else {
+ readNext();
+ }
+ } catch (IOException e) {
+ disconnect(e);
+ }
+ }
+ }
+ }));
+ }
+ catch (Throwable x) {
+ disconnect(x);
+ }
+ }
+
+ private void close() {
+ if (cmds.size() > 0) {
+ return;
+ }
+ try {
+ out.close();
+ fsService.close(handle, new IFileSystem.DoneClose() {
+
+ public void doneClose(IToken token, FileSystemException error) {
+ if (error != null) {
+ disconnect(error);
+ }
+ else {
+ step.done();
+ }
+ }
+ });
+ }
+ catch (Throwable x) {
+ disconnect(x);
+ }
+ }
+ });
+ }
+
+ private void startRemoteProcess(final ILaunchConfiguration config,
+ final ILaunch launch, final IPath valgrindLocation,
+ final IPath exePath, final String[] arguments, final File workDir, IPath logDir)
+ throws Exception {
+ // set output directory in config
+ setOutputPath(config, logDir);
+ outputPath = verifyOutputPath(config);
+
+ // create/empty local output directory
+ IValgrindOutputDirectoryProvider provider = getPlugin().getOutputDirectoryProvider();
+ localOutputDir = provider.getOutputPath();
+ createDirectory(localOutputDir);
+
+ // tool that was launched
+ toolID = getTool(config);
+ // ask tool extension for arguments
+ dynamicDelegate = getDynamicDelegate(toolID);
+ String[] opts = getValgrindArgumentsArray(config);
+
+ // set the default source locator if required
+ setDefaultSourceLocator(launch, config);
+
+ ArrayList<String> cmdLine = new ArrayList<String>(
+ 1 + arguments.length);
+ cmdLine.add(valgrindLocation.toOSString());
+ cmdLine.addAll(Arrays.asList(opts));
+ cmdLine.add(exePath.toOSString());
+ cmdLine.addAll(Arrays.asList(arguments));
+ final String[] commandArray = (String[]) cmdLine
+ .toArray(new String[cmdLine.size()]);
+ boolean usePty = config.getAttribute(
+ ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL,
+ ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
+ monitor.worked(1);
+
+ // TODO Get remote environment
+ @SuppressWarnings("unchecked")
+ Map<String, String> env = (Map<String, String>) config.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map<String, String>) null);
+
+ // check for cancellation
+ if (monitor.isCanceled()) {
+ disconnect(null);
+ }
+ // call Valgrind
+ command.execute(commandArray, env, workDir, valgrindLocation.toOSString(), usePty);
+
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ monitor.worked(3);
+ process = createNewProcess(launch, command.getProcess(),
+ commandArray[0]);
+ // set the command line used
+ process.setAttribute(IProcess.ATTR_CMDLINE,
+ command.getCommandLine());
+ done();
+ }
+ };
+ }
+
+ @Override
+ protected void setOutputPath(ILaunchConfiguration config, IPath outputPath)
+ throws CoreException, IOException {
+ ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ wc.setAttribute(RemoteLaunchConstants.ATTR_REMOTE_OUTPUTDIR, outputPath.toPortableString());
+ wc.doSave();
+ }
+
+ @Override
+ protected IPath verifyOutputPath(ILaunchConfiguration config)
+ throws CoreException {
+ return Path.fromOSString(config.getAttribute(RemoteLaunchConstants.ATTR_REMOTE_OUTPUTDIR, RemoteLaunchConstants.DEFAULT_REMOTE_OUTPUTDIR));
+ }
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchShortcut.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchShortcut.java
new file mode 100644
index 0000000000..3363033d74
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchShortcut.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchShortcut;
+
+public class ValgrindRemoteLaunchShortcut extends ValgrindLaunchShortcut {
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchTabGroup.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchTabGroup.java
new file mode 100644
index 0000000000..5fcb342289
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteLaunchTabGroup.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.linuxtools.internal.profiling.launch.remote.ProfileRemoteLaunchConfigurationTabGroup;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab;
+
+public class ValgrindRemoteLaunchTabGroup extends
+ ProfileRemoteLaunchConfigurationTabGroup {
+
+ @Override
+ public AbstractLaunchConfigurationTab[] getProfileTabs() {
+ return new AbstractLaunchConfigurationTab[] { new ValgrindOptionsTab() };
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteProcess.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteProcess.java
new file mode 100644
index 0000000000..60c4ab7fb6
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindRemoteProcess.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.LinkedList;
+
+import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tm.tcf.services.IProcesses.DoneCommand;
+
+public class ValgrindRemoteProcess extends Process {
+ private IProcesses.ProcessContext context;
+ private IChannel channel;
+ private LinkedList<RemoteLaunchStep> launchSteps;
+ private Boolean terminated;
+ private Integer exitCode;
+ private OutputStream outputStream;
+ private InputStream inputStream;
+ private InputStream errorStream;
+
+ public ValgrindRemoteProcess(IProcesses.ProcessContext context, IChannel channel, LinkedList<RemoteLaunchStep> launchSteps) {
+ this.context = context;
+ this.channel = channel;
+ this.launchSteps = launchSteps;
+ terminated = false;
+ }
+
+ @Override
+ public OutputStream getOutputStream() {
+ return outputStream;
+ }
+
+ @Override
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+ @Override
+ public InputStream getErrorStream() {
+ return errorStream;
+ }
+
+ @Override
+ public int waitFor() throws InterruptedException {
+ while (!getTerminated()) {
+ Thread.sleep(100);
+ }
+ return exitCode;
+ }
+
+ @Override
+ public int exitValue() {
+ if (exitCode == null) {
+ throw new IllegalThreadStateException(Messages.ValgrindRemoteProcess_error_proc_not_term);
+ }
+ return exitCode;
+ }
+
+ @Override
+ public void destroy() {
+ context.terminate(new DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
+ }
+
+ public void setTerminated(boolean terminated) {
+ synchronized (this.terminated) {
+ this.terminated = terminated;
+ }
+ }
+
+ public Boolean getTerminated() {
+ synchronized (terminated) {
+ return terminated;
+ }
+ }
+
+ public void setExitCode(Integer exitCode) {
+ this.exitCode = exitCode;
+ }
+
+ public void connectOutputStream(String id) {
+ outputStream = new ValgrindTCFOutputStream(channel, id, launchSteps);
+ }
+
+ public void connectInputStream(String id) {
+ inputStream = new ValgrindTCFInputStream(channel, id, launchSteps);
+ }
+
+ public void connectErrorStream(String id) {
+ errorStream = new ValgrindTCFInputStream(channel, id, launchSteps);
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFInputStream.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFInputStream.java
new file mode 100644
index 0000000000..c45747d4f8
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFInputStream.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.LinkedList;
+
+import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tm.tcf.services.IStreams;
+import org.eclipse.tm.tcf.services.IStreams.DoneRead;
+
+public class ValgrindTCFInputStream extends InputStream {
+ private LinkedList<RemoteLaunchStep> launchSteps;
+ private IChannel channel;
+ private IStreams streamsService;
+ private String streamId;
+ private boolean done;
+ private byte[] buf;
+ private Exception ex;
+
+ public ValgrindTCFInputStream(IChannel channel, String streamId, LinkedList<RemoteLaunchStep> launchSteps) {
+ this.channel = channel;
+ this.streamId = streamId;
+ this.launchSteps = launchSteps;
+ streamsService = channel.getRemoteService(IStreams.class);
+ }
+
+ @Override
+ public int read() throws IOException {
+ read1(1);
+
+ return buf[0];
+ }
+
+ private void read1(final int size) throws IOException {
+ done = false;
+ ex = null;
+ buf = null;
+
+ new RemoteLaunchStep(launchSteps, channel) {
+ @Override
+ public void start() throws Exception {
+ streamsService.read(streamId, size, new DoneRead() {
+
+ public void doneRead(IToken token, Exception error, int lost_size,
+ byte[] data, boolean eos) {
+ if (error != null) {
+ ex = error;
+ }
+ else {
+ buf = data;
+ }
+ done = true;
+ done();
+ }
+ });
+ }
+ };
+
+ try {
+ while (!done) {
+ Thread.sleep(100);
+ }
+ } catch (InterruptedException e) {
+ }
+
+ if (ex != null) {
+ throw new IOException(ex);
+ }
+ }
+
+ @Override
+ public int read(byte[] b) throws IOException {
+ return read(b, 0, b.length);
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ if (b == null) {
+ throw new NullPointerException();
+ } else if (off < 0 || len < 0 || len > b.length - off) {
+ throw new IndexOutOfBoundsException();
+ } else if (len == 0) {
+ return 0;
+ }
+
+ read1(len);
+
+ // Did we read less than requested?
+ if (buf.length < len) {
+ len = buf.length;
+ }
+
+ System.arraycopy(buf, 0, b, off, len);
+ return len;
+ }
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFOutputStream.java b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFOutputStream.java
new file mode 100644
index 0000000000..75fc35f845
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/ValgrindTCFOutputStream.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Elliott Baron
+ * 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:
+ * Elliott Baron <ebaron@fedoraproject.org> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.launch.remote;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.LinkedList;
+
+import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tm.tcf.services.IStreams;
+import org.eclipse.tm.tcf.services.IStreams.DoneWrite;
+
+public class ValgrindTCFOutputStream extends OutputStream {
+ private IChannel channel;
+ private LinkedList<RemoteLaunchStep> launchSteps;
+ private IStreams streamsService;
+ private String streamId;
+ private boolean done;
+ private Exception ex;
+
+ public ValgrindTCFOutputStream(IChannel channel, String streamId, LinkedList<RemoteLaunchStep> launchSteps) {
+ this.channel = channel;
+ this.streamId = streamId;
+ this.launchSteps = launchSteps;
+ streamsService = channel.getRemoteService(IStreams.class);
+ }
+
+
+ @Override
+ public void write(int b) throws IOException {
+ write1(new byte[] { (byte) b }, 0, 1);
+ }
+
+
+ private void write1(final byte[] b, final int off, final int len) throws IOException {
+ done = false;
+ ex = null;
+
+ new RemoteLaunchStep(launchSteps, channel) {
+
+ @Override
+ public void start() throws Exception {
+ streamsService.write(streamId, b, off, len, new DoneWrite() {
+
+ public void doneWrite(IToken token, Exception error) {
+ if (error != null) {
+ ex = null;
+ }
+ else {
+ done();
+ }
+ }
+ });
+ }
+ };
+
+ try {
+ while (!done) {
+ Thread.sleep(100);
+ }
+ } catch (InterruptedException e) {
+ }
+
+ if (ex != null) {
+ throw new IOException(ex);
+ }
+ }
+
+ @Override
+ public void write(byte[] b) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ @Override
+ public void write(byte[] b, int off, int len) throws IOException {
+ if (b == null) {
+ throw new NullPointerException();
+ } else if ((off < 0) || (off > b.length) || (len < 0)
+ || ((off + len) > b.length) || ((off + len) < 0)) {
+ throw new IndexOutOfBoundsException();
+ } else if (len == 0) {
+ return;
+ }
+
+ write1(b, off, len);
+ }
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/messages.properties b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/messages.properties
new file mode 100644
index 0000000000..98fa0e75e1
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch.remote/src/org/eclipse/linuxtools/internal/valgrind/launch/remote/messages.properties
@@ -0,0 +1,7 @@
+ValgrindRemoteLaunchDelegate_error_launch_failed=Launch failed.
+ValgrindRemoteLaunchDelegate_error_no_fs=FileSystem service is unavailable on target.
+ValgrindRemoteLaunchDelegate_error_no_peers=No peers available.
+ValgrindRemoteLaunchDelegate_error_no_proc=Processes service is unavailable on target.
+ValgrindRemoteLaunchDelegate_error_no_streams=Streams service is unavailable on target.
+ValgrindRemoteLaunchDelegate_task_name=Profiling Remote C/C++ Application
+ValgrindRemoteProcess_error_proc_not_term=Process has not terminated.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
index 4506107c6d..53d4896d80 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java (launch):
+ (setOutputPath): Take path argument.
+ (getValgrindArgumentsArray): Handle change to dynamic delegate API.
+ * src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java (handleLaunch): Pass output path.
+ (getCommandArray): Likewise.
+
2010-06-06 Elliott Baron <ebaron@fedoraproject.org>
Bug #315890
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.launch/META-INF/MANIFEST.MF
index 7ceceb21be..4c6d7998a9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.launch;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
index 782b58213a..145aaa073b 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
@@ -19,6 +19,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Stack;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
import org.eclipse.core.filesystem.URIUtil;
@@ -107,7 +108,7 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
getPlugin().getValgrindVersion();
monitor.worked(1);
- IPath exePath = verifyProgramPath(config);
+ IPath exePath = CDebugUtils.verifyProgramPath(config);
String[] arguments = getProgramArgumentsArray(config);
File workDir = getWorkingDirectory(config);
if (workDir == null) {
@@ -115,7 +116,8 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
}
// set output directory in config
- setOutputPath(config);
+ IValgrindOutputDirectoryProvider provider = getPlugin().getOutputDirectoryProvider();
+ setOutputPath(config, provider.getOutputPath());
outputPath = verifyOutputPath(config);
// create/empty output directory
createDirectory(outputPath);
@@ -143,7 +145,7 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
return;
}
// call Valgrind
- command.execute(commandArray, getEnvironment(config), workDir, usePty);
+ command.execute(commandArray, getEnvironment(config), workDir, valgrindLocation.toOSString(), usePty);
monitor.worked(3);
process = createNewProcess(launch, command.getProcess() ,commandArray[0]);
// set the command line used
@@ -169,7 +171,7 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
monitor.worked(1);
// pass off control to extender
- dynamicDelegate.handleLaunch(config, launch, monitor.newChild(3));
+ dynamicDelegate.handleLaunch(config, launch, outputPath, monitor.newChild(3));
// refresh view
ValgrindUIPlugin.getDefault().refreshView();
@@ -277,10 +279,9 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
return result;
}
- protected void setOutputPath(ILaunchConfiguration config) throws CoreException, IOException {
- IValgrindOutputDirectoryProvider provider = getPlugin().getOutputDirectoryProvider();
+ protected void setOutputPath(ILaunchConfiguration config, IPath outputPath) throws CoreException, IOException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute(LaunchConfigurationConstants.ATTR_INTERNAL_OUTPUT_DIR, provider.getOutputPath().toPortableString());
+ wc.setAttribute(LaunchConfigurationConstants.ATTR_INTERNAL_OUTPUT_DIR, outputPath.toPortableString());
wc.doSave();
}
@@ -320,7 +321,7 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
opts.add(CommandLineConstants.OPT_BELOWMAIN + EQUALS + (config.getAttribute(LaunchConfigurationConstants.ATTR_GENERAL_BELOWMAIN, LaunchConfigurationConstants.DEFAULT_GENERAL_BELOWMAIN) ? YES : NO));
opts.add(CommandLineConstants.OPT_MAXFRAME + EQUALS + config.getAttribute(LaunchConfigurationConstants.ATTR_GENERAL_MAXFRAME, LaunchConfigurationConstants.DEFAULT_GENERAL_MAXFRAME));
- // 3.4.0 specific
+ // FIXME 3.4.0 specific
Version ver = getPlugin().getValgrindVersion();
if (ver.compareTo(ValgrindLaunchPlugin.VER_3_4_0) >= 0) {
boolean useMainStack = config.getAttribute(LaunchConfigurationConstants.ATTR_GENERAL_MAINSTACK_BOOL, LaunchConfigurationConstants.DEFAULT_GENERAL_MAINSTACK_BOOL);
@@ -336,7 +337,7 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
opts.add(CommandLineConstants.OPT_SUPPFILE + EQUALS + suppfile.toOSString());
}
}
- opts.addAll(Arrays.asList(dynamicDelegate.getCommandArray(config)));
+ opts.addAll(Arrays.asList(dynamicDelegate.getCommandArray(config, outputPath)));
String[] ret = new String[opts.size()];
return opts.toArray(ret);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java
index 43f6b05859..9953ba6d7d 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/IValgrindLaunchDelegate.java
@@ -11,6 +11,7 @@
package org.eclipse.linuxtools.valgrind.launch;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -28,18 +29,20 @@ public interface IValgrindLaunchDelegate {
* @param config - the configuration to launch
* @param launch - the launch object to contribute processes and debug
* targets to
+ * @param logDir - directory to store Valgrind log output files
* @param monitor - to report progress
* @throws CoreException - if this method fails
*/
- public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException;
+ public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath logDir, IProgressMonitor monitor) throws CoreException;
/**
* Parses attributes of an <code>ILaunchConfiguration</code> into an array
* of arguments to be passed to Valgrind
* @param config - the <code>ILaunchConfiguration</code>
+ * @param logDir - directory to store Valgrind log output files
* @return an array of arguments that can appended to a <code>valgrind</code> command
* @throws CoreException - retrieving attributes from config failed
*/
- public String[] getCommandArray(ILaunchConfiguration config) throws CoreException;
+ public String[] getCommandArray(ILaunchConfiguration config, IPath logDir) throws CoreException;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
index 86f3c7ed52..887419c65f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+
2010-05-26 Elliott Baron <ebaron@fedoraproject.org>
Bug #314376
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
index ee3a7ecfd3..8688afb9db 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.massif.tests
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.massif.tests.MassifTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
index 8ed2f5c290..87999453b8 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java: Remove dependence on
+ internal Valgrind launch delegate.
+
2010-05-26 Elliott Baron <ebaron@fedoraproject.org>
Bug #314376
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
index c4a63a6934..a52df21968 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.massif;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.massif.MassifPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java
index 93aecb407c..b8fe314c10 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifLaunchDelegate.java
@@ -20,16 +20,17 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindViewPart;
import org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
-public class MassifLaunchDelegate extends ValgrindLaunchConfigurationDelegate
-implements IValgrindLaunchDelegate {
+public class MassifLaunchDelegate implements IValgrindLaunchDelegate {
protected static final String OUT_PREFIX = "massif_"; //$NON-NLS-1$
protected static final String OUT_FILE = OUT_PREFIX + "%p.txt"; //$NON-NLS-1$
protected static final FileFilter MASSIF_FILTER = new FileFilter() {
@@ -37,18 +38,21 @@ implements IValgrindLaunchDelegate {
return pathname.getName().startsWith(OUT_PREFIX);
}
};
+
+ private static final String EQUALS = "="; //$NON-NLS-1$
+ private static final String NO = "no"; //$NON-NLS-1$
+ private static final String YES = "yes"; //$NON-NLS-1$
protected MassifOutput output;
- public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor)
+ public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath outDir, IProgressMonitor monitor)
throws CoreException {
MassifPlugin.getDefault().setConfig(config);
MassifPlugin.getDefault().setSourceLocator(launch.getSourceLocator());
try {
monitor.beginTask(Messages.getString("MassifLaunchDelegate.Parsing_Massif_Output"), 3); //$NON-NLS-1$
- IPath outputPath = verifyOutputPath(config);
- File[] massifOutputs = outputPath.toFile().listFiles(MASSIF_FILTER);
+ File[] massifOutputs = outDir.toFile().listFiles(MASSIF_FILTER);
if (massifOutputs.length > 0) {
parseOutput(massifOutputs, monitor);
@@ -80,12 +84,11 @@ implements IValgrindLaunchDelegate {
}
@SuppressWarnings("unchecked")
- public String[] getCommandArray(ILaunchConfiguration config)
+ public String[] getCommandArray(ILaunchConfiguration config, IPath outDir)
throws CoreException {
ArrayList<String> opts = new ArrayList<String>();
- IPath outputPath = verifyOutputPath(config);
- opts.add(MassifCommandConstants.OPT_MASSIF_OUTFILE + EQUALS + outputPath.append(OUT_FILE).toOSString());
+ opts.add(MassifCommandConstants.OPT_MASSIF_OUTFILE + EQUALS + outDir.append(OUT_FILE).toOSString());
opts.add(MassifCommandConstants.OPT_HEAP + EQUALS + (config.getAttribute(MassifLaunchConstants.ATTR_MASSIF_HEAP, MassifLaunchConstants.DEFAULT_MASSIF_HEAP) ? YES : NO));
opts.add(MassifCommandConstants.OPT_HEAPADMIN + EQUALS + config.getAttribute(MassifLaunchConstants.ATTR_MASSIF_HEAPADMIN, MassifLaunchConstants.DEFAULT_MASSIF_HEAPADMIN));
@@ -106,4 +109,28 @@ implements IValgrindLaunchDelegate {
return opts.toArray(new String[opts.size()]);
}
+
+ /**
+ * Throws a core exception with an error status object built from the given
+ * message, lower level exception, and error code.
+ *
+ * @param message
+ * the status message
+ * @param exception
+ * lower level exception associated with the error, or
+ * <code>null</code> if none
+ * @param code
+ * error code
+ */
+ private void abort(String message, Throwable exception, int code) throws CoreException {
+ IStatus status;
+ if (exception != null) {
+ MultiStatus multiStatus = new MultiStatus(MassifPlugin.PLUGIN_ID, code, message, exception);
+ multiStatus.add(new Status(IStatus.ERROR, MassifPlugin.PLUGIN_ID, code, exception.getLocalizedMessage(), exception));
+ status= multiStatus;
+ } else {
+ status= new Status(IStatus.ERROR, MassifPlugin.PLUGIN_ID, code, message, null);
+ }
+ throw new CoreException(status);
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
index 9879c7c931..2083cb3b80 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java (testTabsBadVersion): Change deprecated method.
+
2010-06-06 Elliott Baron <ebaron@fedoraproject.org>
Bug #315890
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/META-INF/MANIFEST.MF
index 901cb1c2af..cab0683bd3 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.memcheck.tests;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.memcheck.tests.MemcheckTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
index 5fc31e8706..33227b7b64 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
@@ -72,7 +72,7 @@ public class MinVersionTest extends AbstractMemcheckTest {
ValgrindOptionsTab tab = new ValgrindOptionsTab();
ILaunchConfiguration config = getLaunchConfigType().newInstance(null, getLaunchManager()
- .generateUniqueLaunchConfigurationNameFrom(
+ .generateLaunchConfigurationName(
proj.getProject().getName()));
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
tab.setDefaults(wc);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
index de01486091..58b486fbc9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java: Remove dependence on
+ internal Valgrind launch delegate.
+
2009-09-28 Elliott Baron <ebaron@fedoraproject.org>
#290597
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/META-INF/MANIFEST.MF
index 88b3900564..02c1cf8149 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.memcheck;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.memcheck.MemcheckPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
index 57881e2f89..443624c436 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
@@ -13,20 +13,24 @@ package org.eclipse.linuxtools.internal.valgrind.memcheck;
import java.util.ArrayList;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate;
import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchPlugin;
import org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate;
import org.osgi.framework.Version;
-public class MemcheckLaunchDelegate extends ValgrindLaunchConfigurationDelegate implements IValgrindLaunchDelegate {
+public class MemcheckLaunchDelegate implements IValgrindLaunchDelegate {
+
+ private static final String EQUALS = "="; //$NON-NLS-1$
+ private static final String NO = "no"; //$NON-NLS-1$
+ private static final String YES = "yes"; //$NON-NLS-1$
- public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath outDir, IProgressMonitor monitor) throws CoreException {
}
- public String[] getCommandArray(ILaunchConfiguration config) throws CoreException {
+ public String[] getCommandArray(ILaunchConfiguration config, IPath outDir) throws CoreException {
ArrayList<String> opts = new ArrayList<String>();
opts.add(MemcheckCommandConstants.OPT_LEAKCHECK + EQUALS + (config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_LEAKCHECK, MemcheckLaunchConstants.DEFAULT_MEMCHECK_LEAKCHECK) ? YES : NO));
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.test-feature/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.test-feature/ChangeLog
index 15be41c941..528d0ff52f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.test-feature/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.test-feature/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * feature.xml: Bump version to 0.7.0, recompute dependencies.
+
2010-05-18 Andrew Overholt <overholt@redhat.com>
* feature.properties: Fix provider name.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.test-feature/feature.xml b/valgrind/org.eclipse.linuxtools.valgrind.test-feature/feature.xml
index 472e9f6d3a..0a3a23ce4e 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.test-feature/feature.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind.test-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.linuxtools.valgrind.test"
label="%featureName"
- version="0.4.0.qualifier"
+ version="0.7.0.qualifier"
provider-name="%featureProvider">
<description>
@@ -20,7 +20,6 @@
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit" version="0.0.0"/>
<import plugin="org.eclipse.cdt.core"/>
<import plugin="org.eclipse.cdt.core.tests"/>
<import plugin="org.eclipse.cdt.debug.core"/>
@@ -46,6 +45,7 @@
<import plugin="org.eclipse.linuxtools.valgrind.massif"/>
<import plugin="org.eclipse.cdt.ui"/>
<import plugin="org.eclipse.linuxtools.valgrind.cachegrind"/>
+ <import plugin="org.junit" version="4.7.0" match="greaterOrEqual"/>
</requires>
<plugin
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
index 409ed3e61b..bb80a78321 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java (execute): Change parameters.
+ * src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java (getAdapter): Change warning suppression.
+ * src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java (setOutputPath): Add parameter.
+
2009-12-22 Roland Grunberg <rgrunber@redhat.com>
* META-INF/MANIFEST.MF: Make necessary changes for switch from JUnit 3 to JUnit 4.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.tests/META-INF/MANIFEST.MF
index 51b6fbf27b..e102f80423 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.tests;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java
index 65421a42bf..0a96c028ac 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubCommand.java
@@ -31,7 +31,7 @@ public class ValgrindStubCommand extends ValgrindCommand {
}
@Override
- public void execute(String[] commandArray, String[] env, File wd,
+ public void execute(String[] commandArray, Object env, File wd, String exeFile,
boolean usePty) throws IOException {
args = commandArray;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
index 8edbcd08ca..321ceb7862 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
@@ -57,7 +57,7 @@ public class ValgrindStubProcess implements IProcess {
attributes.put(key, value);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java
index 360a3a4754..b33bb03bee 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindTestLaunchDelegate.java
@@ -55,10 +55,10 @@ public class ValgrindTestLaunchDelegate extends ValgrindLaunchConfigurationDeleg
}
@Override
- protected void setOutputPath(ILaunchConfiguration config)
+ protected void setOutputPath(ILaunchConfiguration config, IPath outputPath)
throws CoreException, IOException {
if (!ValgrindTestsPlugin.GENERATE_FILES && ValgrindTestsPlugin.RUN_VALGRIND) {
- super.setOutputPath(config);
+ super.setOutputPath(config, outputPath);
}
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/ChangeLog
index 8a90d2d3d9..12267b2559 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+
2009-08-11 Elliott Baron <ebaron@redhat.com>
* src/org/eclipse/linuxtools/valgrind: Removed.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/META-INF/MANIFEST.MF
index 159b73455a..ab5c90ef79 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui.editor/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.ui.editor;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.ui.editor.ValgrindEditorPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
index 0805d8736c..06bb16897a 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-26 Elliott Baron <ebaron@fedoraproject.org>
+
+ * META-INF/MANIFEST.MF: Bump version to 0.7.0.
+ * src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java: Remove unused import.
+
2010-05-26 Elliott Baron <ebaron@fedoraproject.org>
Bug #314376
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.ui/META-INF/MANIFEST.MF
index 3f4950a9f9..3a6aeb105f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.linuxtools.valgrind.ui;singleton:=true
-Bundle-Version: 0.4.0.qualifier
+Bundle-Version: 0.7.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
index 83d8bbee57..5380586aaf 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
@@ -42,7 +42,6 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PartInitException;

Back to the top