forked from qt-creator/qt-creator
debugger: unify naming of sysroot related variables and function
Change-Id: I77dd74ba7260622d9fec6cfca4a06d0f817495d8 Reviewed-on: http://codereview.qt.nokia.com/212 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -251,13 +251,12 @@ QString AttachCoreDialog::debuggerCommand()
|
||||
return m_ui->toolchainComboBox->debuggerCommand();
|
||||
}
|
||||
|
||||
QString AttachCoreDialog::sysRoot() const
|
||||
|
||||
QString AttachCoreDialog::sysroot() const
|
||||
{
|
||||
return m_ui->sysrootPathChooser->path();
|
||||
}
|
||||
|
||||
void AttachCoreDialog::setSysRoot(const QString &sysroot)
|
||||
void AttachCoreDialog::setSysroot(const QString &sysroot)
|
||||
{
|
||||
m_ui->sysrootPathChooser->setPath(sysroot);
|
||||
}
|
||||
@@ -789,12 +788,12 @@ bool StartRemoteDialog::useServerStartScript() const
|
||||
return m_ui->useServerStartScriptCheckBox->isChecked();
|
||||
}
|
||||
|
||||
void StartRemoteDialog::setSysRoot(const QString &sysroot)
|
||||
void StartRemoteDialog::setSysroot(const QString &sysroot)
|
||||
{
|
||||
m_ui->sysrootPathChooser->setPath(sysroot);
|
||||
}
|
||||
|
||||
QString StartRemoteDialog::sysRoot() const
|
||||
QString StartRemoteDialog::sysroot() const
|
||||
{
|
||||
return m_ui->sysrootPathChooser->path();
|
||||
}
|
||||
|
@@ -88,8 +88,8 @@ public:
|
||||
ProjectExplorer::Abi abi() const;
|
||||
QString debuggerCommand();
|
||||
|
||||
QString sysRoot() const;
|
||||
void setSysRoot(const QString &sysRoot);
|
||||
QString sysroot() const;
|
||||
void setSysroot(const QString &sysroot);
|
||||
|
||||
QString overrideStartScript() const;
|
||||
void setOverrideStartScript(const QString &scriptName);
|
||||
@@ -203,8 +203,8 @@ public:
|
||||
QString serverStartScript() const;
|
||||
void setServerStartScript(const QString &scriptName);
|
||||
|
||||
QString sysRoot() const;
|
||||
void setSysRoot(const QString &sysRoot);
|
||||
QString sysroot() const;
|
||||
void setSysroot(const QString &sysroot);
|
||||
|
||||
QString debugger() const;
|
||||
void setDebugger(const QString &debugger);
|
||||
@@ -237,7 +237,8 @@ private:
|
||||
QLineEdit *m_lineEdit;
|
||||
};
|
||||
|
||||
class AddressDialog : public QDialog {
|
||||
class AddressDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AddressDialog(QWidget *parent = 0);
|
||||
|
@@ -695,7 +695,7 @@ public slots:
|
||||
void attachCore();
|
||||
void attachCore(const QString &core, const QString &exeFileName,
|
||||
const ProjectExplorer::Abi &abi = ProjectExplorer::Abi(),
|
||||
const QString &sysRoot = QString(),
|
||||
const QString &sysroot = QString(),
|
||||
const QString &overrideStartScript = QString(),
|
||||
const QString &debuggerCommand = QString());
|
||||
void attachRemote(const QString &spec);
|
||||
@@ -1440,7 +1440,7 @@ void DebuggerPluginPrivate::attachCore()
|
||||
dlg.setExecutableFile(configValue(_("LastExternalExecutableFile")).toString());
|
||||
dlg.setCoreFile(configValue(_("LastExternalCoreFile")).toString());
|
||||
dlg.setAbiIndex(configValue(_("LastExternalCoreAbiIndex")).toInt());
|
||||
dlg.setSysRoot(configValue(_("LastSysroot")).toString());
|
||||
dlg.setSysroot(configValue(_("LastSysroot")).toString());
|
||||
dlg.setOverrideStartScript(configValue(_("LastExternalStartScript")).toString());
|
||||
|
||||
if (dlg.exec() != QDialog::Accepted)
|
||||
@@ -1449,16 +1449,16 @@ void DebuggerPluginPrivate::attachCore()
|
||||
setConfigValue(_("LastExternalExecutableFile"), dlg.executableFile());
|
||||
setConfigValue(_("LastExternalCoreFile"), dlg.coreFile());
|
||||
setConfigValue(_("LastExternalCoreAbiIndex"), QVariant(dlg.abiIndex()));
|
||||
setConfigValue(_("LastSysroot"), dlg.sysRoot());
|
||||
setConfigValue(_("LastSysroot"), dlg.sysroot());
|
||||
setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript());
|
||||
attachCore(dlg.coreFile(), dlg.executableFile(), dlg.abi(),
|
||||
dlg.sysRoot(), dlg.overrideStartScript());
|
||||
dlg.sysroot(), dlg.overrideStartScript());
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachCore(const QString &core,
|
||||
const QString &exe,
|
||||
const ProjectExplorer::Abi &abi,
|
||||
const QString &sysRoot,
|
||||
const QString &sysroot,
|
||||
const QString &overrideStartScript,
|
||||
const QString &debuggerCommand)
|
||||
{
|
||||
@@ -1469,7 +1469,7 @@ void DebuggerPluginPrivate::attachCore(const QString &core,
|
||||
sp.startMode = AttachCore;
|
||||
sp.debuggerCommand = debuggerCommand;
|
||||
sp.toolChainAbi = abi.isValid() ? abi : abiOfBinary(sp.coreFile);
|
||||
sp.sysRoot = sysRoot;
|
||||
sp.sysroot = sysroot;
|
||||
sp.overrideStartScript = overrideStartScript;
|
||||
if (DebuggerRunControl *rc = createDebugger(sp))
|
||||
startDebugger(rc);
|
||||
@@ -1547,7 +1547,7 @@ void DebuggerPluginPrivate::startRemoteApplication()
|
||||
configValue(_("LastServerStartScript")).toString());
|
||||
dlg.setUseServerStartScript(
|
||||
configValue(_("LastUseServerStartScript")).toBool());
|
||||
dlg.setSysRoot(configValue(_("LastSysroot")).toString());
|
||||
dlg.setSysroot(configValue(_("LastSysroot")).toString());
|
||||
if (dlg.exec() != QDialog::Accepted)
|
||||
return;
|
||||
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
|
||||
@@ -1558,7 +1558,7 @@ void DebuggerPluginPrivate::startRemoteApplication()
|
||||
setConfigValue(_("LastRemoteStartScript"), dlg.overrideStartScript());
|
||||
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
|
||||
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
|
||||
setConfigValue(_("LastSysroot"), dlg.sysRoot());
|
||||
setConfigValue(_("LastSysroot"), dlg.sysroot());
|
||||
sp.remoteChannel = dlg.remoteChannel();
|
||||
sp.remoteArchitecture = dlg.remoteArchitecture();
|
||||
sp.gnuTarget = dlg.gnuTarget();
|
||||
@@ -1571,7 +1571,7 @@ void DebuggerPluginPrivate::startRemoteApplication()
|
||||
sp.overrideStartScript = dlg.overrideStartScript();
|
||||
sp.useServerStartScript = dlg.useServerStartScript();
|
||||
sp.serverStartScript = dlg.serverStartScript();
|
||||
sp.sysRoot = dlg.sysRoot();
|
||||
sp.sysroot = dlg.sysroot();
|
||||
if (RunControl *rc = createDebugger(sp))
|
||||
startDebugger(rc);
|
||||
}
|
||||
@@ -2399,8 +2399,8 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
|
||||
}
|
||||
if (!sp.gnuTarget.isEmpty())
|
||||
str << "Gnu target: " << sp.gnuTarget << '\n';
|
||||
if (!sp.sysRoot.isEmpty())
|
||||
str << "Sysroot: " << sp.sysRoot << '\n';
|
||||
if (!sp.sysroot.isEmpty())
|
||||
str << "Sysroot: " << sp.sysroot << '\n';
|
||||
if (!sp.symbolFileName.isEmpty())
|
||||
str << "Symbol file: " << sp.symbolFileName << '\n';
|
||||
if (sp.useServerStartScript)
|
||||
|
@@ -107,7 +107,7 @@ public:
|
||||
QString symbolFileName;
|
||||
bool useServerStartScript;
|
||||
QString serverStartScript;
|
||||
QString sysRoot;
|
||||
QString sysroot;
|
||||
QByteArray remoteDumperLib;
|
||||
QByteArray remoteSourcesDir;
|
||||
QString remoteMountPoint;
|
||||
|
@@ -164,10 +164,10 @@ void CoreGdbAdapter::setupInferior()
|
||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
|
||||
// Do that first, otherwise no symbols are loaded.
|
||||
QFileInfo fi(m_executable);
|
||||
const QByteArray sysRoot = startParameters().sysRoot.toLocal8Bit();
|
||||
const QByteArray sysroot = startParameters().sysroot.toLocal8Bit();
|
||||
QByteArray path = fi.absoluteFilePath().toLocal8Bit();
|
||||
if (!sysRoot.isEmpty())
|
||||
m_engine->postCommand("set sysroot " + sysRoot);
|
||||
if (!sysroot.isEmpty())
|
||||
m_engine->postCommand("set sysroot " + sysroot);
|
||||
m_engine->postCommand("-file-exec-and-symbols \"" + path + '"',
|
||||
CB(handleFileExecAndSymbols));
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ void RemoteGdbServerAdapter::setupInferior()
|
||||
QFileInfo fi(startParameters().executable);
|
||||
fileName = fi.absoluteFilePath();
|
||||
}
|
||||
const QByteArray sysRoot = startParameters().sysRoot.toLocal8Bit();
|
||||
const QByteArray sysroot = startParameters().sysroot.toLocal8Bit();
|
||||
const QByteArray remoteArch = startParameters().remoteArchitecture.toLatin1();
|
||||
const QByteArray gnuTarget = startParameters().gnuTarget.toLatin1();
|
||||
const QByteArray solibPath =
|
||||
@@ -178,8 +178,8 @@ void RemoteGdbServerAdapter::setupInferior()
|
||||
m_engine->postCommand("set architecture " + remoteArch);
|
||||
if (!gnuTarget.isEmpty())
|
||||
m_engine->postCommand("set gnutarget " + gnuTarget);
|
||||
if (!sysRoot.isEmpty())
|
||||
m_engine->postCommand("set sysroot " + sysRoot);
|
||||
if (!sysroot.isEmpty())
|
||||
m_engine->postCommand("set sysroot " + sysroot);
|
||||
if (!solibPath.isEmpty())
|
||||
m_engine->postCommand("set solib-search-path " + solibPath);
|
||||
if (!args.isEmpty())
|
||||
|
@@ -70,7 +70,7 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC
|
||||
if (debuggingType != MaemoRunConfiguration::DebugQmlOnly) {
|
||||
params.processArgs = runConfig->arguments();
|
||||
if (runConfig->activeQt4BuildConfiguration()->qtVersion())
|
||||
params.sysRoot = runConfig->activeQt4BuildConfiguration()->qtVersion()->systemRoot();
|
||||
params.sysroot = runConfig->activeQt4BuildConfiguration()->qtVersion()->systemRoot();
|
||||
params.toolChainAbi = runConfig->abi();
|
||||
if (runConfig->useRemoteGdb()) {
|
||||
params.startMode = StartRemoteGdb;
|
||||
|
@@ -312,7 +312,7 @@ void MaemoCopyToSysrootStep::run(QFutureInterface<bool> &fi)
|
||||
}
|
||||
|
||||
emit addOutput(tr("Copying files to sysroot ..."), MessageOutput);
|
||||
QDir sysRootDir(tc->sysroot());
|
||||
QDir sysrootDir(tc->sysroot());
|
||||
const QSharedPointer<MaemoDeployables> deployables
|
||||
= qobject_cast<Qt4MaemoDeployConfiguration *>(deployConfiguration())->deployables();
|
||||
const QChar sep = QLatin1Char('/');
|
||||
@@ -321,7 +321,7 @@ void MaemoCopyToSysrootStep::run(QFutureInterface<bool> &fi)
|
||||
const QFileInfo localFileInfo(deployable.localFilePath);
|
||||
const QString targetFilePath = tc->sysroot() + sep
|
||||
+ deployable.remoteDir + sep + localFileInfo.fileName();
|
||||
sysRootDir.mkpath(deployable.remoteDir.mid(1));
|
||||
sysrootDir.mkpath(deployable.remoteDir.mid(1));
|
||||
QString errorMsg;
|
||||
MaemoGlobal::removeRecursively(targetFilePath, errorMsg);
|
||||
if (!MaemoGlobal::copyRecursively(deployable.localFilePath,
|
||||
|
Reference in New Issue
Block a user