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

rust-gdb and rust-lldb not working using stable-x86_64-pc-windows-gnu' toolchain #2838

Open
PietroValerio opened this issue Aug 11, 2021 · 8 comments
Labels

Comments

@PietroValerio
Copy link

Problem

expected debugget output but this message pops up
the 'rust-gdb.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-gnu' toolchain

Steps

1.type rustup-gdb or rustup-lldb

Possible Solution(s)

Notes
Operating system:Windows 10 pro version 10.0.19042 Build 19042
Using mingw-64
Output of rustup --version: rustup 1.24.3 (ce5817a 2021-05-31)
Output of rustup show:
Default host: x86_64-pc-windows-gnu
stable-x86_64-pc-windows-gnu (default)
rustc 1.54.0 (a178d0322 2021-07-26)

@ehuss
Copy link
Contributor

ehuss commented Aug 31, 2021

I think (maybe) the issue is that rustup is assuming all executables end with .exe here, but scripts like rust-gdb are shell scripts which do not have the extension.

@kinnison
Copy link
Contributor

kinnison commented Oct 9, 2021

Certainly on Windows we blindly append the extension .exe -- perhaps

  1. we should use PATHEXT rather than always assuming .exe
  2. we should consider how to have rust-gdb and rust-lldb scripts which will work on native Windows and then give the new scripts appropriate extensions.

Failing that, I suppose we could detect the missing executable, but the fact that the component is already installed and present a better error message.

@prdas31
Copy link

prdas31 commented Oct 17, 2021

Same issue ...

D:\RustTest01>rust-lldb
error: the 'rust-lldb.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-msvc' toolchain
D:\RustTest01>which rust-lldb
/d/Programs/Rust/.cargo/bin/rust-lldb

@selvavm
Copy link

selvavm commented Jan 28, 2022

Based on the link, I am able to debug rust in windows with rust-gdb in Visual Studio Code using the below configuration,

{
            "type": "gdb",
            "request": "launch",
            "name": "Debug Launch",
            "target": "${workspaceRoot}/target/debug/${workspaceRootFolderName}.exe",
            "cwd": "${workspaceRoot}",
            "valuesFormatting": "parseText",
            "gdbpath": "C:/Users/selva/.cargo/bin/rust-gdb.cmd",
            "preLaunchTask": "cargo build (stable-gnu)",
        }

But the pretty printer is not working. It is showing address instead of string.

@rbtcollins rbtcollins changed the title rust-gdb.exe and rust-lldb.exe not working using stable-x86_64-pc-windows-gnu' toolchain rust-gdb and rust-lldb not working using stable-x86_64-pc-windows-gnu' toolchain Jun 25, 2023
@NossicaSystems
Copy link

Has there been any progress on this?

@Rustin170506 Rustin170506 self-assigned this Jul 4, 2023
@Rustin170506
Copy link
Member

I will try to fix it.

@luowyang
Copy link

luowyang commented Sep 26, 2023

I will try to fix it.

@hi-rustin Is there any progress on this issue? The rust-lldb is perfectly runnable in MSYS2 as long as the LLDB is installed. Technically it may be fixed by figuring out 1) how to distribute the LLDB, and 2) how to distribute an MSYS2-like run environment, or create an equivalent cmd script. Is there any particular problem that blocks this naive solution?

@rami3l
Copy link
Member

rami3l commented Sep 26, 2023

@luowyang Sorry, but @hi-rustin is not on the team currently... Maybe we need to find some time to pick up the lost context...

@Rustin170506 Rustin170506 removed their assignment Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants