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-11008] lldb debug error when compiling project with SPM on Ubuntu 16.04 #4857
Comments
@aciidb0mb3r This looks like the bug that swiftpm doesn't perform the -modulerwrap action and thus isn't linking in the debug info. Is there a JIRA ticket for that? |
Not sure what is modulerwrap, do you mean this https://bugs.swift.org/browse/SR-3280 ? |
That seems to refer to the same problem although it isn't very specific. The correct way to build a debuggable program on Darwin is: $ swiftc -g -c a.swift ... On Linux it is: |
In radar-land the bug is rdar://problem/46509520. |
Thanks for the examples. That bug is tracking the work for Darwin. I'll use this bug for Linux. |
Comment by JD Xie (JIRA) So is there a work around for this now? |
Yes, compiling manually / with a Makefile that ensures that the wrapped swiftmodule is linked with the binary as outlined by my example above. |
Environment
OS: Ubuntu 16.04 64bit
Swift version 5.0.1 (swift-5.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: 7776a2f54aef3e1e7d4cfa79901fb415
Issue Description:
When debugging a swift binary with lldb, I got the following error when using `p` or `expression` command
And there is an issue related to this problem which was fired before, https://bugs.swift.org/browse/SR-85. `-g` option has been included in the compile command, I don't know why this problem happens again.
output of `swift build -c debug -v`
The text was updated successfully, but these errors were encountered: