-
Notifications
You must be signed in to change notification settings - Fork 101
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
Comments
The function to insert this section is called at https://github.com/rust-lang/rust/blob/8c0b4f67c9b4bf477df38c16669fd576d46a2b3d/compiler/rustc_codegen_ssa/src/base.rs#L464 |
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? |
That is the implementation in the LLVM backend. We need a separate implementation in rustc_codegen_cranelift. |
@bjorn3 is this issue still open .wanted to work on this .Looking forward to hear from you . |
Yes, this change is still wanted. However someone else also asked if they could pick it up at #1462 (comment) a couple of days ago, so I would like to give them a chance first. |
thanks for your response ,i also add the comment on #1462 if the person wanted to work ,i can help. |
@bjorn3 i ask the person and said that i can pick this |
@bjorn3 should a create sprit module for gdb and call in the base.rs file as in the https://github.com/rust-lang/rust/blob/7606c13961ddc1174b70638e934df0439b7dc515/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs#L85-L117 |
All code can probably be placed at rustc_codegen_cranelift/src/driver/aot.rs Line 396 in 253436c |
@bjorn3 any project which use the cranelift backend ,needed to test it |
You can build hello world with rustc_codegen_cranelift and then check if the |
okay thanks |
@bjorn3 where i can find the corresponding in cranelif like |
You don't need rustc_codegen_cranelift/src/vtable.rs Lines 96 to 100 in 4fb3c4b
|
okay let me check |
@bjorn3 the LLVM use the |
|
oh great thanks |
@bjorn3 how can i use the builder create in cranelift https://github.com/rust-lang/rust/blob/ab0f3e680e4fd50218914b8afa6900a67377721c/compiler/rustc_codegen_llvm/src/builder.rs , for |
The volatile load for keeping the section around should be inserted at rustc_codegen_cranelift/src/main_shim.rs Line 100 in b4e46de |
how i am gonna Load just the first byte . |
You can use |
hi @bjorn3 ,i have pick the PR of previous person who is working on it .here are changes ,any feedback on this master...kernel-loophole:rustc_codegen_cranelift:master |
@kernel-loophole It seems in your commit there are a lot of reverts of changes I made within the last couple of months to the debuginfo code. Did a rebase go wrong? Also please remove the files in |
@bjorn3 okay i just pick the PR .okay will do |
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.The text was updated successfully, but these errors were encountered: