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-10686] LLDB fails for iOS when using custom Swift toolchains #4338
Comments
Filed following conversation here: https://twitter.com/slava_pestov/status/1128366446512418820 cc @slavapestov |
jingham@apple.com (JIRA User), @dcci, are we getting the wrong target somehow? |
Comment by Jim Ingham (JIRA) It does look like we think this is a macOS not an iOSSimulator binary. @adrian-prantl might have better guesses how that might happen... |
What's the output of `(lldb) image list -t -f` ? Also, can you capture a types log by putting `lldb log enable types -f /tmp/types.log` into ~/.lldbinit-Xcode and restarting Xcode and reproducing the issue? |
I've attached the output of running No file at Were you not able to reproduce this issue @adrian-prantl? It may be more practical to get you to reproduce the problem so you can debug in depth, otherwise we might be playing a very inefficient game of debug telephone back and forth. I've attached a basic iOS app Xcode project that reproduces the problems for me with a breakpoint set on the |
> [ 0] x86_64-- Interesting: your application doesn't have a definitive operating system (in the sense of: LLDB doesn't properly detect it). > Were you not able to reproduce this issue Unfortunately, no, but I tried to reproduce it with my latest local build, not with a dowloaded toolchain. I will try that next. Thanks a lot for the project! |
@swift-ci create |
Could you please also attach the /tmp/types.log file you created? |
No file at |
Sorry `lldb log enable types -f /tmp/types.log` should have been `log enable lldb types -f /tmp/types.log` |
Thanks that worked. Attached the log. |
There we go:
|
I tried now with 10E1001 + swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-09-a-osx.pkg and I still can't reproduce this... Would you be able to do another run, this time with settings set target.process.extra-startup-command QSetLogging:bitmask=LOG_RNB_REMOTE; in your .lldbinit-Xcode ? |
Done, I've uploaded |
Thank you. debugserver does report the platform correctly as ios-12.2: <171430> read packet: ${"images":[{"load_address":4309229568,"mod_date":0,"pathname":"/Users/jsimard/Library/Developer/CoreSimulator/Devices/8FAE9403-9A71-45BE-9EDB-75838D23D3DD/data/Containers/Bundle/Application/5F2FF041-8231-4594-9DFD-238CF3EE4B7C/LLDBNoContextRepro.app/LLDBNoContextRepro","uuid":"AAAE4344-3865-3E8E-969E-D68067F4B686","min_version_os_name":"ios","min_version_os_sdk":"12.2","mach_header":{"magic":4277009103,"cputype":16777223,"cpusubtype":3,"filetype":2,"flags":2097285}],"segments":[{"name":"_PAGEZERO","vmaddr":0,"vmsize":4294967296,"fileoff":0,"filesize":0,"maxprot":0}],{"name":"_TEXT","vmaddr":4294967296,"vmsize":20480,"fileoff":0,"filesize":20480,"maxprot":7}], So without having a way to reproduce this, I'll see if I can read the source code to figure out why this: SwiftASTContext("LLDBNoContextRepro")::SetTriple("x86_64-apple-ios12.2-simulator") setting to "x86_64-apple-ios12.2-simulator" isn't getting picked up here: SwiftASTContext("LLDBNoContextRepro")::LogConfiguration(SwiftASTContext*)0x7fa811d0a7e0: |
This should be addressed by the simulator triple fixes in SR-12932. If it still doesn't work, please let me know! |
Attachment: Download
Environment
macOS Mojave 10.14.5 (18F132)
Xcode 10.2.1 (10E1001)
swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-09-a
Additional Detail from JIRA
md5: 714e8c2d8326e82def6005df93ca8b68
duplicates:
Issue Description:
Setting a breakpoint in an empty iOS app's view controller's
viewDidLoad
method logs the following to the console:Attempting to print something produces the following log and error messages:
The text was updated successfully, but these errors were encountered: