forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user