Commit ba47987e authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

purge TCF agent cra^Wstuff

it's dead code
parent 7313f3d6
......@@ -28,7 +28,6 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<argument name="-disable-cdb">Disable Cdb debugger engine</argument>
<argument name="-disable-gdb">Disable Gdb debugger engine</argument>
<argument name="-disable-sdb">Disable Qt Script debugger engine</argument>
<argument name="-disable-tcf">Disable Tcf debugger engine</argument>
<argument name="-debug" parameter="pid-or-corefile">Attach to Process-Id or Core file</argument>
<argument name="-wincrashevent" parameter="event-handle">Event handle used for attaching to crashed processes</argument>
</argumentList>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AttachTcfDialog</class>
<widget class="QDialog" name="AttachTcfDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>310</width>
<height>224</height>
</rect>
</property>
<property name="windowTitle">
<string>Start Debugger</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="channelLabel">
<property name="text">
<string>Host and port:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="channelLineEdit">
<property name="text">
<string notr="true">localhost:5115</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="architectureLabel">
<property name="text">
<string>Architecture:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="architectureComboBox"/>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="useServerStartScriptLabel">
<property name="text">
<string>Use server start script:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
<property name="text">
<string>Server start script:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -70,7 +70,6 @@ SOURCES += breakhandler.cpp \
name_demangler.cpp
FORMS += attachexternaldialog.ui \
attachcoredialog.ui \
attachtcfdialog.ui \
breakbyfunction.ui \
breakcondition.ui \
dumperoptionpage.ui \
......@@ -86,7 +85,6 @@ false {
include(cdb/cdb.pri)
include(gdb/gdb.pri)
include(script/script.pri)
include(tcf/tcf.pri)
include(shared/shared.pri)
OTHER_FILES += Debugger.pluginspec
......@@ -100,7 +100,6 @@ enum DebuggerStartMode
StartExternal, // Start binary found in file system
AttachExternal, // Attach to running process by process id
AttachCrashedExternal, // Attach to crashed process by process id
AttachTcf, // Attach to a running Target Communication Framework agent
AttachCore, // Attach to a core file
StartRemote // Start and attach to a remote process
};
......
......@@ -32,7 +32,6 @@
#include "ui_attachcoredialog.h"
#include "ui_attachexternaldialog.h"
#include "ui_attachtcfdialog.h"
#include "ui_startexternaldialog.h"
#include "ui_startremotedialog.h"
......@@ -318,95 +317,6 @@ void AttachExternalDialog::pidChanged(const QString &pid)
}
///////////////////////////////////////////////////////////////////////
//
// AttachTcfDialog
//
///////////////////////////////////////////////////////////////////////
AttachTcfDialog::AttachTcfDialog(QWidget *parent)
: QDialog(parent),
m_ui(new Ui::AttachTcfDialog)
{
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
this, SLOT(updateState()));
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
updateState();
}
AttachTcfDialog::~AttachTcfDialog()
{
delete m_ui;
}
void AttachTcfDialog::setRemoteChannel(const QString &channel)
{
m_ui->channelLineEdit->setText(channel);
}
QString AttachTcfDialog::remoteChannel() const
{
return m_ui->channelLineEdit->text();
}
void AttachTcfDialog::setRemoteArchitectures(const QStringList &list)
{
m_ui->architectureComboBox->clear();
if (!list.isEmpty()) {
m_ui->architectureComboBox->insertItems(0, list);
m_ui->architectureComboBox->setCurrentIndex(0);
}
}
void AttachTcfDialog::setRemoteArchitecture(const QString &arch)
{
int index = m_ui->architectureComboBox->findText(arch);
if (index != -1)
m_ui->architectureComboBox->setCurrentIndex(index);
}
QString AttachTcfDialog::remoteArchitecture() const
{
int index = m_ui->architectureComboBox->currentIndex();
return m_ui->architectureComboBox->itemText(index);
}
void AttachTcfDialog::setServerStartScript(const QString &scriptName)
{
m_ui->serverStartScript->setPath(scriptName);
}
QString AttachTcfDialog::serverStartScript() const
{
return m_ui->serverStartScript->path();
}
void AttachTcfDialog::setUseServerStartScript(bool on)
{
m_ui->useServerStartScriptCheckBox->setChecked(on);
}
bool AttachTcfDialog::useServerStartScript() const
{
return m_ui->useServerStartScriptCheckBox->isChecked();
}
void AttachTcfDialog::updateState()
{
bool enabled = m_ui->useServerStartScriptCheckBox->isChecked();
m_ui->serverStartScriptLabel->setEnabled(enabled);
m_ui->serverStartScript->setEnabled(enabled);
}
///////////////////////////////////////////////////////////////////////
//
// StartExternalDialog
......
......@@ -42,7 +42,6 @@ class QDialogButtonBox;
namespace Ui {
class AttachCoreDialog;
class AttachExternalDialog;
class AttachTcfDialog;
class StartExternalDialog;
class StartRemoteDialog;
} // namespace Ui
......@@ -113,31 +112,6 @@ private:
ProcessListFilterModel *m_model;
};
class AttachTcfDialog : public QDialog
{
Q_OBJECT
public:
explicit AttachTcfDialog(QWidget *parent);
~AttachTcfDialog();
void setRemoteChannel(const QString &host);
void setRemoteArchitecture(const QString &arch);
void setRemoteArchitectures(const QStringList &arches);
QString remoteChannel() const;
QString remoteArchitecture() const;
void setServerStartScript(const QString &scriptName);
QString serverStartScript() const;
void setUseServerStartScript(bool on);
bool useServerStartScript() const;
private slots:
void updateState();
private:
Ui::AttachTcfDialog *m_ui;
};
class StartExternalDialog : public QDialog
{
Q_OBJECT
......
......@@ -153,7 +153,6 @@ namespace Internal {
IDebuggerEngine *createGdbEngine(DebuggerManager *parent);
IDebuggerEngine *createScriptEngine(DebuggerManager *parent);
IDebuggerEngine *createTcfEngine(DebuggerManager *parent);
// The createWinEngine function takes a list of options pages it can add to.
// This allows for having a "enabled" toggle on the page independently
......@@ -262,7 +261,6 @@ void DebuggerStartParameters::clear()
static Debugger::Internal::IDebuggerEngine *gdbEngine = 0;
static Debugger::Internal::IDebuggerEngine *scriptEngine = 0;
static Debugger::Internal::IDebuggerEngine *tcfEngine = 0;
static Debugger::Internal::IDebuggerEngine *winEngine = 0;
struct DebuggerManagerPrivate
......@@ -335,7 +333,6 @@ DebuggerManager::~DebuggerManager()
#define doDelete(ptr) delete ptr; ptr = 0
doDelete(gdbEngine);
doDelete(scriptEngine);
doDelete(tcfEngine);
doDelete(winEngine);
#undef doDelete
DebuggerManagerPrivate::instance = 0;
......@@ -572,11 +569,6 @@ QList<Core::IOptionsPage*> DebuggerManager::initializeEngines(unsigned enabledTy
scriptEngine->addOptionPages(&rc);
}
if (enabledTypeFlags & TcfEngineType) {
tcfEngine = createTcfEngine(this);
tcfEngine->addOptionPages(&rc);
}
d->m_engine = 0;
STATE_DEBUG(gdbEngine << winEngine << scriptEngine << rc.size());
return rc;
......@@ -752,7 +744,6 @@ void DebuggerManager::shutdown()
doDelete(scriptEngine);
doDelete(gdbEngine);
doDelete(winEngine);
doDelete(tcfEngine);
// Delete these manually before deleting the manager
// (who will delete the models for most views)
......@@ -989,9 +980,6 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
d->m_engine = determineDebuggerEngine(d->m_startParameters->attachPID,
d->m_startParameters->toolChainType, &errorMessage);
break;
case AttachTcf:
d->m_engine = tcfEngine;
break;
default:
d->m_engine = determineDebuggerEngine(d->m_startParameters->executable,
d->m_startParameters->toolChainType, &errorMessage, &settingsIdHint);
......
......@@ -87,7 +87,6 @@ class CdbDebugEventCallback;
class CdbDumperHelper;
class CdbExceptionLoggerEventCallback;
class GdbEngine;
class TcfEngine;
class CdbDebugEngine;
struct CdbDebugEnginePrivate;
} // namespace Internal
......@@ -129,11 +128,9 @@ enum DebuggerEngineTypeFlags
GdbEngineType = 0x01,
ScriptEngineType = 0x02,
CdbEngineType = 0x04,
TcfEngineType = 0x08,
AllEngineTypes = GdbEngineType
| ScriptEngineType
| CdbEngineType
| TcfEngineType
};
QDebug operator<<(QDebug d, DebuggerState state);
......@@ -159,7 +156,6 @@ public:
friend class Internal::CdbExceptionLoggerEventCallback;
friend class Internal::GdbEngine;
friend class Internal::ScriptEngine;
friend class Internal::TcfEngine;
friend class Internal::CdbDebugEngine;
friend struct Internal::CdbDebugEnginePrivate;
......
......@@ -108,7 +108,6 @@ const char * const M_DEBUG_START_DEBUGGING = "QtCreator.Menu.Debug.StartDebuggin
const char * const STARTEXTERNAL = "Debugger.StartExternal";
const char * const ATTACHEXTERNAL = "Debugger.AttachExternal";
const char * const ATTACHCORE = "Debugger.AttachCore";
const char * const ATTACHTCF = "Debugger.AttachTcf";
const char * const ATTACHREMOTE = "Debugger.AttachRemote";
const char * const DETACH = "Debugger.Detach";
......@@ -516,10 +515,6 @@ bool DebuggerPlugin::parseArgument(QStringList::const_iterator &it,
m_cmdLineEnabledEngines &= ~ScriptEngineType;
return true;
}
if (option == QLatin1String("-disable-tcf")) {
m_cmdLineEnabledEngines &= ~TcfEngineType;
return true;
}
*errorMessage = tr("Invalid debugger option: %1").arg(option);
return false;
......@@ -597,13 +592,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_attachCoreAction->setText(tr("Attach to Core..."));
connect(m_attachCoreAction, SIGNAL(triggered()), this, SLOT(attachCore()));
m_attachTcfAction = new QAction(this);
m_attachTcfAction->setText(tr("Attach to Running Tcf Agent..."));
m_attachTcfAction->setToolTip(tr("This attaches to a running "
"'Target Communication Framework' agent."));
connect(m_attachTcfAction, SIGNAL(triggered()),
this, SLOT(attachRemoteTcf()));
m_startRemoteAction = new QAction(this);
m_startRemoteAction->setText(tr("Start and Attach to Remote Application..."));
......@@ -639,11 +627,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd = am->registerAction(m_attachCoreAction,
Constants::ATTACHCORE, globalcontext);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
/*
cmd = am->registerAction(m_attachTcfAction,
Constants::ATTACHTCF, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
*/
cmd = am->registerAction(m_startRemoteAction,
Constants::ATTACHREMOTE, globalcontext);
......@@ -1329,42 +1312,6 @@ void DebuggerPlugin::startRemoteApplication()
runControl->start();
}
void DebuggerPlugin::attachRemoteTcf()
{
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
AttachTcfDialog dlg(m_manager->mainWindow());
QStringList arches;
arches.append(_("i386:x86-64:intel"));
dlg.setRemoteArchitectures(arches);
dlg.setRemoteChannel(
configValue(_("LastTcfRemoteChannel")).toString());
dlg.setRemoteArchitecture(
configValue(_("LastTcfRemoteArchitecture")).toString());
dlg.setServerStartScript(
configValue(_("LastTcfServerStartScript")).toString());
dlg.setUseServerStartScript(
configValue(_("LastTcfUseServerStartScript")).toBool());
if (dlg.exec() != QDialog::Accepted)
return;
setConfigValue(_("LastTcfRemoteChannel"), dlg.remoteChannel());
setConfigValue(_("LastTcfRemoteArchitecture"), dlg.remoteArchitecture());
setConfigValue(_("LastTcfServerStartScript"), dlg.serverStartScript());
setConfigValue(_("LastTcfUseServerStartScript"), dlg.useServerStartScript());
sp->remoteChannel = dlg.remoteChannel();
sp->remoteArchitecture = dlg.remoteArchitecture();
sp->serverStartScript = dlg.serverStartScript();
sp->startMode = AttachTcf;
if (dlg.useServerStartScript())
sp->serverStartScript = dlg.serverStartScript();
RunConfigurationPtr rc = activeRunConfiguration();
if (rc.isNull())
rc = DebuggerRunControlFactory::createDefaultRunConfiguration();
if (RunControl *runControl = m_debuggerRunControlFactory
->create(rc, ProjectExplorer::Constants::DEBUGMODE, sp))
runControl->start();
}
#include "debuggerplugin.moc"
Q_EXPORT_PLUGIN(DebuggerPlugin)
......@@ -106,7 +106,6 @@ private slots:
void startRemoteApplication();
void attachExternalApplication();
void attachCore();
void attachRemoteTcf();
void attachCmdLinePid();
void attachCmdLineCore();
......@@ -143,7 +142,6 @@ private:
QAction *m_startRemoteAction;
QAction *m_attachExternalAction;
QAction *m_attachCoreAction;
QAction *m_attachTcfAction;
QAction *m_detachAction;
};
......
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef DEBUGGER_JSON_H
#define DEBUGGER_JSON_H
#include <QtCore/QByteArray>
#include <QtCore/QList>
namespace Debugger {
namespace Internal {
class JsonValue
{
public:
JsonValue() : m_type(Invalid) {}
explicit JsonValue(const QByteArray &str) { fromString(str); }
QByteArray m_name;
QByteArray m_data;
QList<JsonValue> m_children;
enum Type {
Invalid,
String,
Number,
Object,
Array,
};
Type m_type;
inline Type type() const { return m_type; }
inline QByteArray name() const { return m_name; }
inline bool hasName(const char *name) const { return m_name == name; }
inline bool isValid() const { return m_type != Invalid; }
inline bool isNumber() const { return m_type == Number; }
inline bool isString() const { return m_type == String; }
inline bool isObject() const { return m_type == Object; }
inline bool isArray() const { return m_type == Array; }
inline QByteArray data() const { return m_data; }
inline const QList<JsonValue> &children() const { return m_children; }
inline int childCount() const { return m_children.size(); }
const JsonValue &childAt(int index) const { return m_children[index]; }
JsonValue &childAt(int index) { return m_children[index]; }
JsonValue findChild(const char *name) const;
QByteArray toString(bool multiline = false, int indent = 0) const;
void fromString(const QByteArray &str);
void setStreamOutput(const QByteArray &name, const QByteArray &content);
private:
static QByteArray parseCString(const char *&from, const char *to);
static QByteArray parseNumber(const char *&from, const char *to);
static QByteArray escapeCString(const QByteArray &ba);
static QString escapeCString(const QString &ba);
void parsePair(const char *&from, const char *to);
void parseValue(const char *&from, const char *to);
void parseObject(const char *&from, const char *to);
void parseArray(const char *&from, const char *to);
void dumpChildren(QByteArray *str, bool multiline, int indent) const;
};
} // namespace Internal
} // namespace Debugger
//Q_DECLARE_METATYPE(GdbDebugger::Internal::JsonValue);
#endif // DEBUGGER_JSON_H
HEADERS += \
$$PWD/json.h \
$$PWD/tcfengine.h \
SOURCES += \
$$PWD/json.cpp \
$$PWD/tcfengine.cpp \
FORMS +=
RESOURCES +=
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef DEBUGGER_TCFENGINE_H
#define DEBUGGER_TCFENGINE_H
#include <QtCore/QByteArray>
#include <QtCore/QHash>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtCore/QProcess>
#include <QtCore/QQueue>
#include <QtCore/QSet>
#include <QtCore/QTimer>
#include <QtCore/QVariant>
#include <QtNetwork/QAbstractSocket>
QT_BEGIN_NAMESPACE
class QTcpSocket;
QT_END_NAMESPACE
#include "idebuggerengine.h"
#include "debuggermanager.h"
#include "json.h"
namespace Debugger {
namespace Internal {
class ScriptAgent;
class WatchData;
class TcfEngine : public IDebuggerEngine
{
Q_OBJECT
public:
explicit TcfEngine(DebuggerManager *parent);
~TcfEngine();