这是我的带有调试设置的Cargo.toml:
[package]
name = "rpolysolve"
version = "0.1.0"
authors = ["stiv"]
[dependencies]
[profile.dev]
debug = true
opt-level = 0正如我从控制台输出中看到的,cargo没有删除调试符号:
Finished dev [unoptimized + debuginfo] target(s) in 5.66 secs我已经下载gdb-7.9.1-tdm64-2到我的C:\gdb-7.9.1-tdm64-2文件夹在windows7上。现在,我尝试使用以下命令从项目文件夹启动它:
C:\gdb-7.9.1-tdm64-2\gdb64\bin\gdb.exe ./target/debug/rpolysolve.exe
GNU gdb (GDB) 7.9.1
... GNU blablabla cut here ...
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./target/debug/rpolysolve.exe...(no debugging symbols found)...done.正如您所看到的,它说没有找到的调试符号,现在有方法可以设置断点。我怎么才能解决这个问题?
发布于 2017-08-22 16:50:38
好的,解决方案是切换工具链,即使二进制文件与GNU兼容:
rustup install stable-gnu
rustup default stable-gnu我不知道msvc工具链是否有gdb.exe。
https://stackoverflow.com/questions/45822612
复制相似问题