Skip to content

Commit 7432dcd

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 ff38851 commit 7432dcd

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
@@ -5930,6 +5930,14 @@ void Process::PrintWarningCantLoadSwiftModule(const Module &module,
59305930
}
59315931

59325932
void Process::PrintWarningToolchainMismatch(const SymbolContext &sc) {
5933+
if (GetTarget().GetProcessLaunchInfo().IsScriptedProcess())
5934+
// It's very likely that the debugger used to launch the ScriptedProcess
5935+
// will not match the compiler version used to build the target, and we
5936+
// shouldn't need Swift's serialized AST to symbolicate the frame where we
5937+
// stopped. However, because this is called from a generic place
5938+
// (Thread::FrameSelectedCallback), it's safe to silence the warning for
5939+
// Scripted Processes.
5940+
return;
59335941
if (!GetWarningsToolchainMismatch())
59345942
return;
59355943
if (!sc.module_sp || !sc.comp_unit)

0 commit comments

Comments
 (0)