Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 22bcad6

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. --- More failures on apple! `tests/debuginfo/by-value-non-immediate-argument.rs` `tests/debuginfo/function-arg-initialization.rs` `tests/debuginfo/function-prologue-stepping-regular.rs` I think all of these indicate that lldb on aarch64-apple does not understand indirect by-value non-immediate arguments. Is that known? `tests/debuginfo/method-on-enum.rs` `tests/debuginfo/option-like-enum.rs` `tests/debuginfo/struct-in-enum.rs` lldb on aarch64-apple can't print enums until at least llvm 18. We use an old lldb on apple. try-job: aarch64-apple
2 parents 04ba50e + 1b68bca commit 22bcad6

21 files changed

+38
-70
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: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
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
42
//@ compile-flags:-g
53

64
// === GDB TESTS ===================================================================================
@@ -42,11 +40,11 @@
4240
// lldb-command:run
4341

4442
// lldb-command:v s
45-
// lldb-check:[...] Struct { a: 1, b: 2.5 }
43+
// lldb-check:[...] Struct { a = 1 b = 2.5 }
4644
// lldb-command:continue
4745

4846
// lldb-command:v x
49-
// lldb-check:[...] Struct { a: 3, b: 4.5 }
47+
// lldb-check:[...] Struct { a = 3 b = 4.5 }
5048
// lldb-command:v y
5149
// lldb-check:[...] 5
5250
// 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
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: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
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
1210

1311
// === GDB TESTS ===================================================================================
1412

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)