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

PR for llvm/llvm-project#60445 #254

Merged
merged 2 commits into from Feb 13, 2023
Merged

PR for llvm/llvm-project#60445 #254

merged 2 commits into from Feb 13, 2023

Conversation

llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Feb 1, 2023

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 1, 2023

@labath @adrian-prantl What do you think about merging this PR to the release branch?

@vogelsgesang

This comment was marked as outdated.

…y printer

So far, the pretty printer for `std::coroutine_handle` internally
dereferenced the contained frame pointer displayed the `promise`
as a sub-value. As noticed in https://reviews.llvm.org/D132624
by @labath, this can lead to an endless loop in lldb during printing
if the coroutine frame pointers form a cycle.

This commit breaks the cycle by exposing the `promise` as a pointer
type instead of a value type. The depth to which the `frame variable`
and the `expression` commands dereference those pointers can be
controlled using the `--ptr-depth` argument.

Differential Revision: https://reviews.llvm.org/D132815

(cherry picked from commit 8aa3137)
…e_handle` pretty printer

The pretty printer for `std::coroutine_handle` was running into
> Assertion failed: (target_ctx != source_ctx && "Can't import into itself")
from ClangASTImporter.h, line 270.

This commit fixes the issue by removing the `CopyType` call from the
pretty printer. While this call was necessary in the past, it seems to
be no longer required, at least all test cases are still passing. Maybe
something changed in the meantime around the handling of `TypesystemClang`
instances. I don't quite understand why `CopyType` was necessary earlier.

I am not sure how to add a regression test for this, though. It seems
the issue is already triggered by the exising `TestCoroutineHandle.py`,
but API tests seem to ignore all violations of `lldbassert` and still
report the test as "passed", even if assertions were triggered

Differential Revision: https://reviews.llvm.org/D143127

(cherry picked from commit 54d4a25)
@vogelsgesang
Copy link
Member

ok, it seems this is not superseded. Instead the llvmbot was smart enough to reuse the existing PR :)

@adrian-prantl
Copy link
Contributor

LGTM

@tru tru merged commit 6dabe60 into release/16.x Feb 13, 2023
@tru tru deleted the llvm-issue60445 branch February 13, 2023 10:30
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.

[lldb] backport std::coroutine pretty printer fixes to release 16.0
4 participants