Commit a0e57860 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Valgrind: Remove library and move code into plugin.

Compile on Windows.

Change-Id: I54a4df0cee585713979d37fe7b838f5a5cf4a7be
Reviewed-on: http://codereview.qt.nokia.com/1150

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent ef7405d2
......@@ -16,11 +16,6 @@ SUBDIRS = \
qmleditorwidgets \
symbianutils
!win32 {
SUBDIRS += valgrind
}
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
win32 {
include(qtcreatorcdbext/cdb_detect.pri)
......
LIBS *= -l$$qtLibraryName(Valgrind)
TEMPLATE = lib
TARGET = Valgrind
include(../../qtcreatorlibrary.pri)
include(../utils/utils.pri)
TEMPLATE = lib
DEFINES += VALGRIND_LIBRARY
QT += network
HEADERS += valgrind_global.h \
xmlprotocol/frame.h \
xmlprotocol/parser.h \
xmlprotocol/error.h \
xmlprotocol/status.h \
xmlprotocol/suppression.h \
xmlprotocol/threadedparser.h \
xmlprotocol/announcethread.h \
xmlprotocol/stack.h \
xmlprotocol/errorlistmodel.h \
xmlprotocol/stackmodel.h \
xmlprotocol/modelhelpers.h \
callgrind/callgrindparser.h \
callgrind/callgrindparsedata.h \
callgrind/callgrindfunction.h \
callgrind/callgrindfunction_p.h \
callgrind/callgrindfunctioncycle.h \
callgrind/callgrindfunctioncall.h \
callgrind/callgrindcostitem.h \
callgrind/callgrinddatamodel.h \
callgrind/callgrindabstractmodel.h \
callgrind/callgrindcallmodel.h \
callgrind/callgrindcontroller.h \
callgrind/callgrindcycledetection.h \
callgrind/callgrindproxymodel.h \
callgrind/callgrindstackbrowser.h \
callgrind/callgrindrunner.h \
memcheck/memcheckrunner.h \
valgrindrunner.h \
valgrindprocess.h
SOURCES += xmlprotocol/error.cpp \
xmlprotocol/frame.cpp \
xmlprotocol/parser.cpp \
xmlprotocol/status.cpp \
xmlprotocol/suppression.cpp \
xmlprotocol/threadedparser.cpp \
xmlprotocol/announcethread.cpp \
xmlprotocol/stack.cpp \
xmlprotocol/errorlistmodel.cpp \
xmlprotocol/stackmodel.cpp \
xmlprotocol/modelhelpers.cpp \
callgrind/callgrindparser.cpp \
callgrind/callgrindparsedata.cpp \
callgrind/callgrindfunction.cpp \
callgrind/callgrindfunctioncycle.cpp \
callgrind/callgrindfunctioncall.cpp \
callgrind/callgrindcostitem.cpp \
callgrind/callgrindabstractmodel.cpp \
callgrind/callgrinddatamodel.cpp \
callgrind/callgrindcallmodel.cpp \
callgrind/callgrindcontroller.cpp \
callgrind/callgrindcycledetection.cpp \
callgrind/callgrindproxymodel.cpp \
callgrind/callgrindrunner.cpp \
callgrind/callgrindstackbrowser.cpp \
memcheck/memcheckrunner.cpp \
valgrindrunner.cpp \
valgrindprocess.cpp
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Author: Nicolas Arnaud-Cormos, KDAB (nicolas.arnaud-cormos@kdab.com)
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#ifndef VALGRIND_GLOBAL_H
#define VALGRIND_GLOBAL_H
#include <QtCore/QtGlobal>
#if defined(VALGRIND_LIBRARY)
# define VALGRINDSHARED_EXPORT Q_DECL_EXPORT
#else
# define VALGRINDSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // VALGRIND_GLOBAL_H
......@@ -40,7 +40,6 @@
#include "analyzeroptionspage.h"
#include <coreplugin/icore.h>
#include <valgrind/xmlprotocol/error.h>
#include <utils/qtcassert.h>
#include <QtCore/QSettings>
......
......@@ -43,11 +43,8 @@ SUBDIRS = plugin_coreplugin \
plugin_macros \
debugger/dumper.pro \
plugin_qmlprofiler \
plugin_remotelinux
!win32 {
SUBDIRS += plugin_valgrind
}
plugin_remotelinux \
plugin_valgrind
linux-* {
SUBDIRS += debugger/ptracepreload.pro
......@@ -269,11 +266,9 @@ plugin_analyzerbase.depends = plugin_coreplugin
plugin_analyzerbase.depends += plugin_projectexplorer
plugin_analyzerbase.depends += plugin_remotelinux
!win32 {
plugin_valgrind.subdir = valgrind
plugin_valgrind.depends = plugin_coreplugin
plugin_valgrind.depends += plugin_analyzerbase
}
plugin_valgrind.subdir = valgrind
plugin_valgrind.depends = plugin_coreplugin
plugin_valgrind.depends += plugin_analyzerbase
plugin_qmlprofiler.subdir = qmlprofiler
plugin_qmlprofiler.depends = plugin_coreplugin
......
TEMPLATE = lib
TARGET = Valgrind
DEFINES += VALGRIND_LIBRARY
include(../../qtcreatorplugin.pri)
include(valgrind.pri)
include(valgrind_dependencies.pri)
include(valgrind/valgrind.pri)
QT *= network
QT += network
INCLUDEPATH *= $$PWD
HEADERS += \
valgrindplugin.h \
valgrind_global.h \
valgrindengine.h \
valgrindconfigwidget.h \
valgrindsettings.h \
\
callgrindconfigwidget.h \
callgrindcostdelegate.h \
callgrindcostview.h \
......@@ -51,7 +49,6 @@ SOURCES += \
callgrindengine.cpp \
workarounds.cpp \
callgrindtextmark.cpp \
\
memchecktool.cpp \
memcheckengine.cpp \
memcheckerrorview.cpp \
......
......@@ -33,8 +33,6 @@
#ifndef LIBVALGRIND_CALLGRINDABSTRACTMODEL_H
#define LIBVALGRIND_CALLGRINDABSTRACTMODEL_H
#include "../valgrind_global.h"
#include <QtGui/QAbstractItemView>
namespace Valgrind {
......
......@@ -35,8 +35,6 @@
#include <QtCore/QAbstractItemModel>
#include "../valgrind_global.h"
#include "callgrindabstractmodel.h"
namespace Valgrind {
......@@ -48,7 +46,7 @@ class Function;
/**
* Model to display list of function calls.
*/
class VALGRINDSHARED_EXPORT CallModel : public QAbstractItemModel
class CallModel : public QAbstractItemModel
{
Q_OBJECT
public:
......
......@@ -35,7 +35,7 @@
#include <QDebug>
#include <QDir>
#include <valgrind/valgrindprocess.h>
#include <valgrindprocess.h>
#include <utils/qtcassert.h>
#include <utils/ssh/sftpchannel.h>
......@@ -137,9 +137,14 @@ void CallgrindController::run(Option option)
#if CALLGRIND_CONTROL_DEBUG
m_process->setProcessChannelMode(QProcess::ForwardedChannels);
#endif
#ifdef Q_OS_WIN
int pid = 0;
#else
const int pid = m_valgrindProc->pid();
#endif
m_process->run(CALLGRIND_CONTROL_BINARY,
QStringList() << optionString << QString::number(m_valgrindProc->pid()),
QStringList() << optionString << QString::number(pid),
QString(), QString());
}
......@@ -200,7 +205,8 @@ void CallgrindController::getLocalDataFile()
QTC_ASSERT(m_valgrindProc, return);
// we look for callgrind.out.PID, but there may be updated ones called ~.PID.NUM
QString baseFileName = QString("callgrind.out.%1").arg(m_valgrindProc->pid());
QString baseFileName = QString("callgrind.out.%1").
arg(m_valgrindProc->pid());
const QString workingDir = m_valgrindProc->workingDirectory();
// first, set the to-be-parsed file to callgrind.out.PID
QString fileName = workingDir.isEmpty() ? baseFileName : (workingDir + QDir::separator() + baseFileName);
......
......@@ -41,15 +41,13 @@
#include <utils/ssh/sshremoteprocess.h>
#include <utils/ssh/sftpchannel.h>
#include <valgrind/valgrind_global.h>
namespace Valgrind {
class ValgrindProcess;
namespace Callgrind {
class VALGRINDSHARED_EXPORT CallgrindController : public QObject
class CallgrindController : public QObject
{
Q_OBJECT
Q_ENUMS(Option)
......
......@@ -33,7 +33,7 @@
#ifndef LIBVALGRIND_CALLGRIND_COSTITEM_H
#define LIBVALGRIND_CALLGRIND_COSTITEM_H
#include "../valgrind_global.h"
#include <QtCore/QtGlobal>
QT_BEGIN_NAMESPACE
class QString;
......@@ -49,7 +49,7 @@ class ParseData;
/**
* This class represents the cost(s) at given position(s).
*/
class VALGRINDSHARED_EXPORT CostItem
class CostItem
{
public:
/// @p data the file data this cost item was parsed in.
......
......@@ -33,8 +33,6 @@
#ifndef VALGRIND_CALLGRIND_CALLGRINDDATAMODEL_H
#define VALGRIND_CALLGRIND_CALLGRINDDATAMODEL_H
#include "../valgrind_global.h"
#include "callgrindabstractmodel.h"
#include <QtCore/QAbstractItemModel>
......@@ -45,7 +43,7 @@ namespace Callgrind {
class Function;
class ParseData;
class VALGRINDSHARED_EXPORT DataModel : public QAbstractItemModel
class DataModel : public QAbstractItemModel
{
Q_OBJECT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment