Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-2192] Swift's LLDB cannot import system modules and prevents debugging #4589

Closed
swift-ci opened this issue Jul 27, 2016 · 2 comments
Closed
Labels
bug Something isn't working Linux LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-2192
Radar None
Original Reporter bryanpkc (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

Swift version 3.0-dev
lldb-local-2016-07-20 (LLDB da120cf914, LLVM 8d0086ac3e, Clang 460d629e85)
Ubuntu 16.04 x86_64

Additional Detail from JIRA
Votes 12
Component/s LLDB for Swift
Labels Bug, Linux
Assignee None
Priority Medium

md5: 618c57260fe89aa7a5a6e9c831c74795

duplicates:

  • SR-3280 Package manager should link main swiftmodule in executables

relates to:

  • SR-3169 lldb stops working when C module includes a header outside of module's include/ dir

Issue Description:

I have a Swift program ("Bar") that uses a Swift module ("Foo") that in turn depends on a C library ("CFoo"). I use Swift Package Manager to build the Bar package (according to the official instructions), which works, and the Bar executable runs. But while using LLDB to debug Bar, I encountered the following errors (yes, LLDB is omitting a newline character at the end of the first line of the output):

(lldb) p someVar
warning: Swift error in module FooDebug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'Foo' from AST context:
error: missing required module 'CFoo'
@swift-ci
Copy link
Author

swift-ci commented Oct 3, 2016

Comment by Matthew Burke (JIRA)

I've encountered the same issue in the following environment:

swift -v: Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9
lldb -v: lldb-360.1.50
OS: El Capitan (10.11.6)

@swift-ci
Copy link
Author

Comment by Shmuel Kallner (JIRA)

We ae experiencing this same issue with Kitura's sample Kitura-Sample.This happens with either Kitura-Sample 1.2, which uses Kitura 1.2 which has a dependency with C code in the same repositories as Swift code. However, this also happens with Kitura-Sample 1.1, which uses Kitura 1.1, which in turn has all C code in separate repositories.

My environment on macOS is:
swift -v: Apple Swift version 3.0.1 (swiftlang-800.0.58.6 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9
lldb -v: lldb-360.1.65
OS: Sierra (10.12.1)

My environment on Linux is:
swift -v: Swift version 3.0.1 (swift-3.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
lldb -v: lldb (swift-3.0.1-RELEASE)
OS: Ubuntu 16.04

The steps to recreate the issue without any C code in the same repositories as Swift code is:

  1. git clone -b 1.1.0 git@github.com:IBM-Swift/Kitura-Sample.git
  2. cd Kitura-Sample
  3. swift build
  4. lldb .build/debug/Kitura-Sample
  5. b main.swift:36
  6. r
  7. p router

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux LLDB for Swift
Projects
None yet
Development

No branches or pull requests

1 participant