diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 9ace1b0fa48..0dee8826a7f 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -257,6 +257,15 @@ void LldbEngine::setupEngine() const DebuggerRunParameters &rp = runParameters(); + 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()); + } + DebuggerCommand cmd2("setupInferior"); cmd2.arg("executable", rp.inferior.executable); cmd2.arg("breakonmain", rp.breakOnMain); @@ -318,15 +327,6 @@ 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()