Commit 84822691 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: work on locating debuginfo

Change-Id: I49b9375af757117d46ba68301b3f5b241b2f1766
Reviewed-on: http://codereview.qt-project.org/5815

Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 950cbe85
......@@ -1205,7 +1205,7 @@ void DebuggerPluginPrivate::maybeEnrichParameters(DebuggerStartParameters *sp)
}
if (sp->debugInfoLocation.isEmpty())
sp->debugInfoLocation = sp->sysroot + "/usr/lib/debug";
if (false && sp->debugSourceLocation.isEmpty()) {
if (sp->debugSourceLocation.isEmpty()) {
QString base = sp->sysroot + "/usr/src/debug/";
sp->debugSourceLocation.append(base + "qt5base/src/corelib");
sp->debugSourceLocation.append(base + "qt5base/src/gui");
......@@ -1213,10 +1213,6 @@ void DebuggerPluginPrivate::maybeEnrichParameters(DebuggerStartParameters *sp)
sp->debugSourceLocation.append(base + "qt5base/src/v8");
sp->debugSourceLocation.append(base + "qtdeclarative/src/declarative/qml");
}
//if (sp->solibSearchPath.isEmpty()) {
// sp->solibSearchPath = sp->sysroot + "/usr/lib/debug";
// // was: QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
//}
}
bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
......@@ -2581,7 +2577,6 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
if (!sp.gnuTarget.isEmpty())
str << "Gnu target: " << sp.gnuTarget << '\n';
str << "Sysroot: " << sp.sysroot << '\n';
str << "Solib Search Path: " << sp.solibSearchPath << '\n';
str << "Debug Source Loaction: " << sp.debugSourceLocation.join(":") << '\n';
str << "Symbol file: " << sp.symbolFileName << '\n';
if (sp.useServerStartScript)
......
......@@ -109,7 +109,6 @@ public:
QString serverStartScript;
QString sysroot;
QString debugInfoLocation; // Gdb "set-debug-file-directory".
QString solibSearchPath; // Gdb "set solib-search-path".
QStringList debugSourceLocation; // Gdb "directory"
QByteArray remoteDumperLib;
QByteArray remoteSourcesDir;
......
......@@ -4770,16 +4770,9 @@ void GdbEngine::setupInferior()
debuggerCore()->globalDebuggerOptions()->sourcePathMap);
const SourcePathMapIterator cend = sourcePathMap.constEnd();
SourcePathMapIterator it = sourcePathMap.constBegin();
for ( ; it != cend; ++it) {
QByteArray command = "set substitute-path ";
command += it.key().toLocal8Bit();
command += ' ';
command += it.value().toLocal8Bit();
postCommand(command);
}
if (!sp.sysroot.isEmpty())
postCommand("set substitute-path / " + sp.sysroot.toLocal8Bit());
for ( ; it != cend; ++it)
postCommand("set substitute-path " + it.key().toLocal8Bit()
+ " " + it.value().toLocal8Bit());
const QByteArray debugInfoLocation = sp.debugInfoLocation.toLocal8Bit();
if (!debugInfoLocation.isEmpty())
......@@ -4788,14 +4781,10 @@ void GdbEngine::setupInferior()
// Spaces just will not work.
foreach (const QString &src, sp.debugSourceLocation)
postCommand("directory " + src.toLocal8Bit());
if (!sp.solibSearchPath.isEmpty())
postCommand("set solib-search-path " + sp.solibSearchPath.toLocal8Bit());
// Take locations of actual breakpoints into account.
if (debuggerCore()->boolSetting(AutoEnrichParameters)) {
foreach (const QString &src, breakHandler()->engineBreakpointPaths(this))
postCommand("directory " + src.toLocal8Bit());
}
//QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
//if (!ba.isEmpty())
// postCommand("set solib-search-path " + ba);
m_gdbAdapter->setupInferior();
}
......
......@@ -198,10 +198,10 @@ void RemoteGdbServerAdapter::setupInferior()
// "run"/"attach", I think..
// ~"/build/buildd/gdb-7.2/gdb/mi/mi-main.c:1958: internal-error:
// gdb/mi/mi-main.c:1958: internal-error:
// mi_execute_async_cli_command: Assertion `is_running (inferior_ptid)'
// failed.\nA problem internal to GDB has been detected,[...]
//m_engine->postCommand("set target-async on", CB(handleSetTargetAsync));
m_engine->postCommand("set target-async on", CB(handleSetTargetAsync));
if (fileName.isEmpty()) {
showMessage(tr("No symbol file given."), StatusBar);
......
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