debugger: Added Sysroot chooser for Attach to Core

Merge-request: 339
Reviewed-by: hjk <qtc-committer@nokia.com>

Change-Id: Iad451a0ad124c2eb992433fb0db95b962a551d6b
Reviewed-on: http://codereview.qt.nokia.com/211
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Orgad Shaneh
2011-05-30 12:32:58 +02:00
committed by hjk
parent 66dd03cccc
commit ef19691309
5 changed files with 41 additions and 5 deletions

View File

@@ -164,7 +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();
QByteArray path = fi.absoluteFilePath().toLocal8Bit();
if (!sysRoot.isEmpty())
m_engine->postCommand("set sysroot " + sysRoot);
m_engine->postCommand("-file-exec-and-symbols \"" + path + '"',
CB(handleFileExecAndSymbols));
}