forked from qt-creator/qt-creator
Valgrind: Keep tool names in the *ToolRunners only
Slightly less convoluted. Change-Id: I07410b49db05ea862fb82f3bffc25a5d7fb5a104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
using namespace Debugger;
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Valgrind::Callgrind;
|
using namespace Valgrind::Callgrind;
|
||||||
|
|
||||||
@@ -47,7 +46,6 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
|
|||||||
: ValgrindToolRunner(runControl)
|
: ValgrindToolRunner(runControl)
|
||||||
{
|
{
|
||||||
setDisplayName("CallgrindToolRunner");
|
setDisplayName("CallgrindToolRunner");
|
||||||
m_runner.setToolName("callgrind");
|
|
||||||
|
|
||||||
connect(&m_runner, &ValgrindRunner::finished,
|
connect(&m_runner, &ValgrindRunner::finished,
|
||||||
this, &CallgrindToolRunner::slotFinished);
|
this, &CallgrindToolRunner::slotFinished);
|
||||||
@@ -73,7 +71,7 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
|
|||||||
|
|
||||||
QStringList CallgrindToolRunner::toolArguments() const
|
QStringList CallgrindToolRunner::toolArguments() const
|
||||||
{
|
{
|
||||||
QStringList arguments;
|
QStringList arguments = {"--tool=callgrind"};
|
||||||
|
|
||||||
QTC_ASSERT(m_settings, return arguments);
|
QTC_ASSERT(m_settings, return arguments);
|
||||||
|
|
||||||
|
@@ -120,8 +120,7 @@ void MemcheckToolRunner::stop()
|
|||||||
|
|
||||||
QStringList MemcheckToolRunner::toolArguments() const
|
QStringList MemcheckToolRunner::toolArguments() const
|
||||||
{
|
{
|
||||||
QStringList arguments;
|
QStringList arguments = {"--tool=memcheck", "--gen-suppressions=all"};
|
||||||
arguments << "--gen-suppressions=all";
|
|
||||||
|
|
||||||
QTC_ASSERT(m_settings, return arguments);
|
QTC_ASSERT(m_settings, return arguments);
|
||||||
|
|
||||||
|
@@ -69,7 +69,6 @@ public:
|
|||||||
QHostAddress localServerAddress;
|
QHostAddress localServerAddress;
|
||||||
QProcess::ProcessChannelMode channelMode = QProcess::SeparateChannels;
|
QProcess::ProcessChannelMode channelMode = QProcess::SeparateChannels;
|
||||||
bool m_finished = false;
|
bool m_finished = false;
|
||||||
QString m_tool;
|
|
||||||
|
|
||||||
QTcpServer xmlServer;
|
QTcpServer xmlServer;
|
||||||
XmlProtocol::ThreadedParser parser;
|
XmlProtocol::ThreadedParser parser;
|
||||||
@@ -102,7 +101,6 @@ void ValgrindRunner::Private::run()
|
|||||||
this, &ValgrindRunner::Private::remoteProcessStarted);
|
this, &ValgrindRunner::Private::remoteProcessStarted);
|
||||||
|
|
||||||
QStringList fullArgs = m_valgrindArguments;
|
QStringList fullArgs = m_valgrindArguments;
|
||||||
fullArgs << QString("--tool=%1").arg(m_tool);
|
|
||||||
if (HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
// May be slower to start but without it we get no filenames for symbols.
|
// May be slower to start but without it we get no filenames for symbols.
|
||||||
fullArgs << "--dsymutil=yes";
|
fullArgs << "--dsymutil=yes";
|
||||||
@@ -212,7 +210,6 @@ void ValgrindRunner::Private::closed(bool success)
|
|||||||
ValgrindRunner::ValgrindRunner(QObject *parent)
|
ValgrindRunner::ValgrindRunner(QObject *parent)
|
||||||
: QObject(parent), d(new Private(this))
|
: QObject(parent), d(new Private(this))
|
||||||
{
|
{
|
||||||
setToolName("memcheck");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ValgrindRunner::~ValgrindRunner()
|
ValgrindRunner::~ValgrindRunner()
|
||||||
@@ -269,11 +266,6 @@ void ValgrindRunner::waitForFinished() const
|
|||||||
loop.exec();
|
loop.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ValgrindRunner::setToolName(const QString &toolName)
|
|
||||||
{
|
|
||||||
d->m_tool = toolName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handleSocketParameter(const QString &prefix, const QTcpServer &tcpServer,
|
static void handleSocketParameter(const QString &prefix, const QTcpServer &tcpServer,
|
||||||
bool *useXml, QStringList *arguments)
|
bool *useXml, QStringList *arguments)
|
||||||
{
|
{
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <debugger/analyzer/analyzerconstants.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/runnables.h>
|
#include <projectexplorer/runnables.h>
|
||||||
|
|
||||||
#include <utils/outputformat.h>
|
#include <utils/outputformat.h>
|
||||||
@@ -54,7 +52,6 @@ public:
|
|||||||
void setDevice(const ProjectExplorer::IDevice::ConstPtr &device);
|
void setDevice(const ProjectExplorer::IDevice::ConstPtr &device);
|
||||||
|
|
||||||
void waitForFinished() const;
|
void waitForFinished() const;
|
||||||
void setToolName(const QString &toolName);
|
|
||||||
|
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user