diff --git a/src/plugins/valgrindtoolbase/valgrindconfigwidget.cpp b/src/plugins/valgrindtoolbase/valgrindconfigwidget.cpp
index 08f4e051ba5f9abaa4740f464c47730003ee43dc..893f3b8fb8069ee9128faec2f58143fb2e0e9b78 100644
--- a/src/plugins/valgrindtoolbase/valgrindconfigwidget.cpp
+++ b/src/plugins/valgrindtoolbase/valgrindconfigwidget.cpp
@@ -41,7 +41,7 @@
 
 #include <QtCore/QDebug>
 
-using namespace Analyzer::Internal;
+using namespace Valgrind::Internal;
 
 ValgrindConfigWidget::ValgrindConfigWidget(ValgrindSettings *settings, QWidget *parent)
     : QWidget(parent),
diff --git a/src/plugins/valgrindtoolbase/valgrindconfigwidget.h b/src/plugins/valgrindtoolbase/valgrindconfigwidget.h
index 0d95c5eb588b7f6709800dbad22dac9743790e16..bbe86b53ac13ba805a15a214cd155b4d37b6592d 100644
--- a/src/plugins/valgrindtoolbase/valgrindconfigwidget.h
+++ b/src/plugins/valgrindtoolbase/valgrindconfigwidget.h
@@ -39,14 +39,12 @@
 
 #include <QtGui/QWidget>
 
-QT_BEGIN_NAMESPACE
+namespace Valgrind {
+namespace Internal {
+
 namespace Ui {
 class ValgrindConfigWidget;
 }
-QT_END_NAMESPACE
-
-namespace Analyzer {
-namespace Internal {
 
 class ValgrindSettings;
 
@@ -64,7 +62,6 @@ private:
 };
 
 }
-
 }
 
 #endif // ANALYZER_INTERNAL_VALGRINDCONFIGWIDGET_H
diff --git a/src/plugins/valgrindtoolbase/valgrindconfigwidget.ui b/src/plugins/valgrindtoolbase/valgrindconfigwidget.ui
index 385dc8043c2f6ea19e2e501f8ed46f87ffecd37c..2b929bfc4cd7cdd587def8b3d904d2cedeae72e7 100644
--- a/src/plugins/valgrindtoolbase/valgrindconfigwidget.ui
+++ b/src/plugins/valgrindtoolbase/valgrindconfigwidget.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>ValgrindConfigWidget</class>
- <widget class="QWidget" name="ValgrindConfigWidget">
+ <class>Valgrind::Internal::ValgrindConfigWidget</class>
+ <widget class="QWidget" name="Valgrind::Internal::ValgrindConfigWidget">
   <property name="geometry">
    <rect>
     <x>0</x>
@@ -20,7 +20,7 @@
       </sizepolicy>
      </property>
      <property name="title">
-      <string>Common Valgrind Options</string>
+      <string>Generic Settings</string>
      </property>
      <layout class="QFormLayout" name="formLayout">
       <property name="fieldGrowthPolicy">
diff --git a/src/plugins/valgrindtoolbase/valgrindengine.cpp b/src/plugins/valgrindtoolbase/valgrindengine.cpp
index 1eca9ec58feaf22f660b8bdf37406fa2d94daeb0..9ff46aa75118d45091dc0dc3b74b0c17e05cb2b5 100644
--- a/src/plugins/valgrindtoolbase/valgrindengine.cpp
+++ b/src/plugins/valgrindtoolbase/valgrindengine.cpp
@@ -46,26 +46,21 @@
 #define VALGRIND_DEBUG_OUTPUT 0
 
 using namespace Analyzer;
-using namespace Analyzer::Internal;
+using namespace Valgrind::Internal;
 using namespace Utils;
 
-ValgrindEngine::ValgrindEngine(ProjectExplorer::RunConfiguration *runConfiguration)
-    : IAnalyzerEngine(runConfiguration),
+ValgrindEngine::ValgrindEngine(const AnalyzerStartParameters &sp,
+                               ProjectExplorer::RunConfiguration *runConfiguration)
+    : IAnalyzerEngine(sp, runConfiguration),
       m_settings(0),
       m_progress(new QFutureInterface<void>()) ,
       m_isStopping(false)
 {
-    ProjectExplorer::LocalApplicationRunConfiguration *localAppConfig =
-            qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration *>(runConfiguration);
+    if (runConfiguration)
+        m_settings = runConfiguration->extraAspect<AnalyzerProjectSettings>();
 
-    m_settings = runConfiguration->extraAspect<AnalyzerProjectSettings>();
-    if (!localAppConfig || !m_settings)
-        return;
-
-    m_workingDirectory = localAppConfig->workingDirectory();
-    m_executable = localAppConfig->executable();
-    m_commandLineArguments = localAppConfig->commandLineArguments();
-    m_environment = localAppConfig->environment();
+    if  (!m_settings)
+        m_settings = AnalyzerGlobalSettings::instance();
 }
 
 ValgrindEngine::~ValgrindEngine()
@@ -77,7 +72,7 @@ void ValgrindEngine::start()
 {
     emit starting(this);
 
-    Core::FutureProgress* fp = Core::ICore::instance()->progressManager()->addTask(m_progress->future(),
+    Core::FutureProgress *fp = Core::ICore::instance()->progressManager()->addTask(m_progress->future(),
                                                         progressTitle(), "valgrind");
     fp->setKeepOnFinish(Core::FutureProgress::DontKeepOnFinish);
     m_progress->reportStarted();
@@ -88,13 +83,16 @@ void ValgrindEngine::start()
     emit standardOutputReceived(tr("Command-line arguments: %1").arg(m_commandLineArguments));
 #endif
 
-    runner()->setWorkingDirectory(m_workingDirectory);
-    runner()->setValgrindExecutable(m_settings->subConfig<ValgrindSettings>()->valgrindExecutable());
+    const AnalyzerStartParameters &sp = startParameters();
+    runner()->setWorkingDirectory(sp.workingDirectory);
+    QString valgrindExe = m_settings->subConfig<ValgrindSettings>()->valgrindExecutable();
+    if (!sp.analyzerCmdPrefix.isEmpty())
+        valgrindExe = sp.analyzerCmdPrefix + ' ' + valgrindExe;
+    runner()->setValgrindExecutable(valgrindExe);
     runner()->setValgrindArguments(toolArguments());
-    runner()->setDebuggeeExecutable(m_executable);
-    // note that m_commandLineArguments may contain several arguments in one string
-    runner()->setDebuggeeArguments(m_commandLineArguments);
-    runner()->setEnvironment(m_environment);
+    runner()->setDebuggeeExecutable(sp.debuggee);
+    runner()->setDebuggeeArguments(sp.debuggeeArgs);
+    runner()->setEnvironment(sp.environment);
 
     connect(runner(), SIGNAL(standardOutputReceived(QByteArray)),
             SLOT(receiveStandardOutput(QByteArray)));
@@ -105,7 +103,10 @@ void ValgrindEngine::start()
     connect(runner(), SIGNAL(finished()),
             SLOT(runnerFinished()));
 
-    runner()->start();
+    if (sp.startMode == StartRemote)
+        runner()->startRemotely(sp.connParams);
+    else
+        runner()->start();
 }
 
 void ValgrindEngine::stop()
@@ -116,12 +117,12 @@ void ValgrindEngine::stop()
 
 QString ValgrindEngine::executable() const
 {
-    return m_executable;
+    return startParameters().debuggee;
 }
 
 void ValgrindEngine::runnerFinished()
 {
-    emit standardOutputReceived(tr("** Analysing finished **"));
+    emit standardOutputReceived(tr("** Analyzing finished **"));
     emit finished();
 
     m_progress->reportFinished();
diff --git a/src/plugins/valgrindtoolbase/valgrindengine.h b/src/plugins/valgrindtoolbase/valgrindengine.h
index ff9cdac264f66ac2fe52a2f3c6338b589a36ff49..445f07feadae42282677abe5286523bf10d1b9fa 100644
--- a/src/plugins/valgrindtoolbase/valgrindengine.h
+++ b/src/plugins/valgrindtoolbase/valgrindengine.h
@@ -36,6 +36,8 @@
 #ifndef VALGRINDENGINE_H
 #define VALGRINDENGINE_H
 
+#include <analyzerbase/ianalyzerengine.h>
+
 #include "valgrindtoolbase_global.h"
 
 #include <analyzerbase/ianalyzerengine.h>
@@ -49,16 +51,18 @@
 #include <QtCore/QFutureInterface>
 
 namespace Analyzer {
-
 class AnalyzerSettings;
+}
 
+namespace Valgrind {
 namespace Internal {
 
-class VALGRINDTOOLBASE_EXPORT ValgrindEngine : public IAnalyzerEngine
+class VALGRINDTOOLBASE_EXPORT ValgrindEngine : public Analyzer::IAnalyzerEngine
 {
     Q_OBJECT
 public:
-    explicit ValgrindEngine(ProjectExplorer::RunConfiguration *runConfiguration);
+    explicit ValgrindEngine(const Analyzer::AnalyzerStartParameters &sp,
+                            ProjectExplorer::RunConfiguration *runConfiguration);
     virtual ~ValgrindEngine();
 
     void start();
@@ -71,7 +75,7 @@ protected:
     virtual QStringList toolArguments() const = 0;
     virtual Valgrind::ValgrindRunner *runner() = 0;
 
-    AnalyzerSettings *m_settings;
+    Analyzer::AnalyzerSettings *m_settings;
     QFutureInterface<void> *m_progress;
 
 private slots:
@@ -82,14 +86,10 @@ private slots:
     void receiveProcessError(const QString &, QProcess::ProcessError);
 
 private:
-    QString m_workingDirectory;
-    QString m_executable;
-    QString m_commandLineArguments;
-    Utils::Environment m_environment;
     bool m_isStopping;
 };
 
 } // namespace Internal
-} // namespace Analyzer
+} // namespace Valgrind
 
 #endif // VALGRINDENGINE_H
diff --git a/src/plugins/valgrindtoolbase/valgrindsettings.cpp b/src/plugins/valgrindtoolbase/valgrindsettings.cpp
index 090e1a48bb434f51cb57fdc43d133bd151bbd2a9..c8d91579c973b6ca9cd529ba24246b88b95a10e4 100644
--- a/src/plugins/valgrindtoolbase/valgrindsettings.cpp
+++ b/src/plugins/valgrindtoolbase/valgrindsettings.cpp
@@ -42,7 +42,7 @@
 
 #include <QtCore/QSettings>
 
-using namespace Analyzer::Internal;
+using namespace Valgrind::Internal;
 using namespace Analyzer;
 
 static const QLatin1String groupC("Analyzer");
diff --git a/src/plugins/valgrindtoolbase/valgrindsettings.h b/src/plugins/valgrindtoolbase/valgrindsettings.h
index 3eb1363981f1f0a09bf1bd3eb1b6e85200f61ff6..34803ead67d442e4544739e1331c573d2cfbe45e 100644
--- a/src/plugins/valgrindtoolbase/valgrindsettings.h
+++ b/src/plugins/valgrindtoolbase/valgrindsettings.h
@@ -43,13 +43,13 @@
 #include <QtCore/QObject>
 #include <QtCore/QVariant>
 
-namespace Analyzer {
+namespace Valgrind {
 namespace Internal {
 
 /**
  * Generic Valgrind settings shared by all tools.
  */
-class VALGRINDTOOLBASE_EXPORT ValgrindSettings : public AbstractAnalyzerSubConfig
+class VALGRINDTOOLBASE_EXPORT ValgrindSettings : public Analyzer::AbstractAnalyzerSubConfig
 {
     Q_OBJECT
 public:
diff --git a/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.cpp b/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.cpp
index d09100d43975ff754e613d2a896e0a08ada02c96..6e80c38c167dd0371166e41c61d776a29bfe4ac8 100644
--- a/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.cpp
+++ b/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.cpp
@@ -43,7 +43,7 @@
 #include <QtCore/QtPlugin>
 
 using namespace Analyzer;
-using namespace Analyzer::Internal;
+using namespace Valgrind::Internal;
 
 ValgrindToolbasePlugin::ValgrindToolbasePlugin()
 {
diff --git a/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.h b/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.h
index a961859cfbf76c9800656ca4b15ae7b8cb838dbf..976b658656d12efba0a45ffdbbe940901a0eb2cb 100644
--- a/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.h
+++ b/src/plugins/valgrindtoolbase/valgrindtoolbaseplugin.h
@@ -38,7 +38,7 @@
 
 #include <extensionsystem/iplugin.h>
 
-namespace Analyzer {
+namespace Valgrind {
 namespace Internal {
 
 class ValgrindToolbasePlugin : public ExtensionSystem::IPlugin