Skip to content

Commit d59a793

Browse files
committed
Re-enable 16 debuginfo tests.
These tests were disabled four years ago; it appears that it was intended to be temporary. In that time their assertions have rotted. I've gone through and fixed the assertions where necessary and rehabilitated them. In several cases I've had to leave lldb disabled, because the lldb output has changed in ways that I don't understand. I figured gdb coverage was better than no coverage. It's worth noting that these tests being enabled would probably have caught the regression observed in rust-lang#90357.
1 parent 42af197 commit d59a793

15 files changed

+25
-34
lines changed

src/test/debuginfo/basic-types-globals-metadata.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54
// gdb-command:run
@@ -11,7 +10,7 @@
1110
// gdb-check:type = isize
1211
// gdbg-command:whatis 'basic_types_globals_metadata::C'
1312
// gdbr-command:whatis basic_types_globals_metadata::C
14-
// gdb-check:type = char
13+
// gdb-check:type = char32_t
1514
// gdbg-command:whatis 'basic_types_globals_metadata::I8'
1615
// gdbr-command:whatis basic_types_globals_metadata::I8
1716
// gdb-check:type = i8

src/test/debuginfo/basic-types-metadata.rs

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54
// gdb-command:run
@@ -10,7 +9,7 @@
109
// gdb-command:whatis i
1110
// gdb-check:type = isize
1211
// gdb-command:whatis c
13-
// gdb-check:type = char
12+
// gdb-check:type = char32_t
1413
// gdb-command:whatis i8
1514
// gdb-check:type = i8
1615
// gdb-command:whatis i16
@@ -34,31 +33,31 @@
3433
// gdb-command:whatis f64
3534
// gdb-check:type = f64
3635
// gdb-command:whatis fnptr
37-
// gdb-check:type = [...] (*)([...])
36+
// gdb-check:type = *mut fn ()
3837
// gdb-command:info functions _yyy
3938
// gdbg-check:[...]![...]_yyy([...]);
40-
// gdbr-check:static fn basic_types_metadata::_yyy() -> !;
39+
// gdbr-check:static fn basic_types_metadata::_yyy();
4140
// gdb-command:ptype closure_0
42-
// gdbr-check: type = struct closure
41+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#0}
4342
// gdbg-check: type = struct closure {
4443
// gdbg-check: <no data fields>
4544
// gdbg-check: }
4645
// gdb-command:ptype closure_1
4746
// gdbg-check: type = struct closure {
4847
// gdbg-check: bool *__0;
4948
// gdbg-check: }
50-
// gdbr-check: type = struct closure (
51-
// gdbr-check: bool *,
52-
// gdbr-check: )
49+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#1} {
50+
// gdbr-check: _ref__b: *mut bool,
51+
// gdbr-check: }
5352
// gdb-command:ptype closure_2
5453
// gdbg-check: type = struct closure {
5554
// gdbg-check: bool *__0;
5655
// gdbg-check: isize *__1;
5756
// gdbg-check: }
58-
// gdbr-check: type = struct closure (
59-
// gdbr-check: bool *,
60-
// gdbr-check: isize *,
61-
// gdbr-check: )
57+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#2} {
58+
// gdbr-check: _ref__b: *mut bool,
59+
// gdbr-check: _ref__i: *mut isize,
60+
// gdbr-check: }
6261

6362
//
6463
// gdb-command:continue

src/test/debuginfo/basic-types-mut-globals.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// its numerical value.
66

77
// min-lldb-version: 310
8-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
98

109
// compile-flags:-g
1110

@@ -21,7 +20,7 @@
2120
// gdbg-command:print/d 'basic_types_mut_globals::C'
2221
// gdbr-command:print C
2322
// gdbg-check:$3 = 97
24-
// gdbr-check:$3 = 97 'a'
23+
// gdbr-check:$3 = 97
2524
// gdbg-command:print/d 'basic_types_mut_globals::I8'
2625
// gdbr-command:print I8
2726
// gdb-check:$4 = 68
@@ -67,7 +66,7 @@
6766
// gdbg-command:print/d 'basic_types_mut_globals'::C
6867
// gdbr-command:print C
6968
// gdbg-check:$17 = 102
70-
// gdbr-check:$17 = 102 'f'
69+
// gdbr-check:$17 = 102
7170
// gdbg-command:print/d 'basic_types_mut_globals'::I8
7271
// gdbr-command:print/d I8
7372
// gdb-check:$18 = 78

src/test/debuginfo/by-value-non-immediate-argument.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
21
// min-lldb-version: 310
2+
// ignore-lldb
33

44
// compile-flags:-g
55

src/test/debuginfo/c-style-enum.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// ignore-aarch64
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32
// min-lldb-version: 310
43

54
// compile-flags:-g

src/test/debuginfo/function-arg-initialization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
21
// min-lldb-version: 310
2+
// ignore-lldb
33

44
// This test case checks if function arguments already have the correct value
55
// when breaking at the first line of the function, that is if the function

src/test/debuginfo/function-prologue-stepping-regular.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// This test case checks if function arguments already have the correct value when breaking at the
22
// beginning of a function.
33

4+
// ignore-lldb
5+
46
// min-lldb-version: 310
5-
// ignore-gdb
6-
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
77
// compile-flags:-g
88

99
// lldb-command:breakpoint set --name immediate_args

src/test/debuginfo/lexical-scopes-in-block-expression.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54

src/test/debuginfo/limited-debuginfo.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// ignore-lldb
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-C debuginfo=1
54

src/test/debuginfo/option-like-enum.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
2-
31
// min-lldb-version: 310
2+
// ignore-lldb
43

54
// compile-flags:-g
65

@@ -22,19 +21,21 @@
2221

2322
// gdbg-command:print empty_gdb->discr
2423
// gdbr-command:print empty_gdb.discr
25-
// gdb-check:$4 = (isize *) 0x0
24+
// gdbg-check:$4 = (isize *) 0x1
25+
// gdbr-check:$4 = (*mut isize) 0x1
2626

2727
// gdb-command:print droid
2828
// gdbg-check:$5 = {RUST$ENCODED$ENUM$2$Void = {id = 675675, range = 10000001, internals = 0x43218765}}
2929
// gdbr-check:$5 = option_like_enum::NamedFields::Droid{id: 675675, range: 10000001, internals: 0x43218765}
3030

3131
// gdbg-command:print void_droid_gdb->internals
3232
// gdbr-command:print void_droid_gdb.internals
33-
// gdb-check:$6 = (isize *) 0x0
33+
// gdbg-check:$6 = (isize *) 0x0
34+
// gdbr-check:$6 = (*mut isize) 0x0
3435

3536
// gdb-command:print nested_non_zero_yep
3637
// gdbg-check:$7 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = 10.5, __1 = {a = 10, b = 20, c = [...]}}}
37-
// gdbr-check:$7 = option_like_enum::NestedNonZero::Yep(10.5, option_like_enum::NestedNonZeroField {a: 10, b: 20, c: 0x[...] "x[...]"})
38+
// gdbr-check:$7 = option_like_enum::NestedNonZero::Yep(10.5, option_like_enum::NestedNonZeroField {a: 10, b: 20, c: 0x[...]})
3839

3940
// gdb-command:print nested_non_zero_nope
4041
// gdbg-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = [...], __1 = {a = [...], b = [...], c = 0x0}}}

src/test/debuginfo/simple-struct.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54

src/test/debuginfo/simple-tuple.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54

src/test/debuginfo/struct-in-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// min-lldb-version: 310
22
// ignore-gdb-version: 7.11.90 - 7.12.9
3-
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
3+
// ignore-lldb
44

55
// compile-flags:-g
66

src/test/debuginfo/union-smoke.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// ignore-gdb-version: 7.11.90 - 7.12.9
54

src/test/debuginfo/vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// min-lldb-version: 310
2-
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
32

43
// compile-flags:-g
54

0 commit comments

Comments
 (0)