debugger: remove unused code

Change-Id: I105aa0433530abb4e9f53de19c0846281ccda0cf
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-07-25 03:38:19 +02:00
parent c6f7eaea59
commit 26e7ed14b7
9 changed files with 5 additions and 66 deletions

View File

@@ -82,7 +82,6 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.dumperLibrary = runConfig->dumperLib(); params.dumperLibrary = runConfig->dumperLib();
params.executable = project(runConfig)->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process"); params.executable = project(runConfig)->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process");
params.remoteChannel = runConfig->remoteChannel(); params.remoteChannel = runConfig->remoteChannel();
params.remoteArchitecture = QLatin1String("arm");
params.useServerStartScript = true; params.useServerStartScript = true;
params.solibSearchPath.clear(); params.solibSearchPath.clear();

View File

@@ -711,12 +711,11 @@ public:
void toSettings(QSettings *) const; void toSettings(QSettings *) const;
void fromSettings(const QSettings *settings); void fromSettings(const QSettings *settings);
Id profileId;
QString localExecutable; QString localExecutable;
QString remoteArchitecture;
QString overrideStartScript; QString overrideStartScript;
bool useServerStartScript; bool useServerStartScript;
QString serverStartScript; QString serverStartScript;
Id profileId;
QString debugInfoLocation; QString debugInfoLocation;
}; };
@@ -746,7 +745,6 @@ StartRemoteParameters::StartRemoteParameters() :
bool StartRemoteParameters::equals(const StartRemoteParameters &rhs) const bool StartRemoteParameters::equals(const StartRemoteParameters &rhs) const
{ {
return localExecutable == rhs.localExecutable return localExecutable == rhs.localExecutable
&& remoteArchitecture == rhs.remoteArchitecture
&& overrideStartScript == rhs.overrideStartScript && overrideStartScript == rhs.overrideStartScript
&& useServerStartScript == rhs.useServerStartScript && useServerStartScript == rhs.useServerStartScript
&& serverStartScript == rhs.serverStartScript && serverStartScript == rhs.serverStartScript
@@ -763,7 +761,6 @@ QString StartRemoteParameters::displayName() const
void StartRemoteParameters::toSettings(QSettings *settings) const void StartRemoteParameters::toSettings(QSettings *settings) const
{ {
settings->setValue(_("LastLocalExecutable"), localExecutable); settings->setValue(_("LastLocalExecutable"), localExecutable);
settings->setValue(_("LastRemoteArchitecture"), remoteArchitecture);
settings->setValue(_("LastServerStartScript"), serverStartScript); settings->setValue(_("LastServerStartScript"), serverStartScript);
settings->setValue(_("LastUseServerStartScript"), useServerStartScript); settings->setValue(_("LastUseServerStartScript"), useServerStartScript);
settings->setValue(_("LastRemoteStartScript"), overrideStartScript); settings->setValue(_("LastRemoteStartScript"), overrideStartScript);
@@ -780,7 +777,6 @@ void StartRemoteParameters::fromSettings(const QSettings *settings)
} else { } else {
profileId = Id(profileIdString); profileId = Id(profileIdString);
} }
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
serverStartScript = settings->value(_("LastServerStartScript")).toString(); serverStartScript = settings->value(_("LastServerStartScript")).toString();
useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool(); useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool();
overrideStartScript = settings->value(_("LastRemoteStartScript")).toString(); overrideStartScript = settings->value(_("LastRemoteStartScript")).toString();
@@ -793,7 +789,6 @@ class StartRemoteDialogPrivate
public: public:
ProfileChooser *profileChooser; ProfileChooser *profileChooser;
PathChooser *executablePathChooser; PathChooser *executablePathChooser;
QComboBox *architectureComboBox;
PathChooser *debuginfoPathChooser; PathChooser *debuginfoPathChooser;
PathChooser *overrideStartScriptPathChooser; PathChooser *overrideStartScriptPathChooser;
QCheckBox *useServerStartScriptCheckBox; QCheckBox *useServerStartScriptCheckBox;
@@ -816,9 +811,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
d->executablePathChooser->setExpectedKind(PathChooser::File); d->executablePathChooser->setExpectedKind(PathChooser::File);
d->executablePathChooser->setPromptDialogTitle(tr("Select Executable")); d->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
d->architectureComboBox = new QComboBox(this);
d->architectureComboBox->setEditable(true);
d->debuginfoPathChooser = new PathChooser(this); d->debuginfoPathChooser = new PathChooser(this);
d->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information")); d->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information"));
@@ -855,7 +847,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
formLayout->addRow(tr("Target:"), d->profileChooser); formLayout->addRow(tr("Target:"), d->profileChooser);
formLayout->addRow(tr("Local &executable:"), d->executablePathChooser); formLayout->addRow(tr("Local &executable:"), d->executablePathChooser);
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
formLayout->addRow(tr("&Architecture:"), d->architectureComboBox);
formLayout->addRow(tr("Location of debugging &information:"), d->debuginfoPathChooser); formLayout->addRow(tr("Location of debugging &information:"), d->debuginfoPathChooser);
formLayout->addRow(tr("Override host GDB s&tart script:"), d->overrideStartScriptPathChooser); formLayout->addRow(tr("Override host GDB s&tart script:"), d->overrideStartScriptPathChooser);
formLayout->addRow(d->serverStartScriptLabel, d->useServerStartScriptCheckBox); formLayout->addRow(d->serverStartScriptLabel, d->useServerStartScriptCheckBox);
@@ -890,19 +881,11 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
const QString arrayName = useScript ? const QString arrayName = useScript ?
_("StartRemoteScript") : _("StartRemote"); _("StartRemoteScript") : _("StartRemote");
QStringList arches;
arches << _("i386:x86-64:intel") << _("i386") << _("arm");
QList<StartRemoteParameters> history = QList<StartRemoteParameters> history =
readParameterHistory<StartRemoteParameters>(settings, settingsGroup, arrayName); readParameterHistory<StartRemoteParameters>(settings, settingsGroup, arrayName);
QTC_ASSERT(!history.isEmpty(), return false); QTC_ASSERT(!history.isEmpty(), return false);
foreach (const StartRemoteParameters &h, history)
if (!arches.contains(h.remoteArchitecture))
arches.prepend(h.remoteArchitecture);
StartRemoteDialog dialog(parent, useScript); StartRemoteDialog dialog(parent, useScript);
dialog.setRemoteArchitectures(arches);
dialog.setHistory(history); dialog.setHistory(history);
dialog.setParameters(history.back()); dialog.setParameters(history.back());
if (dialog.exec() != QDialog::Accepted) if (dialog.exec() != QDialog::Accepted)
@@ -917,7 +900,6 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
} }
fillParameters(sp, dialog.profileId()); fillParameters(sp, dialog.profileId());
sp->remoteArchitecture = newParameters.remoteArchitecture;
sp->executable = newParameters.localExecutable; sp->executable = newParameters.localExecutable;
sp->displayName = tr("Remote: \"%1\"").arg(sp->remoteChannel); sp->displayName = tr("Remote: \"%1\"").arg(sp->remoteChannel);
sp->overrideStartScript = newParameters.overrideStartScript; sp->overrideStartScript = newParameters.overrideStartScript;
@@ -931,7 +913,6 @@ StartRemoteParameters StartRemoteDialog::parameters() const
{ {
StartRemoteParameters result; StartRemoteParameters result;
result.localExecutable = d->executablePathChooser->path(); result.localExecutable = d->executablePathChooser->path();
result.remoteArchitecture = d->architectureComboBox->currentText();
result.overrideStartScript = d->overrideStartScriptPathChooser->path(); result.overrideStartScript = d->overrideStartScriptPathChooser->path();
result.useServerStartScript = d->useServerStartScriptCheckBox->isChecked(); result.useServerStartScript = d->useServerStartScriptCheckBox->isChecked();
result.serverStartScript = d->serverStartScriptPathChooser->path(); result.serverStartScript = d->serverStartScriptPathChooser->path();
@@ -943,9 +924,6 @@ StartRemoteParameters StartRemoteDialog::parameters() const
void StartRemoteDialog::setParameters(const StartRemoteParameters &p) void StartRemoteDialog::setParameters(const StartRemoteParameters &p)
{ {
d->executablePathChooser->setPath(p.localExecutable); d->executablePathChooser->setPath(p.localExecutable);
const int index = d->architectureComboBox->findText(p.remoteArchitecture);
if (index != -1)
d->architectureComboBox->setCurrentIndex(index);
d->overrideStartScriptPathChooser->setPath(p.overrideStartScript); d->overrideStartScriptPathChooser->setPath(p.overrideStartScript);
d->useServerStartScriptCheckBox->setChecked(p.useServerStartScript); d->useServerStartScriptCheckBox->setChecked(p.useServerStartScript);
d->serverStartScriptPathChooser->setPath(p.serverStartScript); d->serverStartScriptPathChooser->setPath(p.serverStartScript);
@@ -974,15 +952,6 @@ Id StartRemoteDialog::profileId() const
return d->profileChooser->currentProfileId(); return d->profileChooser->currentProfileId();
} }
void StartRemoteDialog::setRemoteArchitectures(const QStringList &list)
{
d->architectureComboBox->clear();
if (!list.isEmpty()) {
d->architectureComboBox->insertItems(0, list);
d->architectureComboBox->setCurrentIndex(0);
}
}
void StartRemoteDialog::updateState() void StartRemoteDialog::updateState()
{ {
bool enabled = d->useServerStartScriptCheckBox->isChecked(); bool enabled = d->useServerStartScriptCheckBox->isChecked();

View File

@@ -140,8 +140,6 @@ private:
void setParameters(const StartRemoteParameters &); void setParameters(const StartRemoteParameters &);
void setHistory(const QList<StartRemoteParameters> &); void setHistory(const QList<StartRemoteParameters> &);
void setRemoteArchitectures(const QStringList &list);
Core::Id profileId() const; Core::Id profileId() const;
StartRemoteDialogPrivate *d; StartRemoteDialogPrivate *d;

View File

@@ -126,7 +126,6 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &sp)
<< " attachPID=" << sp.attachPID << " attachPID=" << sp.attachPID
<< " useTerminal=" << sp.useTerminal << " useTerminal=" << sp.useTerminal
<< " remoteChannel=" << sp.remoteChannel << " remoteChannel=" << sp.remoteChannel
<< " remoteArchitecture=" << sp.remoteArchitecture
<< " symbolFileName=" << sp.symbolFileName << " symbolFileName=" << sp.symbolFileName
<< " useServerStartScript=" << sp.useServerStartScript << " useServerStartScript=" << sp.useServerStartScript
<< " serverStartScript=" << sp.serverStartScript << " serverStartScript=" << sp.serverStartScript

View File

@@ -784,7 +784,6 @@ public slots:
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc); Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc);
void runScheduled(); void runScheduled();
void attachCore(); void attachCore();
void attachToRemoteServer(const QString &spec);
void enableReverseDebuggingTriggered(const QVariant &value); void enableReverseDebuggingTriggered(const QVariant &value);
void languagesChanged(); void languagesChanged();
@@ -1315,7 +1314,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
{ {
const QString &option = *it; const QString &option = *it;
// '-debug <pid>' // '-debug <pid>'
// '-debug <exe>[,server=<server:port>|,core=<core>][,arch=<arch>][,profile=<profile>]' // '-debug <exe>[,server=<server:port>][,core=<core>][,profile=<profile>]'
if (*it == _("-debug")) { if (*it == _("-debug")) {
++it; ++it;
if (it == cend) { if (it == cend) {
@@ -1353,8 +1352,6 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel); sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel);
sp.startMessage = tr("Attaching to remote server %1.").arg(sp.remoteChannel); sp.startMessage = tr("Attaching to remote server %1.").arg(sp.remoteChannel);
} }
else if (key == QLatin1String("arch"))
sp.remoteArchitecture = val;
else if (key == QLatin1String("core")) { else if (key == QLatin1String("core")) {
sp.startMode = AttachCore; sp.startMode = AttachCore;
sp.closeMode = DetachAtClose; sp.closeMode = DetachAtClose;
@@ -1598,22 +1595,6 @@ void DebuggerPluginPrivate::attachCore()
startDebugger(rc); startDebugger(rc);
} }
void DebuggerPluginPrivate::attachToRemoteServer(const QString &spec)
{
// spec is: profile@server:port@executable@architecture
const QChar delim(QLatin1Char('@'));
DebuggerStartParameters sp;
fillParameters(&sp, Id(spec.section(delim, 0, 0)));
sp.remoteChannel = spec.section(delim, 1, 1);
sp.executable = spec.section(delim, 2, 2);
sp.remoteArchitecture = spec.section(delim, 3, 3);
sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel);
sp.startMode = AttachToRemoteServer;
sp.closeMode = KillAtClose;
if (DebuggerRunControl *rc = createDebugger(sp))
startDebugger(rc);
}
struct RemoteCdbMatcher : ProfileMatcher struct RemoteCdbMatcher : ProfileMatcher
{ {
RemoteCdbMatcher() : m_hostAbi(Abi::hostAbi()) {} RemoteCdbMatcher() : m_hostAbi(Abi::hostAbi()) {}
@@ -2734,8 +2715,7 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
str << "QML server: " << sp.qmlServerAddress << ':' str << "QML server: " << sp.qmlServerAddress << ':'
<< sp.qmlServerPort << '\n'; << sp.qmlServerPort << '\n';
if (!sp.remoteChannel.isEmpty()) { if (!sp.remoteChannel.isEmpty()) {
str << "Remote: " << sp.remoteChannel << ", " str << "Remote: " << sp.remoteChannel << '\n';
<< sp.remoteArchitecture << '\n';
if (!sp.remoteDumperLib.isEmpty()) if (!sp.remoteDumperLib.isEmpty())
str << "Remote dumpers: " << sp.remoteDumperLib << '\n'; str << "Remote dumpers: " << sp.remoteDumperLib << '\n';
if (!sp.remoteSourcesDir.isEmpty()) if (!sp.remoteSourcesDir.isEmpty())

View File

@@ -111,7 +111,6 @@ public:
QString qtInstallPath; QString qtInstallPath;
// Used by remote debugging. // Used by remote debugging.
QString remoteChannel; QString remoteChannel;
QString remoteArchitecture;
QString gnuTarget; QString gnuTarget;
QString symbolFileName; QString symbolFileName;
bool useServerStartScript; bool useServerStartScript;

View File

@@ -134,10 +134,8 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString(); params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString(); params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile)) { if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();
params.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
}
params.executable = runConfig->localExecutableFilePath(); params.executable = runConfig->localExecutableFilePath();
params.remoteChannel = runConfig->deployConfiguration()->deviceHost() + QLatin1String(":8000"); params.remoteChannel = runConfig->deployConfiguration()->deviceHost() + QLatin1String(":8000");

View File

@@ -132,10 +132,8 @@ Debugger::DebuggerStartParameters QnxRunControlFactory::startParameters(
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString(); params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString(); params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile)) { if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();
params.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
}
params.symbolFileName = runConfig->localExecutableFilePath(); params.symbolFileName = runConfig->localExecutableFilePath();
params.remoteExecutable = runConfig->remoteExecutableFilePath(); params.remoteExecutable = runConfig->remoteExecutableFilePath();

View File

@@ -122,7 +122,6 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
ToolChain *tc = ToolChainProfileInformation::toolChain(profile); ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
if (tc) { if (tc) {
const Abi &abi = tc->targetAbi(); const Abi &abi = tc->targetAbi();
params.remoteArchitecture = abi.toString();
params.gnuTarget = QLatin1String(abi.architecture() == Abi::ArmArchitecture params.gnuTarget = QLatin1String(abi.architecture() == Abi::ArmArchitecture
? "arm-none-linux-gnueabi": "i386-unknown-linux-gnu"); ? "arm-none-linux-gnueabi": "i386-unknown-linux-gnu");
} }