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-8374] Swift 4.2 lldb po failures #4364

Closed
keith opened this issue Jul 26, 2018 · 8 comments
Closed

[SR-8374] Swift 4.2 lldb po failures #4364

keith opened this issue Jul 26, 2018 · 8 comments
Assignees
Labels
bug Something isn't working LLDB for Swift

Comments

@keith
Copy link

keith commented Jul 26, 2018

Previous ID SR-8374
Radar rdar://problem/42626690
Original Reporter @keith
Type Bug
Status Closed
Resolution Cannot Reproduce
Environment

Xcode 10 beta 4

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee @dcci
Priority Medium

md5: 1666c5c21076e977fc2aa5be2cb95d0f

Issue Description:

If you compile this code with Xcode 10b4 with:

swiftc -g foo.swift -sdk `xcrun --show-sdk-path -sdk macosx`
import CoreFoundation
import Foundation

let a: CFString = "hi" as NSString
let b = a as String

print("hi")

In lldb if you run:

lldb -- ./foo
(lldb) br set -f foo.swift -l 7
(lldb) r
(lldb) fr v
(lldb) po a

You get these errors:

(lldb) po a
error: in auto-import:
failed to get module 'foo' from AST context
(lldb) po b
error: in auto-import:
failed to get module 'foo' from AST context
(lldb) fr v # no output
@belkadan
Copy link

@swift-ci create

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 26, 2018

Looking at this.

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 26, 2018

Cannot reproduce on ToT on Mojave.

(lldb) po a
hi

(lldb) frame var a
(NSTaggedPointerString) a = 0x8c712a44ee9f9df3 "hi"
(lldb) frame var b
(String) b = "hi"
(lldb) p a
(NSTaggedPointerString) $R2 = 0x8c712a44ee9f9df3 "hi"
(lldb) p b
(String) $R4 = "hi"
(lldb) frame var b
(String) b = "hi"

Can you try updating your source? I think this might be a mismatch between lldb and swift, but I'm not sure.

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 26, 2018

Just to make sure, this is where I'm at:

locals-Mac-Pro:bin davide$ ./swiftc --version
Swift version 4.2-dev (LLVM a4d539e482, Clang 773ac0251a, Swift 31f2c75bb7)
locals-Mac-Pro:bin davide$ lldb 
locals-Mac-Pro:bin davide$ ../../lldb-macosx-x86_64/bin/lldb --version
lldb version 6.0.0 (https://github.com/apple/swift-lldb.git revision 873a338b5d8b74ed504c5e02e52d6972fe9bc513)
  Swift-4.2 (revision 31f2c75bb7928042bce90195b6473dbfe0188387)
  clang revision 773ac0251a7ea94c0b58d96353d4210a7eb2aeef
  llvm revision a4d539e482ca76290f3db6b775203ae230b34d42

(swift -> master branch / lldb -> stable branch)

@keith
Copy link
Author

keith commented Jul 26, 2018

Sorry I must have built / tested with different versions, I didn't think that was the case, but I can't reproduce anymore with Xcode 10b4's Swift and lldb

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 26, 2018

Also tried within Xcode beta 4 and I get the same.

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 26, 2018

yay. Thanks.

@keith
Copy link
Author

keith commented Jul 26, 2018

Sorry about that!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 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 LLDB for Swift
Projects
None yet
Development

No branches or pull requests

2 participants