-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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+) (v2) #124745
Conversation
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.
rustbot has assigned @Mark-Simulacrum. Use |
@bors r=Mark-Simulacrum |
…, r=Mark-Simulacrum Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) (v2) This PR is identical to rust-lang#124458, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). Original PR description: --- ## Summary: fixes rust-lang#79530 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.
Rollup of 6 pull requests Successful merges: - rust-lang#124146 (Triagebot: Rename `macos` ping group to `apple`) - rust-lang#124742 (Add `rustfmt` cfg to well known cfgs list) - rust-lang#124745 (Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) (v2)) - rust-lang#124747 (Support Result<T, E> across FFI when niche optimization can be used (v2)) - rust-lang#124765 ([rustdoc] Fix bad color for setting cog in ayu theme) - rust-lang#124768 ([resubmission] Meta: Enable the brand new triagebot transfer command) r? `@ghost` `@rustbot` modify labels: rollup
Failed in rollup: #124769 (comment) |
@bors rollup=iffy |
Since the original author (and maintainers) cannot directly modify this PR, I suggest opening a 3rd PR, VladimirMakaev. |
@fmease I'll open a new PR. Is there a good way I can rerun those tests on CI for a PR? They seem to all pass when I do so locally on Linux server. Need to dig why things are failing on msvc would be nice to be able to trigger a build on PR to know upfront |
…r=dtolnay Implement lldb formatter for "clang encoded" enums (LLDB 18.1+) (V3) This is a redo of PR (rust-lang#124458) which was approved previously but force-pushed out. Then a V2 (rust-lang#124745) failed `debuginfo\msvc-pretty-enums.rs` test during merge. I've fixed the test and checked it to pass on Windows with `.\x.ps1 test .\tests\debuginfo\msvc-pretty-enums.rs` Below is the original summary: ## Summary: fixes rust-lang#79530 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.
This PR is identical to #124458, which was approved and merged but then removed from master by a force-push due to a CI bug.
Original PR description:
Summary:
fixes #79530
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 VSCodeOther Thoughs:
A better approach would probably be adopting formatters from codelldb. 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.