Description
Previous ID | SR-12933 |
Radar | rdar://problem/63760482 |
Original Reporter | steipete (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Environment
Version 11.5 (11E608c)
macOS 10.15.5 (19F96)
Swift trunk toolchain May 26, 2020
Additional Detail from JIRA
Votes | 4 |
Component/s | LLDB for Swift |
Labels | Bug |
Assignee | @adrian-prantl |
Priority | Medium |
md5: f093e1b28bc880b1bc4508f349570aa1
Issue Description:
We get Couldn't IRGen expression, no additional error despite setting -no-serialize-debugging-options via SR-12783.
This happens when we provide a binary SDK with dSYM files.
It seems that the header import paths are stored in the dSYM.
The folders are mentioned in the lldb log. If the dSYM files are deleted, then debugging works (and our build folder is not listed in the logs)
PSPDFKit 9.4pre, no-serialize, dSYMs available, master toolchain (May 26):
https://gist.github.com/steipete/515646a9840c91a61b73d1ab9f255bb3
Full debugging flow:
https://steipete.com/posts/couldnt-irgen-expression/
Example to reproduce:
https://www.dropbox.com/s/pofzs6ly5syd86t/PSPDFKit-9.4pre-no-serialize.dmg?dl=1 (large file, can't upload here)
-
Open PSPDFKit 9.4.0-dev for iOS/Examples/SwiftExample.xcodeproj
-
Set breakpoint to AppDelegate.swift, window.makeKeyAndVisible()
-
Run. Observe IRGen error
-
Delete PSPDFKit-dSYMs and PSPDFKitUI-dSYMs
-
Delete derived data
-
Run. Observe <UIWindow... is printed
Note: It DOES WORK if you unpack in \tmp - seems like lldb can't find the dSYMs then? (Always delete derived data when moving)
it seems that this is fixed in master trunk:
-
Restore. (delete derived data, restore dSYM)
-
Install Swift Master Trunk and enable
-
Set iOS Deployment Target to 13 (SR-12932)
-
Run. Observe <UIWindow... is printed
Questions:
-
Should it work like that? Is the dSYM bound to the machine it was built?
-
I cannot find any binary size differences with -no-serialize-debugging-options; what does this change?
-
How does lldb find dSYM files? Same name+folder as the framework? Why does this fail in /tmp?
I reported thus bug as FB7718242 on Feedback Assistant as well, but with much less understanding what's going on.