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

Improve lldb warning about invalid ASTs

    XMLWordPrintable

    Details

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

      Description

      We recently hit an error where we passed an invalid module to -add_ast_path, this was completely our fault but it was a bit harder to debug because of the generic messages from LLDB. In the console once we stopped at a breakpoint you see:

      path/to/binary: Cannot load Swift type information; AST validation error: The serialized module is corrupted.AST validation error: The serialized module is corrupted.
      

      With the lldb types log we see this log https://github.com/apple/llvm-project/blob/227d49668a6f2f00e288458dd6dc7785d75f3cb0/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp#L4059

      It would be great if the path to the invalid module was produced in one or both of these logs so that it would be some extra info to help debug. I was able to correlate the ordering of the logs from the types log with the output of `dsymutil -s binary | grep AST` to find the invalid module.

        Attachments

          Activity

            People

            Assignee:
            kastiglione Dave Lee
            Reporter:
            keith Keith Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: