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