-
Notifications
You must be signed in to change notification settings - Fork 13.3k
debuginfo: Emit DW_AT_accessibility attributes #74778
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
debuginfo: Emit DW_AT_accessibility attributes #74778
Conversation
Currently, the DWARF attributes for struct member accessibility are not emitted, even though ty::FieldDef contains the information about the visibility. This commit adds a mapping between ty::Visibility and debuginfo::DIFlags for that when creating member descriptions. Closes #9228
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I believe Michael is talking a rest (or retired from T-compiler) and would not return soon. |
r? @eddyb |
Should this use
I think cc @tromey? |
Sorry about the delay on this. Neither of these seem like an exact fit for Rust, I suppose. Since it's routine for debuggers to have to do language-specific handling for various constructs, I'd just pick one -- like, if one is simpler to do in LLVM, that's reason enough. |
Also, I didn't see a reason for closing this. Was it replaced by a different PR or something? It seemed reasonable enough to me ... actually at first I'd thought it had landed and was going to look at implementing the support in gdb. |
…ember-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes rust-lang#9228. Based on rust-lang#74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
…ember-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes rust-lang#9228. Based on rust-lang#74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
…ember-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes rust-lang#9228. Based on rust-lang#74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
…ember-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes rust-lang#9228. Based on rust-lang#74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
…ember-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes rust-lang#9228. Based on rust-lang#74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
No description provided.