Skip to content

Commit ecaa186

Browse files
committed
Auto merge of rust-lang#128913 - saethlin:unignore-debuginfo-tests, r=<try>
Enable debuginfo tests that were "temporarily disabled" for the past 6 years `tests/debuginfo/drop-locations.rs` No idea why we are setting `-O -Cno-prepopulate-passes`. Nowadays that turns on MIR opts, no idea what it did in 2018. Turning off optimizations makes just loc2 missing. That seems like a bug in debuginfo generation. Turning off all MIR opts and even adding a `drop(s)` on that line doesn't help. Cursed. Keeping this test ignored. `tests/debuginfo/option-like-enum.rs` Debuggers are better at Rust! Also one inexplicable change. No idea why we used to expect that. Deleted. `tests/debuginfo/function-arg-initialization.rs` SingleUseConsts produces incoherent gdb behavior. Seems like a bug. `tests/debuginfo/macro-stepping.rs` Also broken by SingleUseConsts. I hate tests like this, nobody uses a debugger on code that's just assigning consts to unused variables. Test should be rewritten with realistic code. `tests/debuginfo/basic-types-metadata.rs` Debuggers are better at Rust! Diverging functions don't have -> ! in their whatis output anymore? Not sure if that is a bug. try-job: aarch64-apple
2 parents 48090b1 + b37d94f commit ecaa186

20 files changed

+23
-52
lines changed

tests/debuginfo/basic-types-globals-metadata.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
// gdb-command:run

tests/debuginfo/basic-types-metadata.rs

+10-11
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
@@ -36,31 +35,31 @@
3635
// gdb-command:whatis f64
3736
// gdb-check:type = f64
3837
// gdb-command:whatis fnptr
39-
// gdb-check:type = [...] (*)([...])
38+
// gdb-check:type = *mut fn ()
4039
// gdb-command:info functions _yyy
4140
// gdbg-check:[...]![...]_yyy([...]);
42-
// gdbr-check:static fn basic_types_metadata::_yyy() -> !;
41+
// gdbr-check:static fn basic_types_metadata::_yyy();
4342
// gdb-command:ptype closure_0
44-
// gdbr-check: type = struct closure
43+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#0}
4544
// gdbg-check: type = struct closure {
4645
// gdbg-check: <no data fields>
4746
// gdbg-check: }
4847
// gdb-command:ptype closure_1
4948
// gdbg-check: type = struct closure {
5049
// gdbg-check: bool *__0;
5150
// gdbg-check: }
52-
// gdbr-check: type = struct closure (
53-
// gdbr-check: bool *,
54-
// gdbr-check: )
51+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#1} {
52+
// gdbr-check: *mut bool,
53+
// gdbr-check: }
5554
// gdb-command:ptype closure_2
5655
// gdbg-check: type = struct closure {
5756
// gdbg-check: bool *__0;
5857
// gdbg-check: isize *__1;
5958
// gdbg-check: }
60-
// gdbr-check: type = struct closure (
61-
// gdbr-check: bool *,
62-
// gdbr-check: isize *,
63-
// gdbr-check: )
59+
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#2} {
60+
// gdbr-check: *mut bool,
61+
// gdbr-check: *mut isize,
62+
// gdbr-check: }
6463

6564
//
6665
// gdb-command:continue

tests/debuginfo/basic-types.rs

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
//@ min-lldb-version: 310
88

9-
// This fails on lldb 6.0.1 on x86-64 Fedora 28; so ignore Linux for now.
10-
//@ ignore-linux
11-
129
//@ compile-flags:-g
1310

1411
// === GDB TESTS ===================================================================================

tests/debuginfo/by-value-non-immediate-argument.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
21
//@ min-lldb-version: 310
32

4-
//@ compile-flags:-g
3+
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts
54

65
// === GDB TESTS ===================================================================================
76

@@ -42,11 +41,11 @@
4241
// lldb-command:run
4342

4443
// lldb-command:v s
45-
// lldb-check:[...] Struct { a: 1, b: 2.5 }
44+
// lldb-check:[...] Struct { a = 1 b = 2.5 }
4645
// lldb-command:continue
4746

4847
// lldb-command:v x
49-
// lldb-check:[...] Struct { a: 3, b: 4.5 }
48+
// lldb-check:[...] Struct { a = 3 b = 4.5 }
5049
// lldb-command:v y
5150
// lldb-check:[...] 5
5251
// lldb-command:v z

tests/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

tests/debuginfo/cross-crate-spans.rs

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33

44
//@ min-lldb-version: 310
55

6-
// This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only
7-
// for now.
8-
//@ only-macos
9-
106
//@ aux-build:cross_crate_spans.rs
117
extern crate cross_crate_spans;
128

tests/debuginfo/destructured-for-loop-variable.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
//@ min-lldb-version: 310
22

3-
// This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only
4-
// for now.
5-
//@ only-macos
6-
73
//@ compile-flags:-g
84

95
// === GDB TESTS ===================================================================================

tests/debuginfo/drop-locations.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
//@ ignore-windows
22
//@ ignore-android
3-
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
43
//@ min-lldb-version: 310
4+
//@ ignore-test
55

66
#![allow(unused)]
77

8-
//@ compile-flags:-g -O -C no-prepopulate-passes
9-
// -O -C no-prepopulate-passes added to work around https://bugs.llvm.org/show_bug.cgi?id=32123
8+
//@ compile-flags:-g
109

1110
// This test checks that drop glue code gets attributed to scope's closing brace,
1211
// and function epilogues - to function's closing brace.

tests/debuginfo/function-arg-initialization.rs

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

43
// This test case checks if function arguments already have the correct value
@@ -8,7 +7,7 @@
87
// arguments have been properly loaded when setting the breakpoint via the
98
// function name.
109

11-
//@ compile-flags:-g
10+
//@ compile-flags:-g -Zmir-opt-level=0
1211

1312
// === GDB TESTS ===================================================================================
1413

tests/debuginfo/function-prologue-stepping-regular.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
//@ min-lldb-version: 310
55
//@ ignore-gdb
6-
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
7-
//@ compile-flags:-g
6+
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts
87

98
// lldb-command:breakpoint set --name immediate_args
109
// lldb-command:breakpoint set --name non_immediate_args

tests/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

tests/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

tests/debuginfo/macro-stepping.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//@ ignore-android
33
//@ ignore-aarch64
44
//@ min-lldb-version: 310
5-
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
65

76
//@ aux-build:macro-stepping.rs
87

@@ -11,7 +10,7 @@
1110
#[macro_use]
1211
extern crate macro_stepping; // exports new_scope!()
1312

14-
//@ compile-flags:-g
13+
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts
1514

1615
// === GDB TESTS ===================================================================================
1716

tests/debuginfo/method-on-enum.rs

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

4-
//@ compile-flags:-g
3+
//@ compile-flags:-g -Zmir-opt-level=0
54

65
// === GDB TESTS ===================================================================================
76

tests/debuginfo/option-like-enum.rs

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

53
//@ compile-flags:-g
@@ -22,19 +20,19 @@
2220

2321
// gdbg-command:print empty_gdb->discr
2422
// gdbr-command:print empty_gdb.discr
25-
// gdb-check:$4 = (isize *) 0x0
23+
// gdb-check:$4 = (*mut isize) 0x1
2624

2725
// gdb-command:print droid
2826
// gdbg-check:$5 = {RUST$ENCODED$ENUM$2$Void = {id = 675675, range = 10000001, internals = 0x43218765}}
2927
// gdbr-check:$5 = option_like_enum::NamedFields::Droid{id: 675675, range: 10000001, internals: 0x43218765}
3028

3129
// gdbg-command:print void_droid_gdb->internals
3230
// gdbr-command:print void_droid_gdb.internals
33-
// gdb-check:$6 = (isize *) 0x0
31+
// gdb-check:$6 = (*mut isize) 0x1
3432

3533
// gdb-command:print nested_non_zero_yep
3634
// 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[...]"})
35+
// gdbr-check:$7 = option_like_enum::NestedNonZero::Yep(10.5, option_like_enum::NestedNonZeroField {a: 10, b: 20, c: 0x[...]})
3836

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

tests/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 -Zmir-enable-passes=-CheckAlignment
54

tests/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

tests/debuginfo/struct-in-enum.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
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
43

5-
//@ compile-flags:-g
4+
//@ compile-flags:-g -Zmir-opt-level=0
65

76
// === GDB TESTS ===================================================================================
87

tests/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

tests/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)