Skip to content

Can't step into libstd with gdb on Windows #38257

Open
@elahn

Description

fn main() {
    let mut input = String::new();

When I try to step in, I get:
Source C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\obj\../src/libcollections/string.rs is not available.

When I set a breakpoint in string.rs and start a debug session, I get the error:
No source file named d:\dev\gnu\rust\src\libcollections\string.rs.
Note: this does not mean the file doesn't exist on the filesystem, it means it's not in the debug binary.

Workaround:

Set RUST_SRC_PATH=C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src

Either:

  • Copy/move rust source code to C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src
  • Or, as administrator:
C:\bot\slave\nightly-dist-rustc-win-gnu-64>mklink build C:\Users\Elahn\.multirust\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib
symbolic link created for build <<===>> C:\Users\Elahn\.multirust\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.O-windows-gnuToolchain: GNU, Operating system: WindowsT-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