2014-10-29 06:13:29 +00:00
|
|
|
// min-lldb-version: 310
|
Add basic CDB support to debuginfo compiletest s, to help catch `*.natvis` regressions, like those fixed in #60687.
Several Microsoft debuggers (VS, VS Code, WinDbg, CDB, ...) consume the `*.natvis` files we embed into rust `*.pdb` files.
While this only tests CDB, that test coverage should help for all of them.
CHANGES
src\bootstrap
- test.rs: Run CDB debuginfo tests on MSVC targets
src\test\debuginfo
- issue-13213.rs: CDB has trouble with this, skip for now (newly discovered regression?)
- pretty-std.rs: Was ignored, re-enable for CDB only to start with, add CDB tests.
- should-fail.rs: Add CDB tests.
src\tools\compiletest:
- Added "-cdb" option
- Added Mode::DebugInfoCdb ("debuginfo-cdb")
- Added run_debuginfo_cdb_test[_no_opt]
- Renamed Mode::DebugInfoBoth -> DebugInfoGdbLldb ("debuginfo-gdb+lldb") since it's no longer clear what "Both" means.
- Find CDB at the default Win10 SDK install path "C:\Program Files (x86)\Windows Kits\10\Debugger\*\cdb.exe"
- Ignore CDB tests if CDB not found.
ISSUES
- `compute_stamp_hash`: not sure if there's any point in hashing `%ProgramFiles(x86)%`
- `OsString` lacks any `*.natvis` entries (would be nice to add in a followup changelist)
- DSTs (array/string slices) which work in VS & VS Code fail in CDB.
- I've avoided `Mode::DebugInfoAll` as 3 debuggers leads to pow(2,3)=8 possible combinations.
REFERENCE
CDB is not part of the base Visual Studio install, but can be added via the Windows 10 SDK:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Installing just "Debugging Tools for Windows" is sufficient.
CDB appears to already be installed on appveyor CI, where this changelist can find it, based on it's use here:
https://github.com/rust-lang/rust/blob/0ffc57311030a1930edfa721fe57d0000a063af4/appveyor.yml#L227
CDB commands and command line reference:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-reference
2019-05-20 00:10:48 +00:00
|
|
|
// ignore-cdb: Fails with exit code 0xc0000135 ("the application failed to initialize properly")
|
2014-04-10 08:25:13 +00:00
|
|
|
|
2019-03-12 00:49:17 +00:00
|
|
|
// aux-build:issue-13213-aux.rs
|
2015-03-06 02:33:58 +00:00
|
|
|
|
2019-03-12 00:49:17 +00:00
|
|
|
extern crate issue_13213_aux;
|
2014-04-10 08:25:13 +00:00
|
|
|
|
|
|
|
// compile-flags:-g
|
|
|
|
|
|
|
|
// This tests make sure that we get no linker error when using a completely inlined static. Some
|
|
|
|
// statics that are marked with AvailableExternallyLinkage in the importing crate, may actually not
|
|
|
|
// be available because they have been optimized out from the exporting crate.
|
|
|
|
fn main() {
|
2019-03-12 00:49:17 +00:00
|
|
|
let b: issue_13213_aux::S = issue_13213_aux::A;
|
2015-04-10 20:39:51 +00:00
|
|
|
println!("Nothing to do here...");
|
2014-04-10 08:25:13 +00:00
|
|
|
}
|