Uploaded image for project: 'Swift'
  1. Swift
  2. SR-12933

lldb: Couldn't IRGen expression; with -no-serialize-debugging-options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: LLDB for Swift
    • Labels:
      None
    • Environment:

      Version 11.5 (11E608c)

      macOS 10.15.5 (19F96)

      Swift trunk toolchain May 26, 2020

      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.

        Attachments

          Activity

            People

            Assignee:
            aprantl Adrian Prantl
            Reporter:
            steipete Peter Steinberger
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated: