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 <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-01-21 13:53:58 +01:00
parent def5248db2
commit e9ba3e1b7c

View File

@@ -257,6 +257,15 @@ void LldbEngine::setupEngine()
const DebuggerRunParameters &rp = runParameters(); 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"); DebuggerCommand cmd2("setupInferior");
cmd2.arg("executable", rp.inferior.executable); cmd2.arg("executable", rp.inferior.executable);
cmd2.arg("breakonmain", rp.breakOnMain); cmd2.arg("breakonmain", rp.breakOnMain);
@@ -318,15 +327,6 @@ void LldbEngine::runEngine()
if (rp.startMode == AttachCore) if (rp.startMode == AttachCore)
cmd.arg("coreFile", rp.coreFile); cmd.arg("coreFile", rp.coreFile);
runCommand(cmd); 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() void LldbEngine::interruptInferior()