Skip to content

Commit f2a3542

Browse files
committed
Auto merge of rust-lang#133115 - jieyouxu:cdb, r=chrisdenton
Update cdb annotations for some debuginfo tests with cdb `10.0.26100.2161` GitHub CI runners [recently updated to Windows Server 2022 (20241113)](https://github.com/actions/runner-images/releases/tag/win22%2F20241113.3) which included Windows Software Development Kit version `10.1.26100.1742`, which transitively shipped a `cdb` version `10.0.26100.2161`. This changed some cdb output, causing 3 debuginfo tests to fail (see rust-lang#133107, https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/msvc.20update.20causing.20debuginfo.20failures): ``` tests\debuginfo\numeric-types.rs tests\debuginfo\range-types.rs tests\debuginfo\unit-type.rs ``` I updated cdb annotations for these 3 tests locally with a matching `cdb` version. However, I am not by any means a cdb expert nor debuginfo expert, I just reblessed the tests to match whatever the new cdb version produces to unblock the tree. It is certainly possible that debuginfo improved/regressed/both with the newer cdb version. try-job: x86_64-msvc
2 parents 46e8d20 + dccb6c0 commit f2a3542

File tree

3 files changed

+55
-40
lines changed

3 files changed

+55
-40
lines changed

Diff for: tests/debuginfo/numeric-types.rs

+35-29
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
//@ ignore-windows-gnu: #128981
44

5+
// Note: u128 visualization was not supported in 10.0.22621.3233 but was fixed in 10.0.26100.2161.
6+
7+
// FIXME(#133107): this is temporarily marked as `only-64bit` because of course 32-bit msvc has
8+
// a different integer width and thus underlying integer type display. Only marked as such to
9+
// unblock the tree.
10+
//@ only-64bit
11+
//@ min-cdb-version: 10.0.26100.2161
12+
513
// Tests the visualizations for `NonZero<T>`, `Wrapping<T>` and
614
// `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`.
715

@@ -48,8 +56,8 @@
4856
// cdb-check:nz_u64 : 0x64 [Type: core::num::nonzero::NonZero<u64>]
4957
// cdb-check: [<Raw View>] [Type: core::num::nonzero::NonZero<u64>]
5058

51-
// 128-bit integers don't seem to work in CDB
5259
// cdb-command: dx nz_u128
60+
// cdb-check:nz_u128 : 111 [Type: core::num::nonzero::NonZero<u128>]
5361
// cdb-check: [<Raw View>] [Type: core::num::nonzero::NonZero<u128>]
5462

5563
// cdb-command: dx nz_usize
@@ -58,101 +66,99 @@
5866

5967
// cdb-command: dx w_i8
6068
// cdb-check:w_i8 : 10 [Type: core::num::wrapping::Wrapping<i8>]
61-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i8>]
69+
// cdb-check: [+0x000] __0 : 10 [Type: char]
6270

6371
// cdb-command: dx w_i16
6472
// cdb-check:w_i16 : 20 [Type: core::num::wrapping::Wrapping<i16>]
65-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i16>]
73+
// cdb-check: [+0x000] __0 : 20 [Type: short]
6674

6775
// cdb-command: dx w_i32
6876
// cdb-check:w_i32 : 30 [Type: core::num::wrapping::Wrapping<i32>]
69-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i32>]
77+
// cdb-check: [+0x000] __0 : 30 [Type: int]
7078

7179
// cdb-command: dx w_i64
7280
// cdb-check:w_i64 : 40 [Type: core::num::wrapping::Wrapping<i64>]
73-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i64>]
81+
// cdb-check: [+0x000] __0 : 40 [Type: __int64]
7482

75-
// 128-bit integers don't seem to work in CDB
7683
// cdb-command: dx w_i128
77-
// cdb-check:w_i128 [Type: core::num::wrapping::Wrapping<i128>]
78-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i128>]
84+
// cdb-check:w_i128 : 50 [Type: core::num::wrapping::Wrapping<i128>]
85+
// cdb-check: [+0x000] __0 : 50 [Type: i128]
7986

8087
// cdb-command: dx w_isize
8188
// cdb-check:w_isize : 60 [Type: core::num::wrapping::Wrapping<isize>]
82-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<isize>]
89+
// cdb-check: [+0x000] __0 : 60 [Type: __int64]
8390

8491
// cdb-command: dx w_u8
8592
// cdb-check:w_u8 : 0x46 [Type: core::num::wrapping::Wrapping<u8>]
86-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u8>]
93+
// cdb-check: [+0x000] __0 : 0x46 [Type: unsigned char]
8794

8895
// cdb-command: dx w_u16
8996
// cdb-check:w_u16 : 0x50 [Type: core::num::wrapping::Wrapping<u16>]
90-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u16>]
97+
// cdb-check: [+0x000] __0 : 0x50 [Type: unsigned short]
9198

9299
// cdb-command: dx w_u32
93100
// cdb-check:w_u32 : 0x5a [Type: core::num::wrapping::Wrapping<u32>]
94-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u32>]
101+
// cdb-check: [+0x000] __0 : 0x5a [Type: unsigned int]
95102

96103
// cdb-command: dx w_u64
97104
// cdb-check:w_u64 : 0x64 [Type: core::num::wrapping::Wrapping<u64>]
98-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u64>]
105+
// cdb-check: [+0x000] __0 : 0x64 [Type: unsigned __int64]
99106

100-
// 128-bit integers don't seem to work in CDB
101107
// cdb-command: dx w_u128
102-
// cdb-check:w_u128 [Type: core::num::wrapping::Wrapping<u128>]
103-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u128>]
108+
// cdb-check:w_u128 : 110 [Type: core::num::wrapping::Wrapping<u128>]
109+
// cdb-check: [+0x000] __0 : 110 [Type: u128]
104110

105111
// cdb-command: dx w_usize
106112
// cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping<usize>]
107-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<usize>]
113+
// cdb-check: [+0x000] __0 : 0x78 [Type: unsigned __int64]
108114

109115
// cdb-command: dx a_bool_t
110116
// cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool]
111-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool]
117+
// cdb-check: [+0x000] v : 0x1 [Type: core::cell::UnsafeCell<u8>]
112118

113119
// cdb-command: dx a_bool_f
114120
// cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool]
115-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool]
121+
// cdb-check: [+0x000] v : 0x0 [Type: core::cell::UnsafeCell<u8>]
116122

117123
// cdb-command: dx a_i8
118124
// cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8]
119-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI8]
125+
// cdb-check: [+0x000] v : 2 [Type: core::cell::UnsafeCell<i8>]
120126

121127
// cdb-command: dx a_i16
122128
// cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16]
123-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI16]
129+
// cdb-check: [+0x000] v : 4 [Type: core::cell::UnsafeCell<i16>]
124130

125131
// cdb-command: dx a_i32
126132
// cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32]
127-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI32]
133+
// cdb-check: [+0x000] v : 8 [Type: core::cell::UnsafeCell<i32>]
128134

129135
// cdb-command: dx a_i64
130136
// cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64]
131-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI64]
137+
// cdb-check: [+0x000] v : 16 [Type: core::cell::UnsafeCell<i64>]
132138

133139
// cdb-command: dx a_isize
134140
// cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize]
135-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicIsize]
141+
// cdb-check: [+0x000] v : 32 [Type: core::cell::UnsafeCell<isize>]
136142

137143
// cdb-command: dx a_u8
138144
// cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8]
139-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU8]
145+
// cdb-check: [+0x000] v : 0x40 [Type: core::cell::UnsafeCell<u8>]
140146

141147
// cdb-command: dx a_u16
142148
// cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16]
143-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU16]
149+
// cdb-check: [+0x000] v : 0x80 [Type: core::cell::UnsafeCell<u16>]
144150

145151
// cdb-command: dx a_u32
146152
// cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32]
147-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU32]
153+
// cdb-check: [+0x000] v : 0x100 [Type: core::cell::UnsafeCell<u32>]
148154

149155
// cdb-command: dx a_u64
150156
// cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64]
151-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU64]
157+
// cdb-check: [+0x000] v : 0x200 [Type: core::cell::UnsafeCell<u64>]
152158

153159
// cdb-command: dx a_usize
154160
// cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize]
155-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicUsize]
161+
// cdb-check: [+0x000] v : 0x400 [Type: core::cell::UnsafeCell<usize>]
156162

157163

158164
// === GDB TESTS ===================================================================================

Diff for: tests/debuginfo/range-types.rs

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// Testing the display of range types in cdb.
22

3-
// cdb-only
4-
//@ min-cdb-version: 10.0.18317.1001
3+
//@ only-cdb
4+
5+
// FIXME(jieyouxu): triple check in CI if the directive actually works
6+
//@ min-cdb-version: 10.0.26100.2161
7+
58
//@ compile-flags:-g
69

710
// === CDB TESTS ==================================================================================
@@ -10,23 +13,26 @@
1013

1114
// cdb-command: dx r1,d
1215
// cdb-check:r1,d : (3..5) [Type: core::ops::range::Range<i32>]
13-
// cdb-check: [<Raw View>] [Type: core::ops::range::Range<i32>]
16+
// cdb-check: [+0x000] start : 3 [Type: int]
17+
// cdb-check: [+0x004] end : 5 [Type: int]
1418

1519
// cdb-command: dx r2,d
1620
// cdb-check:r2,d : (2..) [Type: core::ops::range::RangeFrom<i32>]
17-
// cdb-check: [<Raw View>] [Type: core::ops::range::RangeFrom<i32>]
21+
// cdb-check: [+0x000] start : 2 [Type: int]
1822

1923
// cdb-command: dx r3,d
2024
// cdb-check:r3,d : (1..=4) [Type: core::ops::range::RangeInclusive<i32>]
21-
// cdb-check: [<Raw View>] [Type: core::ops::range::RangeInclusive<i32>]
25+
// cdb-check: [+0x000] start : 1 [Type: int]
26+
// cdb-check: [+0x004] end : 4 [Type: int]
27+
// cdb-check: [+0x008] exhausted : false [Type: bool]
2228

2329
// cdb-command: dx r4,d
2430
// cdb-check:r4,d : (..10) [Type: core::ops::range::RangeTo<i32>]
25-
// cdb-check: [<Raw View>] [Type: core::ops::range::RangeTo<i32>]
31+
// cdb-check: [+0x000] end : 10 [Type: int]
2632

2733
// cdb-command: dx r5,d
2834
// cdb-check:r5,d : (..=3) [Type: core::ops::range::RangeToInclusive<i32>]
29-
// cdb-check: [<Raw View>] [Type: core::ops::range::RangeToInclusive<i32>]
35+
// cdb-check: [+0x000] end : 3 [Type: int]
3036

3137
// cdb-command: dx r6,d
3238
// cdb-check:r6,d [Type: core::ops::range::RangeFull]

Diff for: tests/debuginfo/unit-type.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@ compile-flags:-g
22

3+
// FIXME(jieyouxu): triple check if this works in CI
4+
//@ min-cdb-version: 10.0.26100.2161
5+
36
// === GDB TESTS ===================================================================================
47

58
// gdb-command: run
@@ -26,18 +29,18 @@
2629
// cdb-check: Breakpoint 0 hit
2730

2831
// cdb-command: dx _ref
29-
// cdb-check: _ref : 0x[...] : () [Type: tuple$<> *]
32+
// cdb-check: _ref : 0x[...] [Type: tuple$<> *]
3033

3134
// cdb-command: dx _ptr
32-
// cdb-check: _ptr : 0x[...] : () [Type: tuple$<> *]
35+
// cdb-check: _ptr : 0x[...] [Type: tuple$<> *]
3336

3437
// cdb-command: dx _local
35-
// cdb-check: _local : () [Type: tuple$<>]
38+
// cdb-check: _local [Type: tuple$<>]
3639

3740
// cdb-command: dx _field,d
3841
// cdb-check: _field,d [Type: unit_type::_TypeContainingUnitField]
3942
// cdb-check: [+0x[...]] _a : 123 [Type: unsigned int]
40-
// cdb-check: [+0x[...]] _unit : () [Type: tuple$<>]
43+
// cdb-check: [+0x[...]] _unit [Type: tuple$<>]
4144
// cdb-check: [+0x[...]] _b : 456 [Type: unsigned __int64]
4245

4346
// Check that we can cast "void pointers" to their actual type in the debugger

0 commit comments

Comments
 (0)