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
Fix IRGen debug info for swift_task_alloc'ed variables. #62542
Conversation
The old code attempted to load the variable despite not knowing its size. Fixed by describing the variable's address on the task heap.
@swift-ci test |
Matching LLDB test can be found in apple/llvm-project#5768 |
Discovered via #62499 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
This does seem to improve inspecting variable values in async code, but doesn't seem to improve stepping into async code (in Xcode, at least, but I've got some compiler/lldb mismatch warnings). |
Good to hear the confirmation. It is expected that this change would not have any effect on stepping. |
I wasn't sure but also didn't think so. Just trying to be thorough. I may know the words and grammar, but reading that code is like Darmok & Jalad at Tanagra. |
Hmm, I'm still experiencing the symptom of the Xcode debugger not seeing some local variables that are clearly in scope and accessible, in this case running in a |
That would be great. Either bugs.swift.org or feedback.apple.com work. |
Set a breakpoint in DaemonCollector.swift:153 and run it. It should stop there almost immediately. Try to inspect the variables lower in the list in the Xcode variables pane (interestingly, it seems there's a line on the list above which variables are inspectable, below which they are not, and I feel like this has always been the case). See the screenshot for examples (I context-clicked on |
Thanks! Here's an even shorter reproducer:
|
The old code attempted to load the variable despite not knowing its size. Fixed by describing the variable's address on the task heap.