Skip to content

Commit f0b30ab

Browse files
committed
Auto merge of rust-lang#133115 - jieyouxu:cdb, r=<try>
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: ``` tests\debuginfo\numeric-types.rs tests\debuginfo\range-types.rs tests\debuginfo\unit-type.rs ``` I reblessed 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. try-job: x86_64-msvc
2 parents 46e8d20 + e70df09 commit f0b30ab

File tree

3 files changed

+52
-40
lines changed

3 files changed

+52
-40
lines changed

tests/debuginfo/numeric-types.rs

+32-29
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
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+
// FIXME(jieyouxu): triple-check if this annotation works properly in CI, because it seems to
7+
// ignore the test locally for me.
8+
//@ min-cdb-version: 10.0.26100.2161
9+
510
// Tests the visualizations for `NonZero<T>`, `Wrapping<T>` and
611
// `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`.
712

@@ -48,8 +53,8 @@
4853
// cdb-check:nz_u64 : 0x64 [Type: core::num::nonzero::NonZero<u64>]
4954
// cdb-check: [<Raw View>] [Type: core::num::nonzero::NonZero<u64>]
5055

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

5560
// cdb-command: dx nz_usize
@@ -58,101 +63,99 @@
5863

5964
// cdb-command: dx w_i8
6065
// cdb-check:w_i8 : 10 [Type: core::num::wrapping::Wrapping<i8>]
61-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i8>]
66+
// cdb-check: [+0x000] __0 : 10 [Type: char]
6267

6368
// cdb-command: dx w_i16
6469
// cdb-check:w_i16 : 20 [Type: core::num::wrapping::Wrapping<i16>]
65-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i16>]
70+
// cdb-check: [+0x000] __0 : 20 [Type: short]
6671

6772
// cdb-command: dx w_i32
6873
// cdb-check:w_i32 : 30 [Type: core::num::wrapping::Wrapping<i32>]
69-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i32>]
74+
// cdb-check: [+0x000] __0 : 30 [Type: int]
7075

7176
// cdb-command: dx w_i64
7277
// cdb-check:w_i64 : 40 [Type: core::num::wrapping::Wrapping<i64>]
73-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i64>]
78+
// cdb-check: [+0x000] __0 : 40 [Type: __int64]
7479

75-
// 128-bit integers don't seem to work in CDB
7680
// 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>]
81+
// cdb-check:w_i128 : 50 [Type: core::num::wrapping::Wrapping<i128>]
82+
// cdb-check: [+0x000] __0 : 50 [Type: i128]
7983

8084
// cdb-command: dx w_isize
8185
// cdb-check:w_isize : 60 [Type: core::num::wrapping::Wrapping<isize>]
82-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<isize>]
86+
// cdb-check: [+0x000] __0 : 60 [Type: __int64]
8387

8488
// cdb-command: dx w_u8
8589
// cdb-check:w_u8 : 0x46 [Type: core::num::wrapping::Wrapping<u8>]
86-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u8>]
90+
// cdb-check: [+0x000] __0 : 0x46 [Type: unsigned char]
8791

8892
// cdb-command: dx w_u16
8993
// cdb-check:w_u16 : 0x50 [Type: core::num::wrapping::Wrapping<u16>]
90-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u16>]
94+
// cdb-check: [+0x000] __0 : 0x50 [Type: unsigned short]
9195

9296
// cdb-command: dx w_u32
9397
// cdb-check:w_u32 : 0x5a [Type: core::num::wrapping::Wrapping<u32>]
94-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u32>]
98+
// cdb-check: [+0x000] __0 : 0x5a [Type: unsigned int]
9599

96100
// cdb-command: dx w_u64
97101
// cdb-check:w_u64 : 0x64 [Type: core::num::wrapping::Wrapping<u64>]
98-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u64>]
102+
// cdb-check: [+0x000] __0 : 0x64 [Type: unsigned __int64]
99103

100-
// 128-bit integers don't seem to work in CDB
101104
// 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>]
105+
// cdb-check:w_u128 : 110 [Type: core::num::wrapping::Wrapping<u128>]
106+
// cdb-check: [+0x000] __0 : 110 [Type: u128]
104107

105108
// cdb-command: dx w_usize
106109
// cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping<usize>]
107-
// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<usize>]
110+
// cdb-check: [+0x000] __0 : 0x78 [Type: unsigned __int64]
108111

109112
// cdb-command: dx a_bool_t
110113
// cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool]
111-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool]
114+
// cdb-check: [+0x000] v : 0x1 [Type: core::cell::UnsafeCell<u8>]
112115

113116
// cdb-command: dx a_bool_f
114117
// cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool]
115-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool]
118+
// cdb-check: [+0x000] v : 0x0 [Type: core::cell::UnsafeCell<u8>]
116119

117120
// cdb-command: dx a_i8
118121
// cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8]
119-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI8]
122+
// cdb-check: [+0x000] v : 2 [Type: core::cell::UnsafeCell<i8>]
120123

121124
// cdb-command: dx a_i16
122125
// cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16]
123-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI16]
126+
// cdb-check: [+0x000] v : 4 [Type: core::cell::UnsafeCell<i16>]
124127

125128
// cdb-command: dx a_i32
126129
// cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32]
127-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI32]
130+
// cdb-check: [+0x000] v : 8 [Type: core::cell::UnsafeCell<i32>]
128131

129132
// cdb-command: dx a_i64
130133
// cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64]
131-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI64]
134+
// cdb-check: [+0x000] v : 16 [Type: core::cell::UnsafeCell<i64>]
132135

133136
// cdb-command: dx a_isize
134137
// cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize]
135-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicIsize]
138+
// cdb-check: [+0x000] v : 32 [Type: core::cell::UnsafeCell<isize>]
136139

137140
// cdb-command: dx a_u8
138141
// cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8]
139-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU8]
142+
// cdb-check: [+0x000] v : 0x40 [Type: core::cell::UnsafeCell<u8>]
140143

141144
// cdb-command: dx a_u16
142145
// cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16]
143-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU16]
146+
// cdb-check: [+0x000] v : 0x80 [Type: core::cell::UnsafeCell<u16>]
144147

145148
// cdb-command: dx a_u32
146149
// cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32]
147-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU32]
150+
// cdb-check: [+0x000] v : 0x100 [Type: core::cell::UnsafeCell<u32>]
148151

149152
// cdb-command: dx a_u64
150153
// cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64]
151-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU64]
154+
// cdb-check: [+0x000] v : 0x200 [Type: core::cell::UnsafeCell<u64>]
152155

153156
// cdb-command: dx a_usize
154157
// cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize]
155-
// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicUsize]
158+
// cdb-check: [+0x000] v : 0x400 [Type: core::cell::UnsafeCell<usize>]
156159

157160

158161
// === GDB TESTS ===================================================================================

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]

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)