Skip to content
Open
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
6 changes: 6 additions & 0 deletions src/tools/compiletest/src/directives/directive_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"build-aux-docs",
"build-fail",
"build-pass",
"cdb-check",
"cdb-command",
"check-fail",
"check-pass",
"check-run-results",
Expand All @@ -33,6 +35,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"filecheck-flags",
"forbid-output",
"force-host",
"gdb-check",
"gdb-command",
"ignore-16bit",
"ignore-32bit",
"ignore-64bit",
Expand Down Expand Up @@ -133,6 +137,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-x86_64-unknown-linux-gnu",
"incremental",
"known-bug",
"lldb-check",
"lldb-command",
"llvm-cov-flags",
"max-llvm-major-version",
"min-cdb-version",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest/debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl DebuggerCommands {
continue;
}

let Some(line) = line.trim_start().strip_prefix("//").map(str::trim_start) else {
let Some(line) = line.trim_start().strip_prefix("//@").map(str::trim_start) else {
continue;
};

Expand Down
6 changes: 3 additions & 3 deletions src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
"//@ compile-flags",
"// error-pattern",
"//@ error-pattern",
"// gdb",
"// lldb",
"// cdb",
"//@ gdb",
"//@ lldb",
"//@ cdb",
"//@ normalize-stderr",
];

Expand Down
124 changes: 62 additions & 62 deletions tests/debuginfo/associated-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,70 @@
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================
// gdb-command:run

// gdb-command:print arg
// gdb-check:$1 = associated_types::Struct<i32> {b: -1, b1: 0}
// gdb-command:continue

// gdb-command:print inferred
// gdb-check:$2 = 1
// gdb-command:print explicitly
// gdb-check:$3 = 1
// gdb-command:continue

// gdb-command:print arg
// gdb-check:$4 = 2
// gdb-command:continue

// gdb-command:print arg
// gdb-check:$5 = (4, 5)
// gdb-command:continue

// gdb-command:print a
// gdb-check:$6 = 6
// gdb-command:print b
// gdb-check:$7 = 7
// gdb-command:continue

// gdb-command:print a
// gdb-check:$8 = 8
// gdb-command:print b
// gdb-check:$9 = 9
// gdb-command:continue
//@ gdb-command:run

//@ gdb-command:print arg
//@ gdb-check:$1 = associated_types::Struct<i32> {b: -1, b1: 0}
//@ gdb-command:continue

//@ gdb-command:print inferred
//@ gdb-check:$2 = 1
//@ gdb-command:print explicitly
//@ gdb-check:$3 = 1
//@ gdb-command:continue

//@ gdb-command:print arg
//@ gdb-check:$4 = 2
//@ gdb-command:continue

//@ gdb-command:print arg
//@ gdb-check:$5 = (4, 5)
//@ gdb-command:continue

//@ gdb-command:print a
//@ gdb-check:$6 = 6
//@ gdb-command:print b
//@ gdb-check:$7 = 7
//@ gdb-command:continue

//@ gdb-command:print a
//@ gdb-check:$8 = 8
//@ gdb-command:print b
//@ gdb-check:$9 = 9
//@ gdb-command:continue

// === LLDB TESTS ==================================================================================
// lldb-command:run

// lldb-command:v arg
// lldb-check:[...] { b = -1 b1 = 0 }
// lldb-command:continue

// lldb-command:v inferred
// lldb-check:[...] 1
// lldb-command:v explicitly
// lldb-check:[...] 1
// lldb-command:continue

// lldb-command:v arg
// lldb-check:[...] 2
// lldb-command:continue

// lldb-command:v arg
// lldb-check:[...] { 0 = 4 1 = 5 }
// lldb-command:continue

// lldb-command:v a
// lldb-check:[...] 6
// lldb-command:v b
// lldb-check:[...] 7
// lldb-command:continue

// lldb-command:v a
// lldb-check:[...] 8
// lldb-command:v b
// lldb-check:[...] 9
// lldb-command:continue
//@ lldb-command:run

//@ lldb-command:v arg
//@ lldb-check:[...] { b = -1 b1 = 0 }
//@ lldb-command:continue

//@ lldb-command:v inferred
//@ lldb-check:[...] 1
//@ lldb-command:v explicitly
//@ lldb-check:[...] 1
//@ lldb-command:continue

//@ lldb-command:v arg
//@ lldb-check:[...] 2
//@ lldb-command:continue

//@ lldb-command:v arg
//@ lldb-check:[...] { 0 = 4 1 = 5 }
//@ lldb-command:continue

//@ lldb-command:v a
//@ lldb-check:[...] 6
//@ lldb-command:v b
//@ lldb-check:[...] 7
//@ lldb-command:continue

//@ lldb-command:v a
//@ lldb-check:[...] 8
//@ lldb-command:v b
//@ lldb-check:[...] 9
//@ lldb-command:continue

#![allow(unused_variables)]
#![allow(dead_code)]
Expand Down
28 changes: 14 additions & 14 deletions tests/debuginfo/basic-stepping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
//@ compile-flags: -g
//@ ignore-backends: gcc

// gdb-command: run
//@ gdb-command: run
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
// FIXME(#97083): Right now the first breakable line is:
// gdb-check: let mut c = 27;
// gdb-command: next
// gdb-check: let d = c = 99;
// gdb-command: next
//@ gdb-check: let mut c = 27;
//@ gdb-command: next
//@ gdb-check: let d = c = 99;
//@ gdb-command: next
// FIXME(#33013): gdb-check: let e = "hi bob";
// FIXME(#33013): gdb-command: next
// FIXME(#33013): gdb-check: let f = b"hi bob";
Expand All @@ -23,15 +23,15 @@
// FIXME(#33013): gdb-command: next
// FIXME(#33013): gdb-check: let h = ["whatever"; 8];
// FIXME(#33013): gdb-command: next
// gdb-check: let i = [1,2,3,4];
// gdb-command: next
// gdb-check: let j = (23, "hi");
// gdb-command: next
// gdb-check: let k = 2..3;
// gdb-command: next
// gdb-check: let l = &i[k];
// gdb-command: next
// gdb-check: let m: *const() = &a;
//@ gdb-check: let i = [1,2,3,4];
//@ gdb-command: next
//@ gdb-check: let j = (23, "hi");
//@ gdb-command: next
//@ gdb-check: let k = 2..3;
//@ gdb-command: next
//@ gdb-check: let l = &i[k];
//@ gdb-command: next
//@ gdb-check: let m: *const() = &a;

fn main () {
let a = (); // #break
Expand Down
64 changes: 32 additions & 32 deletions tests/debuginfo/basic-types-globals-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// gdb-command:run
// gdb-command:whatis basic_types_globals_metadata::B
// gdb-check:type = bool
// gdb-command:whatis basic_types_globals_metadata::I
// gdb-check:type = isize
// gdb-command:whatis basic_types_globals_metadata::C
// gdb-check:type = char
// gdb-command:whatis basic_types_globals_metadata::I8
// gdb-check:type = i8
// gdb-command:whatis basic_types_globals_metadata::I16
// gdb-check:type = i16
// gdb-command:whatis basic_types_globals_metadata::I32
// gdb-check:type = i32
// gdb-command:whatis basic_types_globals_metadata::I64
// gdb-check:type = i64
// gdb-command:whatis basic_types_globals_metadata::U
// gdb-check:type = usize
// gdb-command:whatis basic_types_globals_metadata::U8
// gdb-check:type = u8
// gdb-command:whatis basic_types_globals_metadata::U16
// gdb-check:type = u16
// gdb-command:whatis basic_types_globals_metadata::U32
// gdb-check:type = u32
// gdb-command:whatis basic_types_globals_metadata::U64
// gdb-check:type = u64
// gdb-command:whatis basic_types_globals_metadata::F16
// gdb-check:type = f16
// gdb-command:whatis basic_types_globals_metadata::F32
// gdb-check:type = f32
// gdb-command:whatis basic_types_globals_metadata::F64
// gdb-check:type = f64
// gdb-command:continue
//@ gdb-command:run
//@ gdb-command:whatis basic_types_globals_metadata::B
//@ gdb-check:type = bool
//@ gdb-command:whatis basic_types_globals_metadata::I
//@ gdb-check:type = isize
//@ gdb-command:whatis basic_types_globals_metadata::C
//@ gdb-check:type = char
//@ gdb-command:whatis basic_types_globals_metadata::I8
//@ gdb-check:type = i8
//@ gdb-command:whatis basic_types_globals_metadata::I16
//@ gdb-check:type = i16
//@ gdb-command:whatis basic_types_globals_metadata::I32
//@ gdb-check:type = i32
//@ gdb-command:whatis basic_types_globals_metadata::I64
//@ gdb-check:type = i64
//@ gdb-command:whatis basic_types_globals_metadata::U
//@ gdb-check:type = usize
//@ gdb-command:whatis basic_types_globals_metadata::U8
//@ gdb-check:type = u8
//@ gdb-command:whatis basic_types_globals_metadata::U16
//@ gdb-check:type = u16
//@ gdb-command:whatis basic_types_globals_metadata::U32
//@ gdb-check:type = u32
//@ gdb-command:whatis basic_types_globals_metadata::U64
//@ gdb-check:type = u64
//@ gdb-command:whatis basic_types_globals_metadata::F16
//@ gdb-check:type = f16
//@ gdb-command:whatis basic_types_globals_metadata::F32
//@ gdb-check:type = f32
//@ gdb-command:whatis basic_types_globals_metadata::F64
//@ gdb-check:type = f64
//@ gdb-command:continue

#![allow(unused_variables)]
#![allow(dead_code)]
Expand Down
Loading
Loading