Skip to content

Commit d626fbd

Browse files
committed
Auto merge of #128913 - saethlin:unignore-debuginfo-tests, r=compiler-errors
Enable debuginfo tests that have been "temporarily disabled" for the past 6 years The PR history is a bit of a mess because I had to test this a lot with try-jobs, so I'll try to summarize the non-obvious changes here. A number of tests now have `min-lldb-version: 1800`. Those tests should have gotten an lldb version jump either in #124781 or long ago. Note that all such tests with that lldb version requirement do not run in Apple CI. `tests/debuginfo/drop-locations.rs` is staying disabled for now because gdb doesn't know to stop on the drop calls produced by a `}`: #128971 `tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: #128945 `tests/debuginfo/by-value-non-immediate-argument.rs` fails because we don't generate a function prelude for unused non-immediate arguments, even with all optimizations disabled, and this seems to confuse debuggers on aarch64: #128973 `tests/debuginfo/pretty-std.rs` is staying disabled on windows-gnu because our test harness doesn't know how to load our pretty-printers on that target: #128981 `tests/debuginfo/method-on-enum.rs` and `tests/debuginfo/option-like-enum.rs` encounter some kind of gdb bug on i686-pc-windows-gnu. I don't know enough about that situation to write a good issue. I plan on doing more work on this test suite. There's clearly a lot more basic cleanup work to do here.
2 parents 69e36d6 + 23273e0 commit d626fbd

23 files changed

+48
-72
lines changed

tests/debuginfo/basic-types-globals-metadata.rs

Lines changed: 0 additions & 1 deletion
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

Lines changed: 10 additions & 11 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 4 additions & 5 deletions
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-
//@ min-lldb-version: 310
3-
1+
//@ min-lldb-version: 1800
2+
//@ min-gdb-version: 13.0
43
//@ compile-flags:-g
54

65
// === GDB TESTS ===================================================================================
@@ -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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 4 deletions
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

Lines changed: 0 additions & 4 deletions
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

Lines changed: 2 additions & 3 deletions
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: #128971
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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
2-
//@ min-lldb-version: 310
3-
41
// This test case checks if function arguments already have the correct value
52
// when breaking at the first line of the function, that is if the function
63
// prologue has already been executed at the first line. Note that because of
74
// the __morestack part of the prologue GDB incorrectly breaks at before the
85
// arguments have been properly loaded when setting the breakpoint via the
96
// function name.
107

11-
//@ compile-flags:-g
8+
//@ min-lldb-version: 1800
9+
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts
10+
// SingleUseConsts shouldn't need to be disabled, see #128945
1211

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

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

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

4-
//@ min-lldb-version: 310
4+
//@ min-lldb-version: 1800
55
//@ ignore-gdb
6-
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
76
//@ compile-flags:-g
87

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

0 commit comments

Comments
 (0)