I am working on Rust and I am debugging with gdb (MinGW64, I am working on msw).
I saw in the .cargo folder (.cargo/bin) many executables:
Directory of C:\Users\me\.cargo\bin
24/06/2024 19:37 <DIR> .
24/06/2024 19:37 <DIR> ..
24/06/2024 18:48 8,949,760 cargo-clippy.exe
24/06/2024 18:48 8,949,760 cargo-fmt.exe
24/06/2024 18:48 8,949,760 cargo-miri.exe
24/06/2024 18:48 8,949,760 cargo.exe
24/06/2024 18:48 8,949,760 clippy-driver.exe
24/06/2024 18:48 8,949,760 rls.exe
24/06/2024 18:48 8,949,760 rust-analyzer.exe
24/06/2024 18:48 8,949,760 rust-gdb.exe
24/06/2024 18:48 8,949,760 rust-gdbgui.exe
24/06/2024 18:48 8,949,760 rust-lldb.exe
24/06/2024 18:48 8,949,760 rustc.exe
24/06/2024 18:48 8,949,760 rustdoc.exe
24/06/2024 18:48 8,949,760 rustfmt.exe
24/06/2024 18:48 8,949,760 rustup.exe
My question is on the following ones:
24/06/2024 18:48 8,949,760 rust-gdb.exe
24/06/2024 18:48 8,949,760 rust-gdbgui.exe
I could not find what specifically are.
Can someone explain me how to use them, if I can, instead (or with) mingw64 gdb?
Here's what I tried:
I don't think they are a Rust version of gdb, when I run both of them I get the following message:
C:\Users\me\.cargo\bin>rust-gdb.exe
error: the 'rust-gdb.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-gnu' toolchain
even if I add an executable as argument, I get the same error.
And with the rust-gdbgui.exe, is it intended for GUIs of editors?
gdb
itself, if you can't use them that way, then there is something wrong with your setup. I don't have a Windows machine to try to reproduce your error though.rust-gdb.exe
is just a wrapper that redirects to the corresponding file in the current toolchain (e.g.c:\Users\me\.rustup\toolchains\stable-x86_64-pc-windows-gnu\bin\rust-gdb
) but the latter is abash
shell script, so won't work in plain Windows. The wrapper doesn't work in MSYS2 consoles either, but the plain script should:/c/Users/me/.rustup/toolchains/stable-x86_64-pc-windows-gnu/bin/rust-gdb