Skip to content

Re-enable some gdb tests #95138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/test/debuginfo/basic-types-globals-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g
// gdb-command:run
Expand All @@ -9,9 +8,10 @@
// gdbg-command:whatis 'basic_types_globals_metadata::I'
// gdbr-command:whatis basic_types_globals_metadata::I
// gdb-check:type = isize
// gdbg-command:whatis 'basic_types_globals_metadata::C'
// gdbr-command:whatis basic_types_globals_metadata::C
// gdb-check:type = char

// Note we don't check the 'char' type here, as gdb only got support
// for DW_ATE_UTF in 11.2. This is handled by a different test.

// gdbg-command:whatis 'basic_types_globals_metadata::I8'
// gdbr-command:whatis basic_types_globals_metadata::I8
// gdb-check:type = i8
Expand Down
14 changes: 3 additions & 11 deletions src/test/debuginfo/basic-types-globals.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
// as its numerical value along with its associated ASCII char, there
// doesn't seem to be any way around this. Also, gdb doesn't know
// about UTF-32 character encoding and will print a rust char as only
// its numerical value.

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

// compile-flags:-g
// gdb-command:run
Expand All @@ -15,10 +8,9 @@
// gdbg-command:print 'basic_types_globals::I'
// gdbr-command:print I
// gdb-check:$2 = -1
// gdbg-command:print 'basic_types_globals::C'
// gdbr-command:print C
// gdbg-check:$3 = 97
// gdbr-check:$3 = 97 'a'
// gdbg-command:print/d 'basic_types_globals::C'
// gdbr-command:print/d C
// gdb-check:$3 = 97
// gdbg-command:print/d 'basic_types_globals::I8'
// gdbr-command:print I8
// gdb-check:$4 = 68
Expand Down
35 changes: 12 additions & 23 deletions src/test/debuginfo/basic-types-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g
// gdb-command:run
Expand All @@ -9,8 +8,10 @@
// gdb-check:type = bool
// gdb-command:whatis i
// gdb-check:type = isize
// gdb-command:whatis c
// gdb-check:type = char

// Note we don't check the 'char' type here, as gdb only got support
// for DW_ATE_UTF in 11.2. This is handled by a different test.

// gdb-command:whatis i8
// gdb-check:type = i8
// gdb-command:whatis i16
Expand All @@ -34,31 +35,19 @@
// gdb-command:whatis f64
// gdb-check:type = f64
// gdb-command:whatis fnptr
// gdb-check:type = [...] (*)([...])
// gdb-check:type = [...] ([...])
// gdb-command:info functions _yyy
// gdbg-check:[...]![...]_yyy([...]);
// gdbr-check:static fn basic_types_metadata::_yyy() -> !;
// gdbr-check:static fn basic_types_metadata::_yyy()[...]

// Just check that something is emitted, this changed already once and
// it's not extremely informative.
// gdb-command:ptype closure_0
// gdbr-check: type = struct closure
// gdbg-check: type = struct closure {
// gdbg-check: <no data fields>
// gdbg-check: }
// gdb-check: type = [...]closure[...]
// gdb-command:ptype closure_1
// gdbg-check: type = struct closure {
// gdbg-check: bool *__0;
// gdbg-check: }
// gdbr-check: type = struct closure (
// gdbr-check: bool *,
// gdbr-check: )
// gdb-check: type = [...]closure[...]
// gdb-command:ptype closure_2
// gdbg-check: type = struct closure {
// gdbg-check: bool *__0;
// gdbg-check: isize *__1;
// gdbg-check: }
// gdbr-check: type = struct closure (
// gdbr-check: bool *,
// gdbr-check: isize *,
// gdbr-check: )
// gdb-check: type = [...]closure[...]

//
// gdb-command:continue
Expand Down
17 changes: 4 additions & 13 deletions src/test/debuginfo/basic-types-mut-globals.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
// as its numerical value along with its associated ASCII char, there
// doesn't seem to be any way around this. Also, gdb doesn't know
// about UTF-32 character encoding and will print a rust char as only
// its numerical value.

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

// compile-flags:-g

Expand All @@ -19,9 +12,8 @@
// gdbr-command:print I
// gdb-check:$2 = -1
// gdbg-command:print/d 'basic_types_mut_globals::C'
// gdbr-command:print C
// gdbg-check:$3 = 97
// gdbr-check:$3 = 97 'a'
// gdbr-command:print/d C
// gdb-check:$3 = 97
// gdbg-command:print/d 'basic_types_mut_globals::I8'
// gdbr-command:print I8
// gdb-check:$4 = 68
Expand Down Expand Up @@ -65,9 +57,8 @@
// gdbr-command:print I
// gdb-check:$16 = 2
// gdbg-command:print/d 'basic_types_mut_globals'::C
// gdbr-command:print C
// gdbg-check:$17 = 102
// gdbr-check:$17 = 102 'f'
// gdbr-command:print/d C
// gdb-check:$17 = 102
// gdbg-command:print/d 'basic_types_mut_globals'::I8
// gdbr-command:print/d I8
// gdb-check:$18 = 78
Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/by-value-non-immediate-argument.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// ignore-lldb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// min-lldb-version: 310

// compile-flags:-g
Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/c-style-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-aarch64
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// min-lldb-version: 310

// compile-flags:-g
Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/function-arg-initialization.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// ignore-lldb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// min-lldb-version: 310

// This test case checks if function arguments already have the correct value
Expand Down
8 changes: 8 additions & 0 deletions src/test/debuginfo/gdb-char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@
// gdb-command:run
// gdb-command:print ch
// gdb-check:$1 = 97 'a'
// gdb-command:whatis ch
// gdb-check:type = char
// gdb-command:whatis gdb_char::C
// gdb-check:type = char

#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]

static mut C: char = 'a';

fn main() {
let ch: char = 'a';

zzz(); // #break

let a = unsafe { (C, ) };
}

fn zzz() {()}
1 change: 0 additions & 1 deletion src/test/debuginfo/lexical-scopes-in-block-expression.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/limited-debuginfo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-lldb
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-C debuginfo=1

Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/method-on-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// min-lldb-version: 310
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// ignore-lldb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down
8 changes: 4 additions & 4 deletions src/test/debuginfo/option-like-enum.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// ignore-lldb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// min-lldb-version: 310

Expand All @@ -22,19 +22,19 @@

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

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

// gdbg-command:print void_droid_gdb->internals
// gdbr-command:print void_droid_gdb.internals
// gdb-check:$6 = (isize *) 0x0
// gdb-check:$6 = (*mut isize) 0x0

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

// gdb-command:print nested_non_zero_nope
// gdbg-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = [...], __1 = {a = [...], b = [...], c = 0x0}}}
Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/simple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/simple-tuple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/struct-in-enum.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// min-lldb-version: 310
// ignore-gdb-version: 7.11.90 - 7.12.9
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// ignore-lldb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/union-smoke.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// ignore-gdb-version: 7.11.90 - 7.12.9

Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/vec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// min-lldb-version: 310
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

// compile-flags:-g

Expand Down