2024-02-20 20:12:05 -06:00
|
|
|
// ignore-tidy-linelength
|
2024-08-09 21:33:40 -05:00
|
|
|
//@ ignore-windows-gnu: #128981
|
2015-03-12 11:05:44 -05:00
|
|
|
//@ ignore-android: FIXME(#10381)
|
|
|
|
//@ compile-flags:-g
|
2024-08-09 21:33:40 -05:00
|
|
|
//@ min-lldb-version: 1800
|
2021-03-30 12:43:39 -05:00
|
|
|
//@ min-cdb-version: 10.0.18317.1001
|
2015-05-09 09:48:36 -05:00
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
2015-03-12 11:05:44 -05:00
|
|
|
|
|
|
|
// gdb-command: run
|
|
|
|
|
|
|
|
// gdb-command: print slice
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-check:$1 = &[i32](size=4) = {0, 1, 2, 3}
|
2015-03-12 11:05:44 -05:00
|
|
|
|
|
|
|
// gdb-command: print vec
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-check:$2 = Vec(size=4) = {4, 5, 6, 7}
|
2015-03-12 11:05:44 -05:00
|
|
|
|
|
|
|
// gdb-command: print str_slice
|
|
|
|
// gdb-check:$3 = "IAMA string slice!"
|
|
|
|
|
|
|
|
// gdb-command: print string
|
|
|
|
// gdb-check:$4 = "IAMA string!"
|
|
|
|
|
|
|
|
// gdb-command: print some
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-check:$5 = core::option::Option<i16>::Some(8)
|
2015-03-12 11:05:44 -05:00
|
|
|
|
|
|
|
// gdb-command: print none
|
2024-08-17 16:31:49 -05:00
|
|
|
// gdb-check:$6 = core::option::Option<i64>::None
|
2015-03-12 11:05:44 -05:00
|
|
|
|
2017-06-09 10:51:28 -05:00
|
|
|
// gdb-command: print os_string
|
|
|
|
// gdb-check:$7 = "IAMA OS string 😃"
|
2017-06-02 08:18:00 -05:00
|
|
|
|
2017-06-09 10:51:28 -05:00
|
|
|
// gdb-command: print some_string
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-check:$8 = core::option::Option<alloc::string::String>::Some("IAMA optional string!")
|
2017-06-01 13:26:09 -05:00
|
|
|
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-command: set print elements 5
|
2017-10-03 14:28:57 -05:00
|
|
|
// gdb-command: print some_string
|
2024-08-09 21:33:40 -05:00
|
|
|
// gdb-check:$9 = core::option::Option<alloc::string::String>::Some("IAMA "...)
|
2017-10-03 14:28:57 -05:00
|
|
|
|
2015-05-09 09:48:36 -05:00
|
|
|
// === LLDB TESTS ==================================================================================
|
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:run
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v slice
|
2024-08-09 21:33:40 -05:00
|
|
|
// lldb-check:[...] slice = size=4 { [0] = 0 [1] = 1 [2] = 2 [3] = 3 }
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v vec
|
2024-08-09 21:33:40 -05:00
|
|
|
// lldb-check:[...] vec = size=4 { [0] = 4 [1] = 5 [2] = 6 [3] = 7 }
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v str_slice
|
2024-08-09 21:33:40 -05:00
|
|
|
// lldb-check:[...] str_slice = "IAMA string slice!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = ' ' [12] = 's' [13] = 'l' [14] = 'i' [15] = 'c' [16] = 'e' [17] = '!' }
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v string
|
2024-08-09 21:33:40 -05:00
|
|
|
// lldb-check:[...] string = "IAMA string!" { vec = size=12 { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = '!' } }
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v some
|
|
|
|
// lldb-check:[...] some = Some(8)
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v none
|
|
|
|
// lldb-check:[...] none = None
|
2015-05-09 09:48:36 -05:00
|
|
|
|
2024-03-15 14:30:45 -05:00
|
|
|
// lldb-command:v os_string
|
2024-08-09 21:33:40 -05:00
|
|
|
// lldb-check:[...] os_string = "IAMA OS string 😃" { inner = { inner = size=19 { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'O' [6] = 'S' [7] = ' ' [8] = 's' [9] = 't' [10] = 'r' [11] = 'i' [12] = 'n' [13] = 'g' [14] = ' ' [15] = '\xf0' [16] = '\x9f' [17] = '\x98' [18] = '\x83' } } }
|
2019-05-14 07:50:58 -05:00
|
|
|
|
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-19 19:10:48 -05:00
|
|
|
// === CDB TESTS ==================================================================================
|
|
|
|
|
|
|
|
// cdb-command: g
|
|
|
|
|
|
|
|
// cdb-command: dx slice,d
|
[debuginfo] Make debuginfo type names for slices and str consistent.
Before this PR, the compiler would emit the debuginfo name `slice$<T>`
for all kinds of slices, regardless of whether they are behind a
reference or not and regardless of the kind of reference. As a
consequence, the types `Foo<&[T]>`, `Foo<[T]>`, and `Foo<&mut [T]>`
would end up with the same type name `Foo<slice$<T> >` in debuginfo,
making it impossible to disambiguate between them by name. Similarly,
`&str` would get the name `str` in debuginfo, so the debuginfo name for
`Foo<str>` and `Foo<&str>` would be the same. In contrast,
`*const [bool]` and `*mut [bool]` would be `ptr_const$<slice$<bool> >`
and `ptr_mut$<slice$<bool> >`, i.e. the encoding does not lose
information about the type.
This PR removes all special handling for slices and `str`. The types
`&[bool]`, `&mut [bool]`, and `&str` thus get the names
`ref$<slice2$<bool> >`, `ref_mut$<slice2$<bool> >`, and
`ref$<str$>` respectively -- as one would expect.
2022-10-25 05:28:03 -05:00
|
|
|
// cdb-check:slice,d : { len=4 } [Type: ref$<slice2$<i32> >]
|
2021-03-30 12:43:39 -05:00
|
|
|
// cdb-check: [len] : 4 [Type: [...]]
|
|
|
|
// cdb-check: [0] : 0 [Type: int]
|
|
|
|
// cdb-check: [1] : 1 [Type: int]
|
|
|
|
// cdb-check: [2] : 2 [Type: int]
|
|
|
|
// cdb-check: [3] : 3 [Type: int]
|
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-19 19:10:48 -05:00
|
|
|
|
|
|
|
// cdb-command: dx vec,d
|
2021-07-19 04:00:21 -05:00
|
|
|
// cdb-check:vec,d [...] : { len=4 } [Type: [...]::Vec<u64,alloc::alloc::Global>]
|
2020-12-22 16:02:07 -06:00
|
|
|
// cdb-check: [len] : 4 [Type: [...]]
|
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-19 19:10:48 -05:00
|
|
|
// cdb-check: [capacity] : [...] [Type: [...]]
|
2024-08-09 20:54:48 -05:00
|
|
|
// cdb-check: [0] : 4 [Type: u64]
|
|
|
|
// cdb-check: [1] : 5 [Type: u64]
|
|
|
|
// cdb-check: [2] : 6 [Type: u64]
|
|
|
|
// cdb-check: [3] : 7 [Type: u64]
|
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-19 19:10:48 -05:00
|
|
|
|
|
|
|
// cdb-command: dx str_slice
|
[debuginfo] Make debuginfo type names for slices and str consistent.
Before this PR, the compiler would emit the debuginfo name `slice$<T>`
for all kinds of slices, regardless of whether they are behind a
reference or not and regardless of the kind of reference. As a
consequence, the types `Foo<&[T]>`, `Foo<[T]>`, and `Foo<&mut [T]>`
would end up with the same type name `Foo<slice$<T> >` in debuginfo,
making it impossible to disambiguate between them by name. Similarly,
`&str` would get the name `str` in debuginfo, so the debuginfo name for
`Foo<str>` and `Foo<&str>` would be the same. In contrast,
`*const [bool]` and `*mut [bool]` would be `ptr_const$<slice$<bool> >`
and `ptr_mut$<slice$<bool> >`, i.e. the encoding does not lose
information about the type.
This PR removes all special handling for slices and `str`. The types
`&[bool]`, `&mut [bool]`, and `&str` thus get the names
`ref$<slice2$<bool> >`, `ref_mut$<slice2$<bool> >`, and
`ref$<str$>` respectively -- as one would expect.
2022-10-25 05:28:03 -05:00
|
|
|
// cdb-check:str_slice : "IAMA string slice!" [Type: ref$<str$>]
|
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-19 19:10:48 -05:00
|
|
|
|
|
|
|
// cdb-command: dx string
|
|
|
|
// cdb-check:string : "IAMA string!" [Type: [...]::String]
|
|
|
|
// cdb-check: [<Raw View>] [Type: [...]::String]
|
2020-12-22 16:02:07 -06:00
|
|
|
// cdb-check: [len] : 0xc [Type: [...]]
|
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-19 19:10:48 -05:00
|
|
|
// cdb-check: [capacity] : 0xc [Type: [...]]
|
2020-12-22 16:02:07 -06:00
|
|
|
|
|
|
|
// cdb-command: dx -r2 string
|
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-19 19:10:48 -05:00
|
|
|
// cdb-check: [0] : 73 'I' [Type: char]
|
|
|
|
// cdb-check: [1] : 65 'A' [Type: char]
|
|
|
|
// cdb-check: [2] : 77 'M' [Type: char]
|
|
|
|
// cdb-check: [3] : 65 'A' [Type: char]
|
|
|
|
// cdb-check: [4] : 32 ' ' [Type: char]
|
|
|
|
// cdb-check: [5] : 115 's' [Type: char]
|
|
|
|
// cdb-check: [6] : 116 't' [Type: char]
|
|
|
|
// cdb-check: [7] : 114 'r' [Type: char]
|
|
|
|
// cdb-check: [8] : 105 'i' [Type: char]
|
|
|
|
// cdb-check: [9] : 110 'n' [Type: char]
|
|
|
|
// cdb-check: [10] : 103 'g' [Type: char]
|
|
|
|
// cdb-check: [11] : 33 '!' [Type: char]
|
|
|
|
|
|
|
|
// cdb-command: dx os_string
|
2021-09-10 18:51:10 -05:00
|
|
|
// NOTE: OSString is WTF-8 encoded which Windows debuggers don't understand. Verify the UTF-8
|
|
|
|
// portion displays correctly.
|
|
|
|
// cdb-check:os_string : "IAMA OS string [...]" [Type: std::ffi::os_str::OsString]
|
2021-07-01 14:57:12 -05:00
|
|
|
// cdb-check: [<Raw View>] [Type: std::ffi::os_str::OsString]
|
2021-09-10 18:51:10 -05:00
|
|
|
// cdb-check: [chars] : "IAMA OS string [...]"
|
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-19 19:10:48 -05:00
|
|
|
|
|
|
|
// cdb-command: dx some
|
2022-07-07 08:01:43 -05:00
|
|
|
// cdb-check:some : Some [Type: enum2$<core::option::Option<i16> >]
|
|
|
|
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<i16> >]
|
2021-06-24 15:37:03 -05:00
|
|
|
// cdb-check: [+0x002] __0 : 8 [Type: short]
|
2021-03-30 12:43:39 -05:00
|
|
|
|
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-19 19:10:48 -05:00
|
|
|
// cdb-command: dx none
|
2022-07-07 08:01:43 -05:00
|
|
|
// cdb-check:none : None [Type: enum2$<core::option::Option<i64> >]
|
|
|
|
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<i64> >]
|
2021-03-30 12:43:39 -05:00
|
|
|
|
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-19 19:10:48 -05:00
|
|
|
// cdb-command: dx some_string
|
2022-07-07 08:01:43 -05:00
|
|
|
// cdb-check:some_string : Some [Type: enum2$<core::option::Option<alloc::string::String> >]
|
|
|
|
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<alloc::string::String> >]
|
2021-09-10 18:51:10 -05:00
|
|
|
// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String]
|
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-19 19:10:48 -05:00
|
|
|
|
2021-06-30 16:23:44 -05:00
|
|
|
// cdb-command: dx linkedlist
|
2023-03-19 15:15:26 -05:00
|
|
|
// cdb-check:linkedlist : { len=0x2 } [Type: alloc::collections::linked_list::LinkedList<i32,alloc::alloc::Global>]
|
|
|
|
// cdb-check: [<Raw View>] [Type: alloc::collections::linked_list::LinkedList<i32,alloc::alloc::Global>]
|
2021-06-30 16:23:44 -05:00
|
|
|
// cdb-check: [0x0] : 128 [Type: int]
|
|
|
|
// cdb-check: [0x1] : 42 [Type: int]
|
|
|
|
|
|
|
|
// cdb-command: dx vecdeque
|
2021-07-25 13:34:08 -05:00
|
|
|
// cdb-check:vecdeque : { len=0x2 } [Type: alloc::collections::vec_deque::VecDeque<i32,alloc::alloc::Global>]
|
|
|
|
// cdb-check: [<Raw View>] [Type: alloc::collections::vec_deque::VecDeque<i32,alloc::alloc::Global>]
|
2022-11-27 16:08:14 -06:00
|
|
|
// cdb-check: [len] : 0x2 [Type: unsigned [...]]
|
2021-07-14 15:50:11 -05:00
|
|
|
// cdb-check: [capacity] : 0x8 [Type: unsigned [...]]
|
2024-08-09 20:54:48 -05:00
|
|
|
// cdb-check: [0x0] : 90 [Type: i32]
|
|
|
|
// cdb-check: [0x1] : 20 [Type: i32]
|
2021-06-30 16:23:44 -05:00
|
|
|
|
2015-04-21 23:53:07 -05:00
|
|
|
#![allow(unused_variables)]
|
2021-06-30 16:23:44 -05:00
|
|
|
use std::collections::{LinkedList, VecDeque};
|
2017-06-02 08:18:00 -05:00
|
|
|
use std::ffi::OsString;
|
|
|
|
|
2015-03-12 11:05:44 -05:00
|
|
|
fn main() {
|
|
|
|
// &[]
|
|
|
|
let slice: &[i32] = &[0, 1, 2, 3];
|
|
|
|
|
|
|
|
// Vec
|
|
|
|
let vec = vec![4u64, 5, 6, 7];
|
|
|
|
|
|
|
|
// &str
|
|
|
|
let str_slice = "IAMA string slice!";
|
|
|
|
|
|
|
|
// String
|
|
|
|
let string = "IAMA string!".to_string();
|
|
|
|
|
2017-06-02 08:18:00 -05:00
|
|
|
// OsString
|
|
|
|
let os_string = OsString::from("IAMA OS string \u{1F603}");
|
|
|
|
|
2015-03-12 11:05:44 -05:00
|
|
|
// Option
|
|
|
|
let some = Some(8i16);
|
|
|
|
let none: Option<i64> = None;
|
|
|
|
|
2017-06-01 13:26:09 -05:00
|
|
|
let some_string = Some("IAMA optional string!".to_owned());
|
|
|
|
|
2021-06-30 16:23:44 -05:00
|
|
|
// LinkedList
|
|
|
|
let mut linkedlist = LinkedList::new();
|
|
|
|
linkedlist.push_back(42);
|
|
|
|
linkedlist.push_front(128);
|
|
|
|
|
|
|
|
// VecDeque
|
2022-11-27 16:08:14 -06:00
|
|
|
let mut vecdeque = VecDeque::with_capacity(8);
|
2021-06-30 16:23:44 -05:00
|
|
|
vecdeque.push_back(20);
|
|
|
|
vecdeque.push_front(90);
|
|
|
|
|
2015-03-12 11:05:44 -05:00
|
|
|
zzz(); // #break
|
|
|
|
}
|
|
|
|
|
2022-06-20 10:50:27 -05:00
|
|
|
fn zzz() {
|
|
|
|
()
|
|
|
|
}
|