Debugger: Fix use of external debug info for installer-based Qt

On macOS. This amends ada0e43c93. Fixes the default build directory
on macOS as this is different compared to Linux.
Beside this the patch passes the configured mappings of build dir and
source locations to the lldb.

Task-number: QTCREATORBUG-20693
Change-Id: I4258c09ec96fbdc1a713ae82df6bcab04129570c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-09-25 15:16:46 +02:00
parent 3f4438e2eb
commit 7de461e40b
2 changed files with 12 additions and 0 deletions

View File

@@ -61,6 +61,8 @@ QStringList qtBuildPaths()
"C:/work/build/qt5_workdir/w/s",
"c:/users/qt/work/qt",
"c:/Users/qt/work/install"};
} else if (HostOsInfo::isMacHost()) {
return { "/Users/qt/work/qt" };
} else {
return { "/home/qt/work/qt" };
}

View File

@@ -35,6 +35,7 @@
#include <debugger/terminal.h>
#include <debugger/breakhandler.h>
#include <debugger/debuggersourcepathmappingwidget.h>
#include <debugger/disassemblerlines.h>
#include <debugger/moduleshandler.h>
#include <debugger/registerhandler.h>
@@ -318,6 +319,15 @@ void LldbEngine::runEngine()
if (rp.startMode == AttachCore)
cmd.arg("coreFile", rp.coreFile);
runCommand(cmd);
const SourcePathMap sourcePathMap =
DebuggerSourcePathMappingWidget::mergePlatformQtPath(rp,
Internal::globalDebuggerOptions()->sourcePathMap);
for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd();
it != cend;
++it) {
executeDebuggerCommand("settings append target.source-map " + it.key() + ' ' + it.value());
}
}
void LldbEngine::interruptInferior()