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 #![debugger_visualizer] #1386

Open
bjorn3 opened this issue Jul 22, 2023 · 3 comments · May be fixed by #1462
Open

Implement #![debugger_visualizer] #1386

bjorn3 opened this issue Jul 22, 2023 · 3 comments · May be fixed by #1462
Labels
A-debuginfo Area: Debugging information at runtime in generated code. C-enhancement Category: An issue proposing an enhancement or a PR with one. good first issue Good for newcomers

Comments

@bjorn3
Copy link
Member

bjorn3 commented Jul 22, 2023

https://doc.rust-lang.org/nightly/reference/attributes/debugger.html#using-debugger_visualizer-with-gdb
https://github.com/rust-lang/rust/blob/ab0f3e680e4fd50218914b8afa6900a67377721c/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs

The .debug_gdb_scripts section should contain \x01gdb_load_rust_pretty_printers.py followed by for each #![debugger_visualizer(gdb_script_file = "...")] the pretty printer inlined into the executable. Except if one of the conditions to omit .debug_gdb_scripts is true.

@bjorn3 bjorn3 added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-debuginfo Area: Debugging information at runtime in generated code. good first issue Good for newcomers labels Jul 22, 2023
@bjorn3
Copy link
Member Author

bjorn3 commented Feb 5, 2024

@DesmondWillowbrook
Copy link

DesmondWillowbrook commented Feb 25, 2024

I'm interested in working on this issue.

The code you've linked (https://github.com/rust-lang/rust/blob/ab0f3e680e4fd50218914b8afa6900a67377721c/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs) seems to already contain logic to add pretty-printers. What exactly is the issue here?

@bjorn3
Copy link
Member Author

bjorn3 commented Feb 26, 2024

That is the implementation in the LLVM backend. We need a separate implementation in rustc_codegen_cranelift.

@DesmondWillowbrook DesmondWillowbrook linked a pull request Mar 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information at runtime in generated code. C-enhancement Category: An issue proposing an enhancement or a PR with one. good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants