Hello, I'm trying to build split debug info files on Windows, using the Nightly compiler. On MSVC (nightly-x86_64-pc-windows-msvc
) the pdb file gets generated and everything is good. However on GNU (nightly-x86_64-pc-windows-gnu
), even with [profile.dev] split-debuginfo = "packed"
set the DWARF file doesn't get generated in the target/debug directory.
I'm trying to use GNU instead of MSVC because I'm using CodeLLDB on VSCode and it says in its docs that GNU is preferred: Windows · vadimcn/codelldb Wiki · GitHub (on MSVC I'm having some issues debugging such as the debugger timing out). And I need the split debug info files because the LLDB is complaining that they're missing:
(in the debug console)
warning: (x86_64) [executable].exe unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
After running cargo build --verbose
I've noticed that cargo
invokes rustc
without setting the split-debuginfo
flag. And when I'm passing setting the RUSTFLAGS manually to set RUSTFLAGS=-C split-debuginfo=packed
it says error: `-Csplit-debuginfo=packed` is unstable on this platform
. Is there a way to enable this unstable option? Or maybe just a better way to debug Rust programs on Windows?
cargo check output
>cargo check
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `C:\Users\Bubilda\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\bin\rustc.exe - --crate-name ___ --print=file-names -C split-debuginfo=packed --crate-type
bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type
proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (exit code: 1)
--- stdout
___.exe
lib___.rlib
___.dll
___.dll
lib___.a
___.dll
C:\Users\Bubilda\.rustup\toolchains\nightly-x86_64-pc-windows-gnu
off
___
debug_assertions
fmt_debug="full"
overflow_checks
panic="unwind"
proc_macro
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="windows"
target_feature="cmpxchg16b"
target_feature="fxsr"
target_feature="lahfsahf"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="x87"
target_has_atomic
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_equal_alignment="128"
target_has_atomic_equal_alignment="16"
target_has_atomic_equal_alignment="32"
target_has_atomic_equal_alignment="64"
target_has_atomic_equal_alignment="8"
target_has_atomic_equal_alignment="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="128"
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_os="windows"
target_pointer_width="64"
target_vendor="pc"
ub_checks
windows
--- stderr
error: `-Csplit-debuginfo=packed` is unstable on this platform
error: aborting due to 1 previous error