Skip to content

Commit f68c4c4

Browse files
committed
[lldb/Process] Silence toolchain mismatch warnings for Scripted Processes (NFC)
When using Scripted Processes, it's very likely that lldb's version might not align with the swift compiler that built the target. Thus, this will cause the toolchain mismatch warnings to be shown to the user every time they "stop" in a Swift frame. Since we shouldn't need Swift's AST to symbolicate the stopped stackframe, we can safely silence these warnings for Scripted Processes. Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent b843658 commit f68c4c4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lldb/source/Target/Process.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5912,6 +5912,14 @@ void Process::PrintWarningCantLoadSwiftModule(const Module &module,
59125912
}
59135913

59145914
void Process::PrintWarningToolchainMismatch(const SymbolContext &sc) {
5915+
if (GetTarget().GetProcessLaunchInfo().IsScriptedProcess())
5916+
// It's very likely that the debugger used to launch the ScriptedProcess
5917+
// will not match the compiler version used to build the target, and we
5918+
// shouldn't need Swift's serialized AST to symbolicate the frame where we
5919+
// stopped. However, because this is called from a generic place
5920+
// (Thread::FrameSelectedCallback), it's safe to silence the warning for
5921+
// Scripted Processes.
5922+
return;
59155923
if (!GetWarningsToolchainMismatch())
59165924
return;
59175925
if (!sc.module_sp || !sc.comp_unit)

0 commit comments

Comments
 (0)