Skip to content

[SR-12933] lldb: Couldn't IRGen expression; with -no-serialize-debugging-options  #4464

Closed
@swift-ci

Description

@swift-ci
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)

  1. Open PSPDFKit 9.4.0-dev for iOS/Examples/SwiftExample.xcodeproj

  2. Set breakpoint to AppDelegate.swift, window.makeKeyAndVisible()

  3. Run. Observe IRGen error

  4. Delete PSPDFKit-dSYMs and PSPDFKitUI-dSYMs

  5. Delete derived data

  6. 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:

  1. Restore. (delete derived data, restore dSYM)

  2. Install Swift Master Trunk and enable

  3. Set iOS Deployment Target to 13 (SR-12932)

  4. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions