We’re running into a performance issue with LLDB when hitting a breakpoint in a specific file. The function(in lldb-rpc-server sample) takes around ~10 seconds when a breakpoint is triggered
lldb_private::Module::IsSwiftCxxInteropEnabled()
To disable Swift C++ interop, we’ve set the following in our .lldbinit and also have "-cxx-interoperability-mode=off" in copts, but this doesn't seem to mitigate the above lag.
settings set target.experimental.swift-enable-cxx-interop false
Is there an alternative setting that explicitly disables Swift/C++ interop checks in lldb?
If not,are there known workarounds or optimizations to mitigate this performance hit?
Hi, what's lldb version are you running? I'm surprised to hear that setting the setting doesn't work, the code does check for the setting before looking for it in debug info.
Do you think this could be a regression in LLDB, a change in the relevant setting names, or something specific to our setup? Since this is all within a private implementation of lldb plugin which we don't have access to, any insight would be helpful in determining our next steps.
(lldb) settings show symbols.swift-enable-cxx-interop
symbols.swift-enable-cxx-interop (enum) = auto
When I set it to false, I notice that the instance creation checks for IsEmbeddedSwift instead and invites the same lag, as it checks into the dwarf info. I've included a sample in the above feedback. Is there a setting to disable the IsEmbeddedSwift check?
@chiragramani I have a patch to speed up the check for C++ here, I will also open one for embedded swift later after this one is merged. Thanks for the report!
Thank you so much, @augusto2112! Appreciate all your help
Is there a way to override the Xcode LLDB plugin's behavior locally following your changes so developers can benefit from them immediately, without having to wait for Xcode 16.3 or later releases?
If building our own toolchain is an option, what steps would you recommend to ensure Xcode properly detects and utilizes this custom LLDB toolchain? Any guidance on integration, or known issues to watch out for would be incredibly helpful as we plan our next steps.