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

Implement lldb formatter for "clang encoded" enums (LLDB 18.1+) #124458

Merged
merged 1 commit into from
May 5, 2024

Commits on May 4, 2024

  1. Implement lldb formattter for "clang encoded" enums (LLDB 18.1+)

    Summary:
    I landed a fix last year to enable `DW_TAG_variant_part` encoding in LLDBs (https://reviews.llvm.org/D149213). This PR is a corresponding fix in synthetic formatters to decode that information.
    This is in no way perfect implementation but at least it improves the status quo. But most types of enums will be visible and debuggable in some way.
    I've also updated most of the existing tests that touch enums and re-enabled test cases based on LLDB for enums.
    
    Test Plan:
    ran tests `./x test tests/debuginfo/`. Also tested manually in LLDB CLI and LLDB VSCode
    
    Other Thoughs
    A better approach would probably be adopting [formatters from codelldb](https://github.com/vadimcn/codelldb/blob/master/formatters/rust.py). There is some neat hack that hooks up summary provider via synthetic provider which can ultimately fix more display issues for Rust types and enums too. But getting it to work well might take more time that I have right now.
    Vladimir Makayev committed May 4, 2024
    Configuration menu
    Copy the full SHA
    43e6600 View commit details
    Browse the repository at this point in the history