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

Commits on Feb 8, 2023

  1. [LLDB] Do not dereference promise pointer in coroutine_handle prett…

    …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)
    vogelsgesang authored and llvmbot committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    fab041d View commit details
    Browse the repository at this point in the history
  2. [LLDB] Fix assertion failure by removing CopyType in `std::coroutin…

    …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 authored and llvmbot committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    f4a8608 View commit details
    Browse the repository at this point in the history