Skip to content

[cherry-pick][lldb] Upstream frame recognizer fixes #9485

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

Conversation

felipepiovezan
Copy link

@felipepiovezan felipepiovezan commented Oct 30, 2024

This is only solving an issue where a patch was first submitted downstream and then merged upstream in a different way.

* bd6028619688 avogel.. [lldb] Fix test expectation in `TestFrameRecognizer.py` (#106281)
* fd7bb89163ab avogel.. [lldb] Add frame recognizers for libc++ `std::invoke` (#105695)
* 1f48630f7b18  phosek.. [lldb] Support non-default libc++ ABI namespace
* 9f30a6ed46f9 fpiove.. Revert "[lldb] Support frame recognizer regexp on mangled names."

Revert downstream's 9f30a6ed46f9 which was re-implemented in fd7bb89163ab upstream.
1f48630f7b18 and bd6028619688 are fixes associated with the commits above.

felipepiovezan and others added 4 commits October 29, 2024 18:38
This is a fix forward for the issue introduced in llvm#104523.

(cherry picked from commit 68a1593)
With this commit, we also hide the implementation details of
`std::invoke`. To do so, the `LibCXXFrameRecognizer` got a couple more
regular expressions.

The regular expression passed into `AddRecognizer` became problematic,
as it was evaluated on the demangled name. Those names also included
result types for C++ symbols. For `std::__invoke` the return type is a
huge `decltype(...)`, making the regular expresison really hard to
write.

Instead, I added support to `AddRecognizer` for matching on the
demangled names without result type and argument types.

By hiding the implementation details of `invoke`, also the back traces
for `std::function` become even nicer, because `std::function` is using
`__invoke` internally.

Co-authored-by: Adrian Prantl <[email protected]>
(cherry picked from commit dd060bd)
@felipepiovezan felipepiovezan requested review from adrian-prantl and removed request for JDevlieghere October 30, 2024 16:12
@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan felipepiovezan merged commit b55191a into swiftlang:stable/20240723 Oct 30, 2024
3 checks passed
@felipepiovezan felipepiovezan deleted the felipe/cherry_pick_frame_recognizer_stuff branch October 30, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants