forked from qt-creator/qt-creator
debugger: remove unused code
Change-Id: I105aa0433530abb4e9f53de19c0846281ccda0cf Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -82,7 +82,6 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
||||
params.dumperLibrary = runConfig->dumperLib();
|
||||
params.executable = project(runConfig)->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process");
|
||||
params.remoteChannel = runConfig->remoteChannel();
|
||||
params.remoteArchitecture = QLatin1String("arm");
|
||||
params.useServerStartScript = true;
|
||||
|
||||
params.solibSearchPath.clear();
|
||||
|
@@ -711,12 +711,11 @@ public:
|
||||
void toSettings(QSettings *) const;
|
||||
void fromSettings(const QSettings *settings);
|
||||
|
||||
Id profileId;
|
||||
QString localExecutable;
|
||||
QString remoteArchitecture;
|
||||
QString overrideStartScript;
|
||||
bool useServerStartScript;
|
||||
QString serverStartScript;
|
||||
Id profileId;
|
||||
QString debugInfoLocation;
|
||||
};
|
||||
|
||||
@@ -746,7 +745,6 @@ StartRemoteParameters::StartRemoteParameters() :
|
||||
bool StartRemoteParameters::equals(const StartRemoteParameters &rhs) const
|
||||
{
|
||||
return localExecutable == rhs.localExecutable
|
||||
&& remoteArchitecture == rhs.remoteArchitecture
|
||||
&& overrideStartScript == rhs.overrideStartScript
|
||||
&& useServerStartScript == rhs.useServerStartScript
|
||||
&& serverStartScript == rhs.serverStartScript
|
||||
@@ -763,7 +761,6 @@ QString StartRemoteParameters::displayName() const
|
||||
void StartRemoteParameters::toSettings(QSettings *settings) const
|
||||
{
|
||||
settings->setValue(_("LastLocalExecutable"), localExecutable);
|
||||
settings->setValue(_("LastRemoteArchitecture"), remoteArchitecture);
|
||||
settings->setValue(_("LastServerStartScript"), serverStartScript);
|
||||
settings->setValue(_("LastUseServerStartScript"), useServerStartScript);
|
||||
settings->setValue(_("LastRemoteStartScript"), overrideStartScript);
|
||||
@@ -780,7 +777,6 @@ void StartRemoteParameters::fromSettings(const QSettings *settings)
|
||||
} else {
|
||||
profileId = Id(profileIdString);
|
||||
}
|
||||
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
|
||||
serverStartScript = settings->value(_("LastServerStartScript")).toString();
|
||||
useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool();
|
||||
overrideStartScript = settings->value(_("LastRemoteStartScript")).toString();
|
||||
@@ -793,7 +789,6 @@ class StartRemoteDialogPrivate
|
||||
public:
|
||||
ProfileChooser *profileChooser;
|
||||
PathChooser *executablePathChooser;
|
||||
QComboBox *architectureComboBox;
|
||||
PathChooser *debuginfoPathChooser;
|
||||
PathChooser *overrideStartScriptPathChooser;
|
||||
QCheckBox *useServerStartScriptCheckBox;
|
||||
@@ -816,9 +811,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
|
||||
d->executablePathChooser->setExpectedKind(PathChooser::File);
|
||||
d->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
|
||||
|
||||
d->architectureComboBox = new QComboBox(this);
|
||||
d->architectureComboBox->setEditable(true);
|
||||
|
||||
d->debuginfoPathChooser = new PathChooser(this);
|
||||
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("Local &executable:"), d->executablePathChooser);
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
formLayout->addRow(tr("&Architecture:"), d->architectureComboBox);
|
||||
formLayout->addRow(tr("Location of debugging &information:"), d->debuginfoPathChooser);
|
||||
formLayout->addRow(tr("Override host GDB s&tart script:"), d->overrideStartScriptPathChooser);
|
||||
formLayout->addRow(d->serverStartScriptLabel, d->useServerStartScriptCheckBox);
|
||||
@@ -890,19 +881,11 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
|
||||
const QString arrayName = useScript ?
|
||||
_("StartRemoteScript") : _("StartRemote");
|
||||
|
||||
QStringList arches;
|
||||
arches << _("i386:x86-64:intel") << _("i386") << _("arm");
|
||||
|
||||
QList<StartRemoteParameters> history =
|
||||
readParameterHistory<StartRemoteParameters>(settings, settingsGroup, arrayName);
|
||||
QTC_ASSERT(!history.isEmpty(), return false);
|
||||
|
||||
foreach (const StartRemoteParameters &h, history)
|
||||
if (!arches.contains(h.remoteArchitecture))
|
||||
arches.prepend(h.remoteArchitecture);
|
||||
|
||||
StartRemoteDialog dialog(parent, useScript);
|
||||
dialog.setRemoteArchitectures(arches);
|
||||
dialog.setHistory(history);
|
||||
dialog.setParameters(history.back());
|
||||
if (dialog.exec() != QDialog::Accepted)
|
||||
@@ -917,7 +900,6 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
|
||||
}
|
||||
|
||||
fillParameters(sp, dialog.profileId());
|
||||
sp->remoteArchitecture = newParameters.remoteArchitecture;
|
||||
sp->executable = newParameters.localExecutable;
|
||||
sp->displayName = tr("Remote: \"%1\"").arg(sp->remoteChannel);
|
||||
sp->overrideStartScript = newParameters.overrideStartScript;
|
||||
@@ -931,7 +913,6 @@ StartRemoteParameters StartRemoteDialog::parameters() const
|
||||
{
|
||||
StartRemoteParameters result;
|
||||
result.localExecutable = d->executablePathChooser->path();
|
||||
result.remoteArchitecture = d->architectureComboBox->currentText();
|
||||
result.overrideStartScript = d->overrideStartScriptPathChooser->path();
|
||||
result.useServerStartScript = d->useServerStartScriptCheckBox->isChecked();
|
||||
result.serverStartScript = d->serverStartScriptPathChooser->path();
|
||||
@@ -943,9 +924,6 @@ StartRemoteParameters StartRemoteDialog::parameters() const
|
||||
void StartRemoteDialog::setParameters(const StartRemoteParameters &p)
|
||||
{
|
||||
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->useServerStartScriptCheckBox->setChecked(p.useServerStartScript);
|
||||
d->serverStartScriptPathChooser->setPath(p.serverStartScript);
|
||||
@@ -974,15 +952,6 @@ Id StartRemoteDialog::profileId() const
|
||||
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()
|
||||
{
|
||||
bool enabled = d->useServerStartScriptCheckBox->isChecked();
|
||||
|
@@ -140,8 +140,6 @@ private:
|
||||
void setParameters(const StartRemoteParameters &);
|
||||
void setHistory(const QList<StartRemoteParameters> &);
|
||||
|
||||
void setRemoteArchitectures(const QStringList &list);
|
||||
|
||||
Core::Id profileId() const;
|
||||
|
||||
StartRemoteDialogPrivate *d;
|
||||
|
@@ -126,7 +126,6 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &sp)
|
||||
<< " attachPID=" << sp.attachPID
|
||||
<< " useTerminal=" << sp.useTerminal
|
||||
<< " remoteChannel=" << sp.remoteChannel
|
||||
<< " remoteArchitecture=" << sp.remoteArchitecture
|
||||
<< " symbolFileName=" << sp.symbolFileName
|
||||
<< " useServerStartScript=" << sp.useServerStartScript
|
||||
<< " serverStartScript=" << sp.serverStartScript
|
||||
|
@@ -784,7 +784,6 @@ public slots:
|
||||
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc);
|
||||
void runScheduled();
|
||||
void attachCore();
|
||||
void attachToRemoteServer(const QString &spec);
|
||||
|
||||
void enableReverseDebuggingTriggered(const QVariant &value);
|
||||
void languagesChanged();
|
||||
@@ -1315,7 +1314,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
|
||||
{
|
||||
const QString &option = *it;
|
||||
// '-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")) {
|
||||
++it;
|
||||
if (it == cend) {
|
||||
@@ -1353,8 +1352,6 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
|
||||
sp.displayName = tr("Remote: \"%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")) {
|
||||
sp.startMode = AttachCore;
|
||||
sp.closeMode = DetachAtClose;
|
||||
@@ -1598,22 +1595,6 @@ void DebuggerPluginPrivate::attachCore()
|
||||
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
|
||||
{
|
||||
RemoteCdbMatcher() : m_hostAbi(Abi::hostAbi()) {}
|
||||
@@ -2734,8 +2715,7 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
|
||||
str << "QML server: " << sp.qmlServerAddress << ':'
|
||||
<< sp.qmlServerPort << '\n';
|
||||
if (!sp.remoteChannel.isEmpty()) {
|
||||
str << "Remote: " << sp.remoteChannel << ", "
|
||||
<< sp.remoteArchitecture << '\n';
|
||||
str << "Remote: " << sp.remoteChannel << '\n';
|
||||
if (!sp.remoteDumperLib.isEmpty())
|
||||
str << "Remote dumpers: " << sp.remoteDumperLib << '\n';
|
||||
if (!sp.remoteSourcesDir.isEmpty())
|
||||
|
@@ -111,7 +111,6 @@ public:
|
||||
QString qtInstallPath;
|
||||
// Used by remote debugging.
|
||||
QString remoteChannel;
|
||||
QString remoteArchitecture;
|
||||
QString gnuTarget;
|
||||
QString symbolFileName;
|
||||
bool useServerStartScript;
|
||||
|
@@ -134,10 +134,8 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
|
||||
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(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.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
|
||||
}
|
||||
|
||||
params.executable = runConfig->localExecutableFilePath();
|
||||
params.remoteChannel = runConfig->deployConfiguration()->deviceHost() + QLatin1String(":8000");
|
||||
|
@@ -132,10 +132,8 @@ Debugger::DebuggerStartParameters QnxRunControlFactory::startParameters(
|
||||
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(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.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
|
||||
}
|
||||
|
||||
params.symbolFileName = runConfig->localExecutableFilePath();
|
||||
params.remoteExecutable = runConfig->remoteExecutableFilePath();
|
||||
|
@@ -122,7 +122,6 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
|
||||
ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
|
||||
if (tc) {
|
||||
const Abi &abi = tc->targetAbi();
|
||||
params.remoteArchitecture = abi.toString();
|
||||
params.gnuTarget = QLatin1String(abi.architecture() == Abi::ArmArchitecture
|
||||
? "arm-none-linux-gnueabi": "i386-unknown-linux-gnu");
|
||||
}
|
||||
|
Reference in New Issue
Block a user