summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-09-24 13:57:16 +0200
committerhjk <hjk@qt.io>2018-09-24 13:37:24 +0000
commitada0e43c93199dbf54add275c1320d33c7c2bc9a (patch)
tree0e1a7a8ff641288331e119e28d0fa3b6f8639a2d
parent1b751c2d47a19bf50d4c89a8b786a1b6362d5923 (diff)
downloadqt-creator-ada0e43c93199dbf54add275c1320d33c7c2bc9a.tar.gz
Debugger: Fix use of external debug info for installer-based Qt
On Linux. Required installs are the gcc-built Qt libraries themselves, the "Sources" and "Qt Debug Information Files" components. Fixes: QTCREATORBUG-20693 Change-Id: I920efd641ce3ee4583741ea1db0bea18031adc51 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--share/qtcreator/debugger/gdbbridge.py13
-rw-r--r--src/plugins/debugger/debuggersourcepathmappingwidget.cpp4
2 files changed, 15 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index 6c6e2a7468..5a65078471 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -994,8 +994,21 @@ class Dumper(DumperBase):
qtCoreMatch = re.match('.*/libQt5?Core[^/.]*\.so', name)
if qtCoreMatch is not None:
+ self.addDebugLibs(objfile)
self.handleQtCoreLoaded(objfile)
+ def addDebugLibs(self, objfile):
+ # The directory where separate debug symbols are searched for
+ # is "/usr/lib/debug".
+ try:
+ cooked = gdb.execute('show debug-file-directory', to_string=True)
+ clean = cooked.split('"')[1]
+ newdir = '/'.join(objfile.filename.split('/')[:-1])
+ gdb.execute('set debug-file-directory %s:%s' % (clean, newdir))
+ except:
+ pass
+
+
def handleQtCoreLoaded(self, objfile):
fd, tmppath = tempfile.mkstemp()
os.close(fd)
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
index 906610547c..6ed1196c96 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
@@ -62,7 +62,7 @@ QStringList qtBuildPaths()
"c:/users/qt/work/qt",
"c:/Users/qt/work/install"};
} else {
- return {};
+ return { "/home/qt/work/qt" };
}
}
@@ -450,7 +450,7 @@ DebuggerSourcePathMappingWidget::SourcePathMap
SourcePathMap rc = in;
for (const QString &buildPath : qtBuildPaths()) {
if (!rc.contains(buildPath)) // Do not overwrite user settings.
- rc.insert(buildPath, qtInstallPath);
+ rc.insert(buildPath, qtInstallPath + "/../Src");
}
return rc;
}