-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Demangling: Add option for printing simplified async resume functions #36978
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
Demangling: Add option for printing simplified async resume functions #36978
Conversation
Terminology question: what words are we using for the "relationship" between a function and its generated coroutines? I used "top-level" in the PR description, but is there a word that should be used instead? |
There doesn't seem to be a lot of testing options for this. Is it fine or does anyone have recommendations? |
@swift-ci test |
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
You could expose it via a command line option in swift-demangle and add it to |
@adrian-prantl The command doesn't have many options to begin with, so I wasn't sure if it was appropriate to add an option just to test. Maybe a hidden option. |
Build failed |
@swift-ci test |
Build failed |
@swift-ci test Linux Platform |
swift-demangle is a utility to manually do all sorts of demangling, so it seems to be appropriate to expose these options |
I'll add a hidden flag and add FileCheck tests in a follow up. I'd prefer to merge this to allow swiftlang/llvm-project#2868 to be merged. |
Change `SimplifiedUIDemangleOptions` to remove "partial function" prefixes when demangling async coroutine symbols. This removes the prefixes "await resume partial function" and "suspend resume partial function" from demangled names, in doing so hides the effect of async/coroutine function splitting from stack traces and other symbolication. This output will produce the source level function name. For example, a symbol that previously would have demangled to: ``` (1) await resume partial function for static Main.main() ``` will, with this change, demangle to: ``` static Main.main() ``` See #36978 where `ShowAsyncResumePartial` was introduced for lldb. rdar://90455541
Add a new option to
DemangleOptions
for the purpose of printing async resume partials by the name of their top-level function.This will initially be used lldb when generating backtraces. This will allow the backtrace to show frames in the backtrace using the function names found in the source code.
For demonstration, instead of a backtrace like this:
with this change the backtrace will be: