From e9ba3e1b7cd35dbbb483ce7a1527857165436b26 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 21 Jan 2019 13:53:58 +0100 Subject: [PATCH] Debugger: Execute LLDB path substitution at similar times as GDB There have been some event sequencing changes between LLDB 6.x and 7.x, leading to QTCREATORBUG-21615. This change here is moving to a similar sequencing on the Creator side as a first step. Change-Id: I13a0901f96ae523b57ad03d8d251890f9c71d46c Task-number: QTCREATORBUG-21615 Task-number: QTCREATORBUG-17468 Reviewed-by: Christian Stenger --- src/plugins/debugger/lldb/lldbengine.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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()