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

simulator environment is missing from the triple for SwiftASTContextForExpressions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: LLDB for Swift
    • Labels:
      None

      Description

      While working to verify debugging of remotely built Swift libraries, Adrian Prantl read through some types logs from my project and noted that the "-simulator" suffix was missing from the triple used by the SwiftASTContextForExpressions. I have verified this is reproducible on the latest dev snapshot (from 12/18/19).

       

      From the LLDB types log, I can see that the SwiftASTContextForExpressions is using the wrong triple ("-simulator" is missing):

      SwiftASTContextForExpressions::LogConfiguration(SwiftASTContext*):
      Architecture : x86_64-apple-ios12.0.0

      From the same types log, other instances of SwiftASTContext are using the correct triple (contains "-simulator"):

      SwiftASTContext("AppShell")::LogConfiguration(SwiftASTContext*):
      Architecture : x86_64-apple-ios12.0-simulator

      Steps to repro

      1. Download and unzip the attached Xcode project "AppShell".
      2. Select the appropriate Swift toolchain in Xcode (I used dev snapshot from 12/18/19).
      3. Set a breakpoint anywhere in AppDelegate.
      4. Build and run the project.
      5. When the breakpoint is hit, exec po self in the LLDB console.
      6. Observe the LLDB types log.

      About the sample project

      This is an Xcode project that resembles the way an iOS app is created by Bazel. The only source code is contained in "AppLib", which is linked with the source-less target "AppShell". To closely simulate my build environment, I have also set the -no-serialize-debugging-options flag which may or may not be related.

        Attachments

          Activity

            People

            Assignee:
            aprantl Adrian Prantl
            Reporter:
            dylansturg Dylan Sturgeon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: