2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-03-04 12:15:18 +01:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-03-04 12:15:18 +01:00
|
|
|
** Author: Milian Wolff, KDAB (milian.wolff@kdab.com)
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-03-04 12:15:18 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
2014-10-01 13:21:18 +02:00
|
|
|
** conditions see http://www.qt.io/licensing. For further information
|
|
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2011-03-04 12:15:18 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2011-03-04 12:15:18 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
#ifndef VALGRIND_RUNNER_H
|
|
|
|
|
#define VALGRIND_RUNNER_H
|
|
|
|
|
|
2012-01-09 21:00:22 +01:00
|
|
|
#include <analyzerbase/analyzerconstants.h>
|
2014-05-06 00:08:12 +03:00
|
|
|
#include <projectexplorer/applicationlauncher.h>
|
2011-10-20 16:07:50 +02:00
|
|
|
|
2011-06-10 16:34:06 +02:00
|
|
|
#include <utils/outputformat.h>
|
2012-05-18 10:49:35 +02:00
|
|
|
#include <ssh/sshconnection.h>
|
2011-10-20 16:07:50 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QProcess>
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
namespace Utils {
|
|
|
|
|
class Environment;
|
2011-04-04 14:39:27 +02:00
|
|
|
class SshConnectionParameters;
|
2011-03-04 12:15:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Valgrind {
|
|
|
|
|
|
2011-04-04 14:39:27 +02:00
|
|
|
class ValgrindProcess;
|
|
|
|
|
|
2011-07-05 10:40:37 +02:00
|
|
|
class ValgrindRunner : public QObject
|
2011-03-04 12:15:18 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit ValgrindRunner(QObject *parent = 0);
|
|
|
|
|
~ValgrindRunner();
|
|
|
|
|
|
|
|
|
|
QString valgrindExecutable() const;
|
|
|
|
|
void setValgrindExecutable(const QString &executable);
|
|
|
|
|
QStringList valgrindArguments() const;
|
2014-04-25 12:19:48 +02:00
|
|
|
QStringList fullValgrindArguments() const;
|
2011-03-04 12:15:18 +01:00
|
|
|
void setValgrindArguments(const QStringList &toolArguments);
|
|
|
|
|
QString debuggeeExecutable() const;
|
|
|
|
|
void setDebuggeeExecutable(const QString &executable);
|
2011-03-04 16:00:02 +01:00
|
|
|
QString debuggeeArguments() const;
|
2011-03-04 12:15:18 +01:00
|
|
|
void setDebuggeeArguments(const QString &arguments);
|
|
|
|
|
|
|
|
|
|
void setWorkingDirectory(const QString &path);
|
|
|
|
|
QString workingDirectory() const;
|
|
|
|
|
void setEnvironment(const Utils::Environment &environment);
|
|
|
|
|
void setProcessChannelMode(QProcess::ProcessChannelMode mode);
|
|
|
|
|
|
2011-10-20 16:07:50 +02:00
|
|
|
void setStartMode(Analyzer::StartMode startMode);
|
|
|
|
|
Analyzer::StartMode startMode() const;
|
|
|
|
|
|
2014-05-06 00:08:12 +03:00
|
|
|
void setLocalRunMode(ProjectExplorer::ApplicationLauncher::Mode localRunMode);
|
|
|
|
|
ProjectExplorer::ApplicationLauncher::Mode localRunMode() const;
|
|
|
|
|
|
2012-05-18 10:49:35 +02:00
|
|
|
void setConnectionParameters(const QSsh::SshConnectionParameters &connParams);
|
|
|
|
|
const QSsh::SshConnectionParameters &connectionParameters() const;
|
2011-10-20 16:07:50 +02:00
|
|
|
|
2011-03-04 12:15:18 +01:00
|
|
|
void waitForFinished() const;
|
|
|
|
|
|
|
|
|
|
QString errorString() const;
|
|
|
|
|
|
2012-01-20 14:19:44 +01:00
|
|
|
virtual bool start();
|
2011-03-04 12:15:18 +01:00
|
|
|
virtual void stop();
|
|
|
|
|
|
2011-04-04 14:39:27 +02:00
|
|
|
ValgrindProcess *valgrindProcess() const;
|
|
|
|
|
|
2011-03-04 12:15:18 +01:00
|
|
|
protected:
|
|
|
|
|
virtual QString tool() const = 0;
|
|
|
|
|
|
|
|
|
|
signals:
|
2014-05-04 23:06:26 +03:00
|
|
|
void processOutputReceived(const QString &, Utils::OutputFormat);
|
2011-03-04 12:15:18 +01:00
|
|
|
void processErrorReceived(const QString &, QProcess::ProcessError);
|
|
|
|
|
void started();
|
|
|
|
|
void finished();
|
|
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
|
virtual void processError(QProcess::ProcessError);
|
|
|
|
|
virtual void processStarted();
|
|
|
|
|
virtual void processFinished(int, QProcess::ExitStatus);
|
2014-04-25 12:19:48 +02:00
|
|
|
virtual void localHostAddressRetrieved(const QHostAddress &localHostAddress);
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
class Private;
|
|
|
|
|
Private *d;
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-18 17:05:49 +02:00
|
|
|
} // namespace Valgrind
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
#endif // VALGRIND_RUNNER_H
|