Commit 84a535ba authored by hjk's avatar hjk Committed by hjk

debugger: hack to specify sysroot in generic remote linux

Change-Id: I9657f71246df4742329a0b4f27bf08f146e9632a
Reviewed-on: http://codereview.qt-project.org/5534Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 9cc47518
This diff is collapsed.
......@@ -108,8 +108,9 @@ public:
bool useServerStartScript;
QString serverStartScript;
QString sysroot;
QString debugInfoLocation;
QStringList debugSourceLocation;
QString debugInfoLocation; // Gdb "set-debug-file-directory".
QString solibSearchPath; // Gdb "set solib-search-path".
QStringList debugSourceLocation; // Gdb "directory"
QByteArray remoteDumperLib;
QByteArray remoteSourcesDir;
QString remoteMountPoint;
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment