debugger: hack to specify sysroot in generic remote linux

Change-Id: I9657f71246df4742329a0b4f27bf08f146e9632a
Reviewed-on: http://codereview.qt-project.org/5534
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-09-26 12:38:17 +02:00
committed by hjk
parent 9cc4751857
commit 84a535bae7
4 changed files with 58 additions and 47 deletions

View File

@@ -4763,8 +4763,11 @@ void GdbEngine::setupInferior()
const QByteArray debugInfoLocation = sp.debugInfoLocation.toLocal8Bit();
if (!debugInfoLocation.isEmpty())
postCommand("set debug-file-directory " + debugInfoLocation);
// Spaces just will not work.
foreach (const QString &src, sp.debugSourceLocation)
postCommand("directory " + src.toLocal8Bit());
postCommand("directory " + src.toLocal8Bit());
if (!sp.solibSearchPath.isEmpty())
postCommand("set solib-search-path " + sp.solibSearchPath.toLocal8Bit());
m_gdbAdapter->setupInferior();
}

View File

@@ -169,10 +169,8 @@ void RemoteGdbServerAdapter::setupInferior()
fileName = fi.absoluteFilePath();
}
const QByteArray sysroot = sp.sysroot.toLocal8Bit();
const QByteArray debugInfoLocation = sp.debugInfoLocation.toLocal8Bit();
const QByteArray remoteArch = sp.remoteArchitecture.toLatin1();
const QByteArray gnuTarget = sp.gnuTarget.toLatin1();
const QByteArray solibPath = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
const QString args = sp.processArgs;
if (!remoteArch.isEmpty())
@@ -181,12 +179,6 @@ void RemoteGdbServerAdapter::setupInferior()
m_engine->postCommand("set gnutarget " + gnuTarget);
if (!sysroot.isEmpty())
m_engine->postCommand("set sysroot " + sysroot);
if (!debugInfoLocation.isEmpty())
m_engine->postCommand("set debug-file-directory " + debugInfoLocation);
foreach (const QString &src, sp.debugSourceLocation)
m_engine->postCommand("directory " + src.toLocal8Bit());
if (!solibPath.isEmpty())
m_engine->postCommand("set solib-search-path " + solibPath);
if (!args.isEmpty())
m_engine->postCommand("-exec-arguments " + args.toLocal8Bit());