-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-11485] Disabling -serialize-debugging-options breaks lldb Swift type loading #4481
Comments
This doesn't seem to reproduce anymore with Xcode 11.5 and 12 beta. Is it fixed now? |
It is true that in Xcode 12, LLDB no longer reads the SDK out of the binary Swift modules, so if removing the paths from the Swift modules is what caused LLDB to no longer find the SDK, then that could be considered fixed. |
@thii thanks for the comment! In my testing with our project, we no longer need the work around for Xcode 11.5. |
I filed FB8943879 which I believe is this same issue but we only hit it when debugging XCTest bundles, not apps |
So at this point in test bundles I actually get:
when trying to `po self` when stopped in a XCTestCase. vo results in:
|
So I figured out the issue in the XCTestCase reproduction case, really the issue was just a case of confusing errors, the error I posted above and the types log didn't really have any useful info, but in Swift 5.7 with
Which immediately made me realize we were missing including the XCTest.framework path in the lldbinit. We're now setting:
Which appears to cover both unit tests and UI tests. Related bazelbuild/rules_swift#841 FB10167931 I think this can be closed unless we find more repro cases in the future. |
Attachment: Download
Additional Detail from JIRA
md5: 66acdb4bc404bab42d7edf30fe14da67
Issue Description:
In order to use a build cache, we need to disable
-serialize-debugging-options
. Doing this prevents host specific paths from being embedded in.swiftmodule
files.However, disabling this breaks lldb's Swift AST resolution logic (I think). Specifically, Swift types, for example
String
, andDictionary
, are not resolved. This breaks expression evaluation and also printing values viaframe variable
.Attached is a sample Xcode project. It has an
xcconfig
that sets two build settings:The first one tells Xcode to not add
-Xfrontend -serialize-debugging-options
.The second one tells
swiftc
to always disable serialized debugging options. Without this flag, any module with amain
entry point will automatically contain serialized debugging options.The Xcode project has a breakpoint in the app delegate, that prints the
launchOptions
argument. The output is:The text was updated successfully, but these errors were encountered: