Skip to content

Remove the omit_gdb_pretty_printer_section attribute #144738

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jul 31, 2025

Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 31, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Jul 31, 2025

cc #143679 (comment)

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

@bjorn3 bjorn3 force-pushed the remove_omit_gdb_pretty_printer_section branch from c76e848 to 6ecc1c3 Compare July 31, 2025 14:58
@bjorn3
Copy link
Member Author

bjorn3 commented Jul 31, 2025

Almost all tests pass without //@ no-debug-pretty-printers, but I kept them just in case it is actually load bearing for some tests.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, one doc request

@jieyouxu
Copy link
Member

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned lcnr Jul 31, 2025
@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-rustc-dev-guide Area: rustc-dev-guide and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 31, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 31, 2025
@jieyouxu
Copy link
Member

Thanks, you can r=me after PR CI is green.

@bjorn3 bjorn3 mentioned this pull request Jul 31, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Jul 31, 2025

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Jul 31, 2025

📌 Commit d8ee663 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 1, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 1, 2025
…ter_section, r=jieyouxu

Remove the omit_gdb_pretty_printer_section attribute

Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
bors added a commit that referenced this pull request Aug 1, 2025
Rollup of 10 pull requests

Successful merges:

 - #132748 (get rid of some false negatives in rustdoc::broken_intra_doc_links)
 - #135771 ([rustdoc] Add support for associated items in "jump to def" feature)
 - #143360 (loop match: error on `#[const_continue]` outside `#[loop_match]`)
 - #143662 ([rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers.)
 - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition)
 - #144614 (Fortify RemoveUnneededDrops test.)
 - #144703 ([test][AIX] ignore extern_weak linkage test)
 - #144738 (Remove the omit_gdb_pretty_printer_section attribute)
 - #144756 (detect infinite recursion with tail calls in ctfe)
 - #144766 (Add human readable name "Cygwin")

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member

Failed in #144784.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 1, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Aug 1, 2025

@bors2 try jobs=aarch64-apple

rust-bors bot added a commit that referenced this pull request Aug 1, 2025
…, r=<try>

Remove the omit_gdb_pretty_printer_section attribute

try-job: aarch64-apple
@rust-bors
Copy link

rust-bors bot commented Aug 1, 2025

⌛ Trying commit cd8ad69 with merge d8e8166

To cancel the try build, run the command @bors try cancel.

@rust-bors
Copy link

rust-bors bot commented Aug 1, 2025

☀️ Try build successful (CI)
Build commit: d8e8166 (d8e816683a8fbdbe659206e25da866730fc2d6e9, parent: 4b55fe199cfe9c710555a5af7f2a49491ad38254)

@bjorn3 bjorn3 force-pushed the remove_omit_gdb_pretty_printer_section branch from cd8ad69 to 3d234c7 Compare August 1, 2025 20:03
@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2025

Unknown labels: T-bootstrap, A-LLVM, A-attributes, A-testsuite, A-rustc-dev-guide, A-compiletest

Disabling loading of pretty printers in the debugger itself is more
reliable. Before this commit the .gdb_debug_scripts section couldn't be
included in dylibs or rlibs as otherwise there is no way to disable the
section anymore without recompiling the entire standard library.
@bjorn3 bjorn3 force-pushed the remove_omit_gdb_pretty_printer_section branch from 3d234c7 to ae2f8d9 Compare August 1, 2025 20:05
@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2025

Unknown labels: A-attributes, A-testsuite, A-compiletest, T-bootstrap, A-rustc-dev-guide, A-LLVM

@bjorn3
Copy link
Member Author

bjorn3 commented Aug 1, 2025

Turns out the tests were expecting pretty printers to always be on for LLDB. I've made the test directive only apply to GDB and renamed it accordingly.

@bjorn3
Copy link
Member Author

bjorn3 commented Aug 1, 2025

@rustbot ready

@jieyouxu jieyouxu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 2, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

jieyouxu commented Aug 2, 2025

Normally I would bump the p on this PR because it has a lot of test changes and so is conflict-prone, but there's quite a few backports / release process PRs in queue so I didn't want to do that.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 2, 2025

📌 Commit ae2f8d9 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2025
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 3, 2025
…ter_section, r=jieyouxu

Remove the omit_gdb_pretty_printer_section attribute

Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 3, 2025
…ter_section, r=jieyouxu

Remove the omit_gdb_pretty_printer_section attribute

Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
bors added a commit that referenced this pull request Aug 3, 2025
Rollup of 11 pull requests

Successful merges:

 - #142678 (Misc cleanups of `generic_arg_infer` related HIR logic)
 - #144650 (Additional tce tests)
 - #144738 (Remove the omit_gdb_pretty_printer_section attribute)
 - #144790 (Multiple bounds checking elision failures)
 - #144805 (compiletest: Preliminary cleanup of `ProcRes` printing/unwinding)
 - #144808 (`Interner` arg to `EarlyBinder` does not affect auto traits)
 - #144816 (Update E0562 to account for the new impl trait positions)
 - #144822 (Return a struct with named fields from `hash_owner_nodes`)
 - #144824 (Updated test links in compiler)
 - #144829 (Use full flag name in strip command for Darwin)
 - #144843 (Weekly `cargo update`)

Failed merges:

 - #144794 (Port `#[coroutine]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants