Skip to content

rust-gdb doesn't set up path substitutions? #62945

Closed
@lnicola

Description

@lnicola

I'm trying to use rust-gdb on project generated by cargo new and looks like the rust-src source code path is not configured:

Reading symbols from target/debug/hello...
(gdb) show directories
Source directories searched: ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/etc:$cdir:$cwd
(gdb) r
Starting program: target/debug/hello 

Program received signal SIGSEGV, Segmentation fault.
core::ops::function::FnOnce::call_once{{vtable-shim}} () at /rustc/a7f28678bbf4e16893bb6a718e427504167a9494/src/libcore/ops/function.rs:231
231	/rustc/a7f28678bbf4e16893bb6a718e427504167a9494/src/libcore/ops/function.rs: No such file or directory.
(gdb) set substitute-path /rustc/a7f28678bbf4e16893bb6a718e427504167a9494/ ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/
(gdb) l
226	    #[stable(feature = "fn_once_output", since = "1.12.0")]
227	    type Output;
228	
229	    /// Performs the call operation.
230	    #[unstable(feature = "fn_traits", issue = "29625")]
231	    extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
232	}
233	
234	mod impls {
235	    #[stable(feature = "rust1", since = "1.0.0")] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions