diff options
author | hjk <qtc-committer@nokia.com> | 2011-09-29 18:53:16 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-09-29 19:11:32 +0200 |
commit | 8482269186ba743ad85e100bea64871519731519 (patch) | |
tree | 9fe47354477807350e8aca5096b27fb6c73de7a7 /src/plugins | |
parent | 950cbe85977c1a432f62baee6eb28d874bea6389 (diff) | |
download | qt-creator-8482269186ba743ad85e100bea64871519731519.tar.gz |
debugger: work on locating debuginfo
Change-Id: I49b9375af757117d46ba68301b3f5b241b2f1766
Reviewed-on: http://codereview.qt-project.org/5815
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 7 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerstartparameters.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 23 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/remotegdbserveradapter.cpp | 4 |
4 files changed, 9 insertions, 26 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 2eee04487a..d810ee3104 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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) diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index 3d8b694e7a..33357726d6 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -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; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 86ba28d653..1bbf7eb1a8 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -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(); } diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp index 10a66aba2a..7ca1128508 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp @@ -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); |