I found that adding OTHER_LDFLAGS=$(inherited) -Wl,-ld_classic to the build settings fixes errors with PCM files.
Additionally, I turned off the ENABLE_DEBUG_DYLIB option.
Also, I added the path for AST, as @artyom-stv-joom suggested. Now I can po self without errors. However, the first breakpoint still takes one or two minutes, so I cannot use these options as an effective solution because we cannot move to the old linker.
Post
Replies
Boosts
Views
Activity
Also lldb-rpc-server "eats" a lot of RAM - 8GB and more...
I also have a lot of logs like this when app becomes paused by lldb:
/Users/egormerkushev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/23S4HX6OW8E8S/MyModule-2XYB5G9W7D2Z.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
When I try print something I get it:
(lldb) po self
0x000000015d9de300
(lldb) po self.dismissGestureRecognizer
error: type for self cannot be reconstructed: type for typename "$s5MyModule31FullscreenContentViewControllerCD" was not found (cached)
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.
Our team found working solution:
Run in Terminal
nano ~/.lldbinit
Type and save:
settings set target.experimental.swift-enable-cxx-interop false
Restart lldb-rpc-server process
I think there is a bug in Xcode. Normally lldb can get symbols from binary with DWARF. dSYM is not required.
After spending several hours profiling lldb, I have identified the reason behind the high CPU usage and slow app launch and breakpoints. It turns out that a custom xcconfig file was disabling dSYM for the Debug build. However, once I restored the dSYM in the Derived Data Xcode, both lldb and our app started up quickly again.
Hello! We are currently working on a large project consisting of 3.97 million lines of code, with 1.3 million lines in Swift, 1.5 million lines in Objective-C, and several files in other languages. Our app's debug build size is over 700MB, while the main binary is 350MB. However, after updating to Xcode 15 (15.0.1, 15.1b1, 15.1b2), we have noticed a significant increase in build time, launch time, and debugger attaching time. It now takes approximately 1 minute from the installation completion to the app's start launching. Furthermore, the initial retrieval of variables on the first breakpoint also takes 1 minute or even longer.
Could you please advise us on how to resolve this problem? Thank you