-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Set up standard library path substitution in rust-gdb and gdbgui #109527
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
FWIW, I have something very similar in Fedora - a general patch and a Your |
@@ -21,4 +23,6 @@ RUST_GDB="${RUST_GDB:-gdb}" | |||
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \ | |||
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \ | |||
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \ | |||
-iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable(ish), but I'm wondering whether this is a problem if the destination does not exist. Maybe it's clearer to see the hash path? Not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IME, gdb only uses the substitution for reading the source file, but still displays the original path in backtraces and such. Even the TUI layout shows the source window labeled with the original path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, there's no issue if a path doesn't exist, the substitutions just don't work.
r? @cuviper - I'm OK r+'ing this but not sure if you wanted to block on your comment |
Sorrry for dropping the ball on this. I can try to add a new |
I do still think a @bors r+ rollup |
…r=cuviper Set up standard library path substitution in rust-gdb and gdbgui Fixes rust-lang#62945 --- Only lightly tested (in release mode, where the paths are a bit of a mess) because my `gdb` appears to crash with `internal-error: inside_main_func: Assertion 'block != nullptr' failed.` and I don't have `gdbgui`. Please review carefully my shell syntax. There's also `rust-lldb`, but I don't know the equivalent for it.
Rollup of 8 pull requests Successful merges: - rust-lang#109527 (Set up standard library path substitution in rust-gdb and gdbgui) - rust-lang#109752 (Stall auto trait assembly in new solver for int/float vars) - rust-lang#109860 (Add support for RISC-V relax target feature) - rust-lang#109923 (Update `error [E0449]: unnecessary visibility qualifier` to be more clear) - rust-lang#110070 (The `wrapping_neg` example for unsigned types shouldn't use `i8`) - rust-lang#110146 (fix(doc): do not parse inline when output is json for external crate) - rust-lang#110147 (Add regression test for rust-lang#104916) - rust-lang#110149 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #62945
Only lightly tested (in release mode, where the paths are a bit of a mess) because my
gdb
appears to crash withinternal-error: inside_main_func: Assertion 'block != nullptr' failed.
and I don't havegdbgui
. Please review carefully my shell syntax.There's also
rust-lldb
, but I don't know the equivalent for it.