From 17d8ae32d1caa712ffca7c3c722982616bfeba70 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Fri, 17 Oct 2025 06:19:58 +0200 Subject: [PATCH] compiletest: Use `//@` prefixes also for debuginfo test directives So that when we later add support for revisions we can use the same syntax for revisions as elsewhere. This also prevents people from making typos for commands since `src/tools/compiletest/src/directives/directive_names.rs` will catch such typos now. Note that we one FIXME for a non-trivial change for later: ``` // FIXME(148097): Change `// cdb-checksimple_closure` to `//@ cdb-check:simple_closure` ``` --- .../src/directives/directive_names.rs | 6 + src/tools/compiletest/src/runtest/debugger.rs | 2 +- src/tools/tidy/src/style.rs | 6 +- tests/debuginfo/associated-types.rs | 124 ++-- tests/debuginfo/basic-stepping.rs | 28 +- .../debuginfo/basic-types-globals-metadata.rs | 64 +- tests/debuginfo/basic-types-globals.rs | 126 ++-- tests/debuginfo/basic-types-metadata.rs | 99 ++- tests/debuginfo/basic-types-mut-globals.rs | 124 ++-- tests/debuginfo/basic-types.rs | 188 +++--- tests/debuginfo/borrowed-basic.rs | 120 ++-- tests/debuginfo/borrowed-c-style-enum.rs | 28 +- tests/debuginfo/borrowed-enum.rs | 28 +- tests/debuginfo/borrowed-struct.rs | 60 +- tests/debuginfo/borrowed-tuple.rs | 28 +- tests/debuginfo/borrowed-unique-basic.rs | 124 ++-- tests/debuginfo/box.rs | 20 +- tests/debuginfo/boxed-struct.rs | 20 +- .../by-value-non-immediate-argument.rs | 80 +-- .../by-value-self-argument-in-trait-impl.rs | 40 +- tests/debuginfo/c-style-enum-in-composite.rs | 60 +- tests/debuginfo/c-style-enum.rs | 104 ++-- tests/debuginfo/captured-fields-1.rs | 76 +-- tests/debuginfo/captured-fields-2.rs | 28 +- .../debuginfo/closure-in-generic-function.rs | 44 +- tests/debuginfo/closures.rs | 89 +-- .../collapse-debuginfo-external-attr.rs | 10 +- ...buginfo-external-flag-overriden-by-attr.rs | 14 +- .../collapse-debuginfo-external-flag.rs | 10 +- ...ollapse-debuginfo-in-non-collapse-macro.rs | 88 +-- tests/debuginfo/collapse-debuginfo-no-attr.rs | 28 +- .../collapse-debuginfo-static-external.rs | 4 +- tests/debuginfo/collapse-debuginfo-static.rs | 4 +- .../collapse-debuginfo-with-attr-flag.rs | 28 +- .../debuginfo/collapse-debuginfo-with-attr.rs | 22 +- .../collapse-debuginfo-with-yes-flag.rs | 22 +- tests/debuginfo/constant-ordering-prologue.rs | 32 +- tests/debuginfo/coroutine-closure.rs | 10 +- tests/debuginfo/coroutine-locals.rs | 76 +-- tests/debuginfo/coroutine-objects.rs | 76 +-- tests/debuginfo/cross-crate-spans.rs | 68 +- tests/debuginfo/destructured-fn-argument.rs | 580 +++++++++--------- .../destructured-for-loop-variable.rs | 224 +++---- tests/debuginfo/destructured-local.rs | 444 +++++++------- tests/debuginfo/drop-locations.rs | 80 +-- tests/debuginfo/dummy_span.rs | 28 +- tests/debuginfo/duration-type.rs | 12 +- tests/debuginfo/embedded-visualizer.rs | 80 +-- tests/debuginfo/empty-string.rs | 20 +- tests/debuginfo/enum-thinlto.rs | 12 +- tests/debuginfo/evec-in-struct.rs | 44 +- tests/debuginfo/extern-c-fn.rs | 48 +- tests/debuginfo/f16-natvis.rs | 58 +- tests/debuginfo/fixed-sized-array.rs | 30 +- tests/debuginfo/fn_ptr.rs | 32 +- .../debuginfo/function-arg-initialization.rs | 304 ++++----- tests/debuginfo/function-arguments.rs | 44 +- tests/debuginfo/function-call.rs | 14 +- tests/debuginfo/function-names.rs | 90 +-- .../function-prologue-stepping-regular.rs | 174 +++--- tests/debuginfo/gdb-char.rs | 6 +- .../debuginfo/gdb-pretty-struct-and-enums.rs | 22 +- .../generic-enum-with-different-disr-sizes.rs | 78 +-- tests/debuginfo/generic-function.rs | 64 +- tests/debuginfo/generic-functions-nested.rs | 92 +-- .../generic-method-on-generic-struct.rs | 144 ++--- ...eneric-static-method-on-struct-and-enum.rs | 26 +- tests/debuginfo/generic-struct-style-enum.rs | 20 +- tests/debuginfo/generic-struct.rs | 72 +-- tests/debuginfo/generic-tuple-style-enum.rs | 30 +- tests/debuginfo/include_string.rs | 32 +- tests/debuginfo/issue-12886.rs | 8 +- tests/debuginfo/issue-22656.rs | 10 +- tests/debuginfo/issue-57822.rs | 20 +- tests/debuginfo/lexical-scope-in-for-loop.rs | 88 +-- tests/debuginfo/lexical-scope-in-if-let.rs | 120 ++-- tests/debuginfo/lexical-scope-in-if.rs | 164 ++--- tests/debuginfo/lexical-scope-in-match.rs | 212 +++---- .../lexical-scope-in-parameterless-closure.rs | 4 +- .../lexical-scope-in-stack-closure.rs | 76 +-- .../lexical-scope-in-unconditional-loop.rs | 160 ++--- .../lexical-scope-in-unique-closure.rs | 76 +-- tests/debuginfo/lexical-scope-in-while.rs | 160 ++--- tests/debuginfo/lexical-scope-with-macro.rs | 180 +++--- .../lexical-scopes-in-block-expression.rs | 580 +++++++++--------- tests/debuginfo/limited-debuginfo.rs | 18 +- tests/debuginfo/macro-stepping.rs | 130 ++-- tests/debuginfo/marker-types.rs | 46 +- tests/debuginfo/method-on-enum.rs | 144 ++--- tests/debuginfo/method-on-generic-struct.rs | 144 ++--- tests/debuginfo/method-on-struct.rs | 144 ++--- tests/debuginfo/method-on-trait.rs | 144 ++--- tests/debuginfo/method-on-tuple-struct.rs | 144 ++--- tests/debuginfo/msvc-pretty-enums.rs | 398 ++++++------ tests/debuginfo/msvc-scalarpair-params.rs | 102 +-- tests/debuginfo/multi-cgu.rs | 28 +- tests/debuginfo/multiline-calls.rs | 16 +- .../multiple-functions-equal-var-names.rs | 36 +- tests/debuginfo/multiple-functions.rs | 36 +- tests/debuginfo/mutable-locs.rs | 92 +-- tests/debuginfo/mutex.rs | 24 +- .../name-shadowing-and-scope-nesting.rs | 148 ++--- tests/debuginfo/no_mangle-info.rs | 30 +- tests/debuginfo/numeric-types.rs | 316 +++++----- tests/debuginfo/opt/dead_refs.rs | 28 +- tests/debuginfo/option-like-enum.rs | 78 +-- .../packed-struct-with-destructor.rs | 68 +- tests/debuginfo/packed-struct.rs | 52 +- tests/debuginfo/path.rs | 20 +- tests/debuginfo/pretty-huge-vec.rs | 10 +- tests/debuginfo/pretty-slices.rs | 36 +- .../debuginfo/pretty-std-collections-hash.rs | 136 ++-- tests/debuginfo/pretty-std-collections.rs | 72 +-- tests/debuginfo/pretty-std.rs | 218 +++---- tests/debuginfo/pretty-uninitialized-vec.rs | 6 +- tests/debuginfo/range-types.rs | 42 +- tests/debuginfo/rc_arc.rs | 174 +++--- tests/debuginfo/recursive-enum.rs | 2 +- tests/debuginfo/recursive-struct.rs | 96 +-- tests/debuginfo/reference-debuginfo.rs | 128 ++-- .../regression-bad-location-list-67992.rs | 12 +- tests/debuginfo/result-types.rs | 14 +- tests/debuginfo/rwlock-read.rs | 18 +- tests/debuginfo/rwlock-write.rs | 10 +- tests/debuginfo/self-in-default-method.rs | 144 ++--- .../self-in-generic-default-method.rs | 144 ++--- tests/debuginfo/shadowed-argument.rs | 70 +-- tests/debuginfo/shadowed-variable.rs | 124 ++-- tests/debuginfo/should-fail.rs | 18 +- tests/debuginfo/simd.rs | 44 +- tests/debuginfo/simple-lexical-scope.rs | 88 +-- tests/debuginfo/simple-struct.rs | 102 +-- tests/debuginfo/simple-tuple.rs | 208 +++---- tests/debuginfo/skip_second_statement.rs | 158 ++--- .../skip_second_statement_collapse.rs | 158 ++--- .../static-method-on-struct-and-enum.rs | 52 +- tests/debuginfo/step-into-match.rs | 442 ++++++------- tests/debuginfo/strings-and-strs.rs | 44 +- tests/debuginfo/struct-in-enum.rs | 30 +- tests/debuginfo/struct-in-struct.rs | 48 +- tests/debuginfo/struct-namespace.rs | 20 +- tests/debuginfo/struct-style-enum.rs | 38 +- tests/debuginfo/struct-with-destructor.rs | 36 +- tests/debuginfo/thread-names.rs | 26 +- tests/debuginfo/thread.rs | 14 +- tests/debuginfo/trait-pointers.rs | 4 +- tests/debuginfo/tuple-in-struct.rs | 52 +- tests/debuginfo/tuple-in-tuple.rs | 186 +++--- tests/debuginfo/tuple-struct.rs | 52 +- tests/debuginfo/tuple-style-enum.rs | 38 +- tests/debuginfo/type-names.rs | 340 +++++----- tests/debuginfo/union-smoke.rs | 20 +- tests/debuginfo/unique-enum.rs | 28 +- tests/debuginfo/unit-type.rs | 54 +- tests/debuginfo/unsized.rs | 58 +- .../var-captured-in-nested-closure.rs | 206 +++---- .../var-captured-in-sendable-closure.rs | 36 +- .../var-captured-in-stack-closure.rs | 176 +++--- tests/debuginfo/vec-slices.rs | 110 ++-- tests/debuginfo/vec.rs | 16 +- .../debuginfo/zst-interferes-with-prologue.rs | 28 +- 161 files changed, 6874 insertions(+), 6868 deletions(-) diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index 44bf9611064ae..1107d30fdbee4 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -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", @@ -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", @@ -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", diff --git a/src/tools/compiletest/src/runtest/debugger.rs b/src/tools/compiletest/src/runtest/debugger.rs index 3d439e98eb7e1..00935ab57d1c3 100644 --- a/src/tools/compiletest/src/runtest/debugger.rs +++ b/src/tools/compiletest/src/runtest/debugger.rs @@ -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; }; diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 7bb424d926c26..23f30e8dab3b3 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -67,9 +67,9 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[ "//@ compile-flags", "// error-pattern", "//@ error-pattern", - "// gdb", - "// lldb", - "// cdb", + "//@ gdb", + "//@ lldb", + "//@ cdb", "//@ normalize-stderr", ]; diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs index e74a592662d2a..ac994b9d5ebcd 100644 --- a/tests/debuginfo/associated-types.rs +++ b/tests/debuginfo/associated-types.rs @@ -3,70 +3,70 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print arg -// gdb-check:$1 = associated_types::Struct {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 {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)] diff --git a/tests/debuginfo/basic-stepping.rs b/tests/debuginfo/basic-stepping.rs index aa9f29259d05a..5e4d1105b9853 100644 --- a/tests/debuginfo/basic-stepping.rs +++ b/tests/debuginfo/basic-stepping.rs @@ -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"; @@ -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 diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs index cc32b338da728..3f1d9fd5de278 100644 --- a/tests/debuginfo/basic-types-globals-metadata.rs +++ b/tests/debuginfo/basic-types-globals-metadata.rs @@ -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)] diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs index d8997b3f75a9f..ea9dad6ab92d4 100644 --- a/tests/debuginfo/basic-types-globals.rs +++ b/tests/debuginfo/basic-types-globals.rs @@ -7,70 +7,70 @@ //@ [lto] no-prefer-dynamic //@ ignore-backends: gcc -// lldb-command:run -// lldb-command:v B -// lldb-check: ::B::[...] = false -// lldb-command:v I -// lldb-check: ::I::[...] = -1 -// lldb-command:v --format=d C -// lldb-check: ::C::[...] = 97 -// lldb-command:v --format=d I8 -// lldb-check: ::I8::[...] = 68 -// lldb-command:v I16 -// lldb-check: ::I16::[...] = -16 -// lldb-command:v I32 -// lldb-check: ::I32::[...] = -32 -// lldb-command:v I64 -// lldb-check: ::I64::[...] = -64 -// lldb-command:v U -// lldb-check: ::U::[...] = 1 -// lldb-command:v --format=d U8 -// lldb-check: ::U8::[...] = 100 -// lldb-command:v U16 -// lldb-check: ::U16::[...] = 16 -// lldb-command:v U32 -// lldb-check: ::U32::[...] = 32 -// lldb-command:v U64 -// lldb-check: ::U64::[...] = 64 -// lldb-command:v F16 -// lldb-check: ::F16::[...] = 1.5 -// lldb-command:v F32 -// lldb-check: ::F32::[...] = 2.5 -// lldb-command:v F64 -// lldb-check: ::F64::[...] = 3.5 +//@ lldb-command:run +//@ lldb-command:v B +//@ lldb-check: ::B::[...] = false +//@ lldb-command:v I +//@ lldb-check: ::I::[...] = -1 +//@ lldb-command:v --format=d C +//@ lldb-check: ::C::[...] = 97 +//@ lldb-command:v --format=d I8 +//@ lldb-check: ::I8::[...] = 68 +//@ lldb-command:v I16 +//@ lldb-check: ::I16::[...] = -16 +//@ lldb-command:v I32 +//@ lldb-check: ::I32::[...] = -32 +//@ lldb-command:v I64 +//@ lldb-check: ::I64::[...] = -64 +//@ lldb-command:v U +//@ lldb-check: ::U::[...] = 1 +//@ lldb-command:v --format=d U8 +//@ lldb-check: ::U8::[...] = 100 +//@ lldb-command:v U16 +//@ lldb-check: ::U16::[...] = 16 +//@ lldb-command:v U32 +//@ lldb-check: ::U32::[...] = 32 +//@ lldb-command:v U64 +//@ lldb-check: ::U64::[...] = 64 +//@ lldb-command:v F16 +//@ lldb-check: ::F16::[...] = 1.5 +//@ lldb-command:v F32 +//@ lldb-check: ::F32::[...] = 2.5 +//@ lldb-command:v F64 +//@ lldb-check: ::F64::[...] = 3.5 -// gdb-command:run -// gdb-command:print B -// gdb-check:$1 = false -// gdb-command:print I -// gdb-check:$2 = -1 -// gdb-command:print/d C -// gdb-check:$3 = 97 -// gdb-command:print I8 -// gdb-check:$4 = 68 -// gdb-command:print I16 -// gdb-check:$5 = -16 -// gdb-command:print I32 -// gdb-check:$6 = -32 -// gdb-command:print I64 -// gdb-check:$7 = -64 -// gdb-command:print U -// gdb-check:$8 = 1 -// gdb-command:print U8 -// gdb-check:$9 = 100 -// gdb-command:print U16 -// gdb-check:$10 = 16 -// gdb-command:print U32 -// gdb-check:$11 = 32 -// gdb-command:print U64 -// gdb-check:$12 = 64 -// gdb-command:print F16 -// gdb-check:$13 = 1.5 -// gdb-command:print F32 -// gdb-check:$14 = 2.5 -// gdb-command:print F64 -// gdb-check:$15 = 3.5 -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:print B +//@ gdb-check:$1 = false +//@ gdb-command:print I +//@ gdb-check:$2 = -1 +//@ gdb-command:print/d C +//@ gdb-check:$3 = 97 +//@ gdb-command:print I8 +//@ gdb-check:$4 = 68 +//@ gdb-command:print I16 +//@ gdb-check:$5 = -16 +//@ gdb-command:print I32 +//@ gdb-check:$6 = -32 +//@ gdb-command:print I64 +//@ gdb-check:$7 = -64 +//@ gdb-command:print U +//@ gdb-check:$8 = 1 +//@ gdb-command:print U8 +//@ gdb-check:$9 = 100 +//@ gdb-command:print U16 +//@ gdb-check:$10 = 16 +//@ gdb-command:print U32 +//@ gdb-check:$11 = 32 +//@ gdb-command:print U64 +//@ gdb-check:$12 = 64 +//@ gdb-command:print F16 +//@ gdb-check:$13 = 1.5 +//@ gdb-command:print F32 +//@ gdb-check:$14 = 2.5 +//@ gdb-command:print F64 +//@ gdb-check:$15 = 3.5 +//@ gdb-command:continue #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/basic-types-metadata.rs b/tests/debuginfo/basic-types-metadata.rs index 495ef81a16c6b..d3a3d03ef7424 100644 --- a/tests/debuginfo/basic-types-metadata.rs +++ b/tests/debuginfo/basic-types-metadata.rs @@ -2,57 +2,56 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run -// gdb-command:whatis unit -// gdb-check:type = () -// gdb-command:whatis b -// gdb-check:type = bool -// gdb-command:whatis i -// gdb-check:type = isize -// gdb-command:whatis c -// gdb-check:type = char -// gdb-command:whatis i8 -// gdb-check:type = i8 -// gdb-command:whatis i16 -// gdb-check:type = i16 -// gdb-command:whatis i32 -// gdb-check:type = i32 -// gdb-command:whatis i64 -// gdb-check:type = i64 -// gdb-command:whatis u -// gdb-check:type = usize -// gdb-command:whatis u8 -// gdb-check:type = u8 -// gdb-command:whatis u16 -// gdb-check:type = u16 -// gdb-command:whatis u32 -// gdb-check:type = u32 -// gdb-command:whatis u64 -// gdb-check:type = u64 -// gdb-command:whatis f16 -// gdb-check:type = f16 -// gdb-command:whatis f32 -// gdb-check:type = f32 -// gdb-command:whatis f64 -// gdb-check:type = f64 -// gdb-command:whatis fnptr -// gdb-check:type = *mut fn () -// gdb-command:info functions _yyy -// gdb-check:static fn basic_types_metadata::_yyy(); -// gdb-command:ptype closure_0 -// gdb-check: type = struct basic_types_metadata::main::{closure_env#0} -// gdb-command:ptype closure_1 -// gdb-check: type = struct basic_types_metadata::main::{closure_env#1} { -// gdb-check: *mut bool, -// gdb-check: } -// gdb-command:ptype closure_2 -// gdb-check: type = struct basic_types_metadata::main::{closure_env#2} { -// gdb-check: *mut bool, -// gdb-check: *mut isize, -// gdb-check: } +//@ gdb-command:run +//@ gdb-command:whatis unit +//@ gdb-check:type = () +//@ gdb-command:whatis b +//@ gdb-check:type = bool +//@ gdb-command:whatis i +//@ gdb-check:type = isize +//@ gdb-command:whatis c +//@ gdb-check:type = char +//@ gdb-command:whatis i8 +//@ gdb-check:type = i8 +//@ gdb-command:whatis i16 +//@ gdb-check:type = i16 +//@ gdb-command:whatis i32 +//@ gdb-check:type = i32 +//@ gdb-command:whatis i64 +//@ gdb-check:type = i64 +//@ gdb-command:whatis u +//@ gdb-check:type = usize +//@ gdb-command:whatis u8 +//@ gdb-check:type = u8 +//@ gdb-command:whatis u16 +//@ gdb-check:type = u16 +//@ gdb-command:whatis u32 +//@ gdb-check:type = u32 +//@ gdb-command:whatis u64 +//@ gdb-check:type = u64 +//@ gdb-command:whatis f16 +//@ gdb-check:type = f16 +//@ gdb-command:whatis f32 +//@ gdb-check:type = f32 +//@ gdb-command:whatis f64 +//@ gdb-check:type = f64 +//@ gdb-command:whatis fnptr +//@ gdb-check:type = *mut fn () +//@ gdb-command:info functions _yyy +//@ gdb-check:static fn basic_types_metadata::_yyy(); +//@ gdb-command:ptype closure_0 +//@ gdb-check: type = struct basic_types_metadata::main::{closure_env#0} +//@ gdb-command:ptype closure_1 +//@ gdb-check: type = struct basic_types_metadata::main::{closure_env#1} { +//@ gdb-check: *mut bool, +//@ gdb-check: } +//@ gdb-command:ptype closure_2 +//@ gdb-check: type = struct basic_types_metadata::main::{closure_env#2} { +//@ gdb-check: *mut bool, +//@ gdb-check: *mut isize, +//@ gdb-check: } -// -// gdb-command:continue +//@ gdb-command:continue #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/basic-types-mut-globals.rs b/tests/debuginfo/basic-types-mut-globals.rs index 6617f91c3df53..c3cc7be549d47 100644 --- a/tests/debuginfo/basic-types-mut-globals.rs +++ b/tests/debuginfo/basic-types-mut-globals.rs @@ -8,72 +8,72 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run +//@ gdb-command:run // Check initializers -// gdb-command:print B -// gdb-check:$1 = false -// gdb-command:print I -// gdb-check:$2 = -1 -// gdb-command:print C -// gdb-check:$3 = 97 'a' -// gdb-command:print I8 -// gdb-check:$4 = 68 -// gdb-command:print I16 -// gdb-check:$5 = -16 -// gdb-command:print I32 -// gdb-check:$6 = -32 -// gdb-command:print I64 -// gdb-check:$7 = -64 -// gdb-command:print U -// gdb-check:$8 = 1 -// gdb-command:print U8 -// gdb-check:$9 = 100 -// gdb-command:print U16 -// gdb-check:$10 = 16 -// gdb-command:print U32 -// gdb-check:$11 = 32 -// gdb-command:print U64 -// gdb-check:$12 = 64 -// gdb-command:print F16 -// gdb-check:$13 = 1.5 -// gdb-command:print F32 -// gdb-check:$14 = 2.5 -// gdb-command:print F64 -// gdb-check:$15 = 3.5 -// gdb-command:continue +//@ gdb-command:print B +//@ gdb-check:$1 = false +//@ gdb-command:print I +//@ gdb-check:$2 = -1 +//@ gdb-command:print C +//@ gdb-check:$3 = 97 'a' +//@ gdb-command:print I8 +//@ gdb-check:$4 = 68 +//@ gdb-command:print I16 +//@ gdb-check:$5 = -16 +//@ gdb-command:print I32 +//@ gdb-check:$6 = -32 +//@ gdb-command:print I64 +//@ gdb-check:$7 = -64 +//@ gdb-command:print U +//@ gdb-check:$8 = 1 +//@ gdb-command:print U8 +//@ gdb-check:$9 = 100 +//@ gdb-command:print U16 +//@ gdb-check:$10 = 16 +//@ gdb-command:print U32 +//@ gdb-check:$11 = 32 +//@ gdb-command:print U64 +//@ gdb-check:$12 = 64 +//@ gdb-command:print F16 +//@ gdb-check:$13 = 1.5 +//@ gdb-command:print F32 +//@ gdb-check:$14 = 2.5 +//@ gdb-command:print F64 +//@ gdb-check:$15 = 3.5 +//@ gdb-command:continue // Check new values -// gdb-command:print B -// gdb-check:$16 = true -// gdb-command:print I -// gdb-check:$17 = 2 -// gdb-command:print C -// gdb-check:$18 = 102 'f' -// gdb-command:print/d I8 -// gdb-check:$19 = 78 -// gdb-command:print I16 -// gdb-check:$20 = -26 -// gdb-command:print I32 -// gdb-check:$21 = -12 -// gdb-command:print I64 -// gdb-check:$22 = -54 -// gdb-command:print U -// gdb-check:$23 = 5 -// gdb-command:print/d U8 -// gdb-check:$24 = 20 -// gdb-command:print U16 -// gdb-check:$25 = 32 -// gdb-command:print U32 -// gdb-check:$26 = 16 -// gdb-command:print U64 -// gdb-check:$27 = 128 -// gdb-command:print F16 -// gdb-check:$28 = 2.25 -// gdb-command:print F32 -// gdb-check:$29 = 5.75 -// gdb-command:print F64 -// gdb-check:$30 = 9.25 +//@ gdb-command:print B +//@ gdb-check:$16 = true +//@ gdb-command:print I +//@ gdb-check:$17 = 2 +//@ gdb-command:print C +//@ gdb-check:$18 = 102 'f' +//@ gdb-command:print/d I8 +//@ gdb-check:$19 = 78 +//@ gdb-command:print I16 +//@ gdb-check:$20 = -26 +//@ gdb-command:print I32 +//@ gdb-check:$21 = -12 +//@ gdb-command:print I64 +//@ gdb-check:$22 = -54 +//@ gdb-command:print U +//@ gdb-check:$23 = 5 +//@ gdb-command:print/d U8 +//@ gdb-check:$24 = 20 +//@ gdb-command:print U16 +//@ gdb-check:$25 = 32 +//@ gdb-command:print U32 +//@ gdb-check:$26 = 16 +//@ gdb-command:print U64 +//@ gdb-check:$27 = 128 +//@ gdb-command:print F16 +//@ gdb-check:$28 = 2.25 +//@ gdb-command:print F32 +//@ gdb-check:$29 = 5.75 +//@ gdb-command:print F64 +//@ gdb-check:$30 = 9.25 #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs index 9b1452fab4135..eea5c68d886f7 100644 --- a/tests/debuginfo/basic-types.rs +++ b/tests/debuginfo/basic-types.rs @@ -10,108 +10,108 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print b -// gdb-check:$1 = false -// gdb-command:print i -// gdb-check:$2 = -1 -// gdb-command:print c -// gdb-check:$3 = 97 'a' -// gdb-command:print/d i8 -// gdb-check:$4 = 68 -// gdb-command:print i16 -// gdb-check:$5 = -16 -// gdb-command:print i32 -// gdb-check:$6 = -32 -// gdb-command:print i64 -// gdb-check:$7 = -64 -// gdb-command:print u -// gdb-check:$8 = 1 -// gdb-command:print/d u8 -// gdb-check:$9 = 100 -// gdb-command:print u16 -// gdb-check:$10 = 16 -// gdb-command:print u32 -// gdb-check:$11 = 32 -// gdb-command:print u64 -// gdb-check:$12 = 64 -// gdb-command:print f16 -// gdb-check:$13 = 1.5 -// gdb-command:print f32 -// gdb-check:$14 = 2.5 -// gdb-command:print f64 -// gdb-check:$15 = 3.5 -// gdb-command:print s -// gdb-check:$16 = "Hello, World!" +//@ gdb-command:run +//@ gdb-command:print b +//@ gdb-check:$1 = false +//@ gdb-command:print i +//@ gdb-check:$2 = -1 +//@ gdb-command:print c +//@ gdb-check:$3 = 97 'a' +//@ gdb-command:print/d i8 +//@ gdb-check:$4 = 68 +//@ gdb-command:print i16 +//@ gdb-check:$5 = -16 +//@ gdb-command:print i32 +//@ gdb-check:$6 = -32 +//@ gdb-command:print i64 +//@ gdb-check:$7 = -64 +//@ gdb-command:print u +//@ gdb-check:$8 = 1 +//@ gdb-command:print/d u8 +//@ gdb-check:$9 = 100 +//@ gdb-command:print u16 +//@ gdb-check:$10 = 16 +//@ gdb-command:print u32 +//@ gdb-check:$11 = 32 +//@ gdb-command:print u64 +//@ gdb-check:$12 = 64 +//@ gdb-command:print f16 +//@ gdb-check:$13 = 1.5 +//@ gdb-command:print f32 +//@ gdb-check:$14 = 2.5 +//@ gdb-command:print f64 +//@ gdb-check:$15 = 3.5 +//@ gdb-command:print s +//@ gdb-check:$16 = "Hello, World!" // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v b -// lldb-check:[...] false -// lldb-command:v i -// lldb-check:[...] -1 +//@ lldb-command:run +//@ lldb-command:v b +//@ lldb-check:[...] false +//@ lldb-command:v i +//@ lldb-check:[...] -1 -// lldb-command:v i8 -// lldb-check:[...] 'D' -// lldb-command:v i16 -// lldb-check:[...] -16 -// lldb-command:v i32 -// lldb-check:[...] -32 -// lldb-command:v i64 -// lldb-check:[...] -64 -// lldb-command:v u -// lldb-check:[...] 1 -// lldb-command:v u8 -// lldb-check:[...] 'd' -// lldb-command:v u16 -// lldb-check:[...] 16 -// lldb-command:v u32 -// lldb-check:[...] 32 -// lldb-command:v u64 -// lldb-check:[...] 64 -// lldb-command:v f32 -// lldb-check:[...] 2.5 -// lldb-command:v f64 -// lldb-check:[...] 3.5 +//@ lldb-command:v i8 +//@ lldb-check:[...] 'D' +//@ lldb-command:v i16 +//@ lldb-check:[...] -16 +//@ lldb-command:v i32 +//@ lldb-check:[...] -32 +//@ lldb-command:v i64 +//@ lldb-check:[...] -64 +//@ lldb-command:v u +//@ lldb-check:[...] 1 +//@ lldb-command:v u8 +//@ lldb-check:[...] 'd' +//@ lldb-command:v u16 +//@ lldb-check:[...] 16 +//@ lldb-command:v u32 +//@ lldb-check:[...] 32 +//@ lldb-command:v u64 +//@ lldb-check:[...] 64 +//@ lldb-command:v f32 +//@ lldb-check:[...] 2.5 +//@ lldb-command:v f64 +//@ lldb-check:[...] 3.5 // === CDB TESTS =================================================================================== -// cdb-command:g -// cdb-command:dx b -// cdb-check:b : false [Type: bool] -// cdb-command:dx i -// cdb-check:i : -1 [Type: [...]] -// cdb-command:dx c -// cdb-check:c : 0x61 'a' [Type: char32_t] -// cdb-command:dx i8 -// cdb-check:i8 : 68 [Type: char] -// cdb-command:dx i16 -// cdb-check:i16 : -16 [Type: short] -// cdb-command:dx i32 -// cdb-check:i32 : -32 [Type: int] -// cdb-command:dx i64 -// cdb-check:i64 : -64 [Type: __int64] -// cdb-command:dx u -// cdb-check:u : 0x1 [Type: [...]] -// cdb-command:dx u8 -// cdb-check:u8 : 0x64 [Type: unsigned char] -// cdb-command:dx u16 -// cdb-check:u16 : 0x10 [Type: unsigned short] -// cdb-command:dx u32 -// cdb-check:u32 : 0x20 [Type: unsigned int] -// cdb-command:dx u64 -// cdb-check:u64 : 0x40 [Type: unsigned __int64] -// cdb-command:dx f16 -// cdb-check:f16 : 1.500000 [Type: f16] -// cdb-command:dx f32 -// cdb-check:f32 : 2.500000 [Type: float] -// cdb-command:dx f64 -// cdb-check:f64 : 3.500000 [Type: double] -// cdb-command:.enable_unicode 1 +//@ cdb-command:g +//@ cdb-command:dx b +//@ cdb-check:b : false [Type: bool] +//@ cdb-command:dx i +//@ cdb-check:i : -1 [Type: [...]] +//@ cdb-command:dx c +//@ cdb-check:c : 0x61 'a' [Type: char32_t] +//@ cdb-command:dx i8 +//@ cdb-check:i8 : 68 [Type: char] +//@ cdb-command:dx i16 +//@ cdb-check:i16 : -16 [Type: short] +//@ cdb-command:dx i32 +//@ cdb-check:i32 : -32 [Type: int] +//@ cdb-command:dx i64 +//@ cdb-check:i64 : -64 [Type: __int64] +//@ cdb-command:dx u +//@ cdb-check:u : 0x1 [Type: [...]] +//@ cdb-command:dx u8 +//@ cdb-check:u8 : 0x64 [Type: unsigned char] +//@ cdb-command:dx u16 +//@ cdb-check:u16 : 0x10 [Type: unsigned short] +//@ cdb-command:dx u32 +//@ cdb-check:u32 : 0x20 [Type: unsigned int] +//@ cdb-command:dx u64 +//@ cdb-check:u64 : 0x40 [Type: unsigned __int64] +//@ cdb-command:dx f16 +//@ cdb-check:f16 : 1.500000 [Type: f16] +//@ cdb-command:dx f32 +//@ cdb-check:f32 : 2.500000 [Type: float] +//@ cdb-command:dx f64 +//@ cdb-check:f64 : 3.500000 [Type: double] +//@ cdb-command:.enable_unicode 1 // FIXME(#88840): The latest version of the Windows SDK broke the visualizer for str. -// cdb-command:dx s -// cdb-check:s : [...] [Type: ref$] +//@ cdb-command:dx s +//@ cdb-check:s : [...] [Type: ref$] #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs index 86c4df12866ef..a3cffe3c65202 100644 --- a/tests/debuginfo/borrowed-basic.rs +++ b/tests/debuginfo/borrowed-basic.rs @@ -4,98 +4,98 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print *bool_ref -// gdb-check:$1 = true +//@ gdb-command:run +//@ gdb-command:print *bool_ref +//@ gdb-check:$1 = true -// gdb-command:print *int_ref -// gdb-check:$2 = -1 +//@ gdb-command:print *int_ref +//@ gdb-check:$2 = -1 -// gdb-command:print/d *char_ref -// gdb-check:$3 = 97 +//@ gdb-command:print/d *char_ref +//@ gdb-check:$3 = 97 -// gdb-command:print *i8_ref -// gdb-check:$4 = 68 +//@ gdb-command:print *i8_ref +//@ gdb-check:$4 = 68 -// gdb-command:print *i16_ref -// gdb-check:$5 = -16 +//@ gdb-command:print *i16_ref +//@ gdb-check:$5 = -16 -// gdb-command:print *i32_ref -// gdb-check:$6 = -32 +//@ gdb-command:print *i32_ref +//@ gdb-check:$6 = -32 -// gdb-command:print *i64_ref -// gdb-check:$7 = -64 +//@ gdb-command:print *i64_ref +//@ gdb-check:$7 = -64 -// gdb-command:print *uint_ref -// gdb-check:$8 = 1 +//@ gdb-command:print *uint_ref +//@ gdb-check:$8 = 1 -// gdb-command:print *u8_ref -// gdb-check:$9 = 100 +//@ gdb-command:print *u8_ref +//@ gdb-check:$9 = 100 -// gdb-command:print *u16_ref -// gdb-check:$10 = 16 +//@ gdb-command:print *u16_ref +//@ gdb-check:$10 = 16 -// gdb-command:print *u32_ref -// gdb-check:$11 = 32 +//@ gdb-command:print *u32_ref +//@ gdb-check:$11 = 32 -// gdb-command:print *u64_ref -// gdb-check:$12 = 64 +//@ gdb-command:print *u64_ref +//@ gdb-check:$12 = 64 -// gdb-command:print *f16_ref -// gdb-check:$13 = 1.5 +//@ gdb-command:print *f16_ref +//@ gdb-check:$13 = 1.5 -// gdb-command:print *f32_ref -// gdb-check:$14 = 2.5 +//@ gdb-command:print *f32_ref +//@ gdb-check:$14 = 2.5 -// gdb-command:print *f64_ref -// gdb-check:$15 = 3.5 +//@ gdb-command:print *f64_ref +//@ gdb-check:$15 = 3.5 // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v *bool_ref -// lldb-check:[...] true +//@ lldb-command:run +//@ lldb-command:v *bool_ref +//@ lldb-check:[...] true -// lldb-command:v *int_ref -// lldb-check:[...] -1 +//@ lldb-command:v *int_ref +//@ lldb-check:[...] -1 -// lldb-command:v *i8_ref -// lldb-check:[...] 'D' +//@ lldb-command:v *i8_ref +//@ lldb-check:[...] 'D' -// lldb-command:v *i16_ref -// lldb-check:[...] -16 +//@ lldb-command:v *i16_ref +//@ lldb-check:[...] -16 -// lldb-command:v *i32_ref -// lldb-check:[...] -32 +//@ lldb-command:v *i32_ref +//@ lldb-check:[...] -32 -// lldb-command:v *i64_ref -// lldb-check:[...] -64 +//@ lldb-command:v *i64_ref +//@ lldb-check:[...] -64 -// lldb-command:v *uint_ref -// lldb-check:[...] 1 +//@ lldb-command:v *uint_ref +//@ lldb-check:[...] 1 -// lldb-command:v *u8_ref -// lldb-check:[...] 'd' +//@ lldb-command:v *u8_ref +//@ lldb-check:[...] 'd' -// lldb-command:v *u16_ref -// lldb-check:[...] 16 +//@ lldb-command:v *u16_ref +//@ lldb-check:[...] 16 -// lldb-command:v *u32_ref -// lldb-check:[...] 32 +//@ lldb-command:v *u32_ref +//@ lldb-check:[...] 32 -// lldb-command:v *u64_ref -// lldb-check:[...] 64 +//@ lldb-command:v *u64_ref +//@ lldb-check:[...] 64 -// lldb-command:v *f16_ref -// lldb-check:[...] 1.5 +//@ lldb-command:v *f16_ref +//@ lldb-check:[...] 1.5 -// lldb-command:v *f32_ref -// lldb-check:[...] 2.5 +//@ lldb-command:v *f32_ref +//@ lldb-check:[...] 2.5 -// lldb-command:v *f64_ref -// lldb-check:[...] 3.5 +//@ lldb-command:v *f64_ref +//@ lldb-check:[...] 3.5 #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs index b331775743b4c..2aad83841213a 100644 --- a/tests/debuginfo/borrowed-c-style-enum.rs +++ b/tests/debuginfo/borrowed-c-style-enum.rs @@ -4,30 +4,30 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *the_a_ref -// gdb-check:$1 = borrowed_c_style_enum::ABC::TheA +//@ gdb-command:print *the_a_ref +//@ gdb-check:$1 = borrowed_c_style_enum::ABC::TheA -// gdb-command:print *the_b_ref -// gdb-check:$2 = borrowed_c_style_enum::ABC::TheB +//@ gdb-command:print *the_b_ref +//@ gdb-check:$2 = borrowed_c_style_enum::ABC::TheB -// gdb-command:print *the_c_ref -// gdb-check:$3 = borrowed_c_style_enum::ABC::TheC +//@ gdb-command:print *the_c_ref +//@ gdb-check:$3 = borrowed_c_style_enum::ABC::TheC // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *the_a_ref -// lldb-check:[...] TheA +//@ lldb-command:v *the_a_ref +//@ lldb-check:[...] TheA -// lldb-command:v *the_b_ref -// lldb-check:[...] TheB +//@ lldb-command:v *the_b_ref +//@ lldb-check:[...] TheB -// lldb-command:v *the_c_ref -// lldb-check:[...] TheC +//@ lldb-command:v *the_c_ref +//@ lldb-check:[...] TheC #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-enum.rs b/tests/debuginfo/borrowed-enum.rs index 48dce139a2f31..8389a3d9e883a 100644 --- a/tests/debuginfo/borrowed-enum.rs +++ b/tests/debuginfo/borrowed-enum.rs @@ -6,28 +6,28 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *the_a_ref -// gdb-check:$1 = borrowed_enum::ABC::TheA{x: 0, y: 8970181431921507452} +//@ gdb-command:print *the_a_ref +//@ gdb-check:$1 = borrowed_enum::ABC::TheA{x: 0, y: 8970181431921507452} -// gdb-command:print *the_b_ref -// gdb-check:$2 = borrowed_enum::ABC::TheB(0, 286331153, 286331153) +//@ gdb-command:print *the_b_ref +//@ gdb-check:$2 = borrowed_enum::ABC::TheB(0, 286331153, 286331153) -// gdb-command:print *univariant_ref -// gdb-check:$3 = borrowed_enum::Univariant::TheOnlyCase(4820353753753434) +//@ gdb-command:print *univariant_ref +//@ gdb-check:$3 = borrowed_enum::Univariant::TheOnlyCase(4820353753753434) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *the_a_ref -// lldb-check:(borrowed_enum::ABC) *the_a_ref = { TheA = { x = 0 y = 8970181431921507452 } } -// lldb-command:v *the_b_ref -// lldb-check:(borrowed_enum::ABC) *the_b_ref = { TheB = { 0 = 0 1 = 286331153 2 = 286331153 } } -// lldb-command:v *univariant_ref -// lldb-check:(borrowed_enum::Univariant) *univariant_ref = { TheOnlyCase = { 0 = 4820353753753434 } } +//@ lldb-command:v *the_a_ref +//@ lldb-check:(borrowed_enum::ABC) *the_a_ref = { TheA = { x = 0 y = 8970181431921507452 } } +//@ lldb-command:v *the_b_ref +//@ lldb-check:(borrowed_enum::ABC) *the_b_ref = { TheB = { 0 = 0 1 = 286331153 2 = 286331153 } } +//@ lldb-command:v *univariant_ref +//@ lldb-check:(borrowed_enum::Univariant) *univariant_ref = { TheOnlyCase = { 0 = 4820353753753434 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs index 876ec30b14019..fccca09e91bb6 100644 --- a/tests/debuginfo/borrowed-struct.rs +++ b/tests/debuginfo/borrowed-struct.rs @@ -4,54 +4,54 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *stack_val_ref -// gdb-check:$1 = borrowed_struct::SomeStruct {x: 10, y: 23.5} +//@ gdb-command:print *stack_val_ref +//@ gdb-check:$1 = borrowed_struct::SomeStruct {x: 10, y: 23.5} -// gdb-command:print *stack_val_interior_ref_1 -// gdb-check:$2 = 10 +//@ gdb-command:print *stack_val_interior_ref_1 +//@ gdb-check:$2 = 10 -// gdb-command:print *stack_val_interior_ref_2 -// gdb-check:$3 = 23.5 +//@ gdb-command:print *stack_val_interior_ref_2 +//@ gdb-check:$3 = 23.5 -// gdb-command:print *ref_to_unnamed -// gdb-check:$4 = borrowed_struct::SomeStruct {x: 11, y: 24.5} +//@ gdb-command:print *ref_to_unnamed +//@ gdb-check:$4 = borrowed_struct::SomeStruct {x: 11, y: 24.5} -// gdb-command:print *unique_val_ref -// gdb-check:$5 = borrowed_struct::SomeStruct {x: 13, y: 26.5} +//@ gdb-command:print *unique_val_ref +//@ gdb-check:$5 = borrowed_struct::SomeStruct {x: 13, y: 26.5} -// gdb-command:print *unique_val_interior_ref_1 -// gdb-check:$6 = 13 +//@ gdb-command:print *unique_val_interior_ref_1 +//@ gdb-check:$6 = 13 -// gdb-command:print *unique_val_interior_ref_2 -// gdb-check:$7 = 26.5 +//@ gdb-command:print *unique_val_interior_ref_2 +//@ gdb-check:$7 = 26.5 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *stack_val_ref -// lldb-check:[...] { x = 10 y = 23.5 } +//@ lldb-command:v *stack_val_ref +//@ lldb-check:[...] { x = 10 y = 23.5 } -// lldb-command:v *stack_val_interior_ref_1 -// lldb-check:[...] 10 +//@ lldb-command:v *stack_val_interior_ref_1 +//@ lldb-check:[...] 10 -// lldb-command:v *stack_val_interior_ref_2 -// lldb-check:[...] 23.5 +//@ lldb-command:v *stack_val_interior_ref_2 +//@ lldb-check:[...] 23.5 -// lldb-command:v *ref_to_unnamed -// lldb-check:[...] { x = 11 y = 24.5 } +//@ lldb-command:v *ref_to_unnamed +//@ lldb-check:[...] { x = 11 y = 24.5 } -// lldb-command:v *unique_val_ref -// lldb-check:[...] { x = 13 y = 26.5 } +//@ lldb-command:v *unique_val_ref +//@ lldb-check:[...] { x = 13 y = 26.5 } -// lldb-command:v *unique_val_interior_ref_1 -// lldb-check:[...] 13 +//@ lldb-command:v *unique_val_interior_ref_1 +//@ lldb-check:[...] 13 -// lldb-command:v *unique_val_interior_ref_2 -// lldb-check:[...] 26.5 +//@ lldb-command:v *unique_val_interior_ref_2 +//@ lldb-check:[...] 26.5 #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs index 42964c79485a3..901d7f6ed08b0 100644 --- a/tests/debuginfo/borrowed-tuple.rs +++ b/tests/debuginfo/borrowed-tuple.rs @@ -4,30 +4,30 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *stack_val_ref -// gdb-check:$1 = (-14, -19) +//@ gdb-command:print *stack_val_ref +//@ gdb-check:$1 = (-14, -19) -// gdb-command:print *ref_to_unnamed -// gdb-check:$2 = (-15, -20) +//@ gdb-command:print *ref_to_unnamed +//@ gdb-check:$2 = (-15, -20) -// gdb-command:print *unique_val_ref -// gdb-check:$3 = (-17, -22) +//@ gdb-command:print *unique_val_ref +//@ gdb-check:$3 = (-17, -22) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *stack_val_ref -// lldb-check:[...] { 0 = -14 1 = -19 } +//@ lldb-command:v *stack_val_ref +//@ lldb-check:[...] { 0 = -14 1 = -19 } -// lldb-command:v *ref_to_unnamed -// lldb-check:[...] { 0 = -15 1 = -20 } +//@ lldb-command:v *ref_to_unnamed +//@ lldb-check:[...] { 0 = -15 1 = -20 } -// lldb-command:v *unique_val_ref -// lldb-check:[...] { 0 = -17 1 = -22 } +//@ lldb-command:v *unique_val_ref +//@ lldb-check:[...] { 0 = -17 1 = -22 } #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs index c230ceae1c758..b1c555569cce2 100644 --- a/tests/debuginfo/borrowed-unique-basic.rs +++ b/tests/debuginfo/borrowed-unique-basic.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *bool_ref -// gdb-check:$1 = true +//@ gdb-command:print *bool_ref +//@ gdb-check:$1 = true -// gdb-command:print *int_ref -// gdb-check:$2 = -1 +//@ gdb-command:print *int_ref +//@ gdb-check:$2 = -1 -// gdb-command:print/d *char_ref -// gdb-check:$3 = 97 +//@ gdb-command:print/d *char_ref +//@ gdb-check:$3 = 97 -// gdb-command:print/d *i8_ref -// gdb-check:$4 = 68 +//@ gdb-command:print/d *i8_ref +//@ gdb-check:$4 = 68 -// gdb-command:print *i16_ref -// gdb-check:$5 = -16 +//@ gdb-command:print *i16_ref +//@ gdb-check:$5 = -16 -// gdb-command:print *i32_ref -// gdb-check:$6 = -32 +//@ gdb-command:print *i32_ref +//@ gdb-check:$6 = -32 -// gdb-command:print *i64_ref -// gdb-check:$7 = -64 +//@ gdb-command:print *i64_ref +//@ gdb-check:$7 = -64 -// gdb-command:print *uint_ref -// gdb-check:$8 = 1 +//@ gdb-command:print *uint_ref +//@ gdb-check:$8 = 1 -// gdb-command:print/d *u8_ref -// gdb-check:$9 = 100 +//@ gdb-command:print/d *u8_ref +//@ gdb-check:$9 = 100 -// gdb-command:print *u16_ref -// gdb-check:$10 = 16 +//@ gdb-command:print *u16_ref +//@ gdb-check:$10 = 16 -// gdb-command:print *u32_ref -// gdb-check:$11 = 32 +//@ gdb-command:print *u32_ref +//@ gdb-check:$11 = 32 -// gdb-command:print *u64_ref -// gdb-check:$12 = 64 +//@ gdb-command:print *u64_ref +//@ gdb-check:$12 = 64 -// gdb-command:print *f16_ref -// gdb-check:$13 = 1.5 +//@ gdb-command:print *f16_ref +//@ gdb-check:$13 = 1.5 -// gdb-command:print *f32_ref -// gdb-check:$14 = 2.5 +//@ gdb-command:print *f32_ref +//@ gdb-check:$14 = 2.5 -// gdb-command:print *f64_ref -// gdb-check:$15 = 3.5 +//@ gdb-command:print *f64_ref +//@ gdb-check:$15 = 3.5 // === LLDB TESTS ================================================================================== -// lldb-command:type format add -f decimal char -// lldb-command:type format add -f decimal 'unsigned char' -// lldb-command:run +//@ lldb-command:type format add -f decimal char +//@ lldb-command:type format add -f decimal 'unsigned char' +//@ lldb-command:run -// lldb-command:v *bool_ref -// lldb-check:[...] true +//@ lldb-command:v *bool_ref +//@ lldb-check:[...] true -// lldb-command:v *int_ref -// lldb-check:[...] -1 +//@ lldb-command:v *int_ref +//@ lldb-check:[...] -1 -// lldb-command:v *i8_ref -// lldb-check:[...] 68 +//@ lldb-command:v *i8_ref +//@ lldb-check:[...] 68 -// lldb-command:v *i16_ref -// lldb-check:[...] -16 +//@ lldb-command:v *i16_ref +//@ lldb-check:[...] -16 -// lldb-command:v *i32_ref -// lldb-check:[...] -32 +//@ lldb-command:v *i32_ref +//@ lldb-check:[...] -32 -// lldb-command:v *i64_ref -// lldb-check:[...] -64 +//@ lldb-command:v *i64_ref +//@ lldb-check:[...] -64 -// lldb-command:v *uint_ref -// lldb-check:[...] 1 +//@ lldb-command:v *uint_ref +//@ lldb-check:[...] 1 -// lldb-command:v *u8_ref -// lldb-check:[...] 100 +//@ lldb-command:v *u8_ref +//@ lldb-check:[...] 100 -// lldb-command:v *u16_ref -// lldb-check:[...] 16 +//@ lldb-command:v *u16_ref +//@ lldb-check:[...] 16 -// lldb-command:v *u32_ref -// lldb-check:[...] 32 +//@ lldb-command:v *u32_ref +//@ lldb-check:[...] 32 -// lldb-command:v *u64_ref -// lldb-check:[...] 64 +//@ lldb-command:v *u64_ref +//@ lldb-check:[...] 64 -// lldb-command:v *f16_ref -// lldb-check:[...] 1.5 +//@ lldb-command:v *f16_ref +//@ lldb-check:[...] 1.5 -// lldb-command:v *f32_ref -// lldb-check:[...] 2.5 +//@ lldb-command:v *f32_ref +//@ lldb-check:[...] 2.5 -// lldb-command:v *f64_ref -// lldb-check:[...] 3.5 +//@ lldb-command:v *f64_ref +//@ lldb-check:[...] 3.5 #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs index c5034410f49f4..3d9d568e8e63d 100644 --- a/tests/debuginfo/box.rs +++ b/tests/debuginfo/box.rs @@ -4,21 +4,21 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *a -// gdb-check:$1 = 1 -// gdb-command:print *b -// gdb-check:$2 = (2, 3.5) +//@ gdb-command:print *a +//@ gdb-check:$1 = 1 +//@ gdb-command:print *b +//@ gdb-check:$2 = (2, 3.5) // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v *a -// lldb-check:[...] 1 -// lldb-command:v *b -// lldb-check:[...] { 0 = 2 1 = 3.5 } +//@ lldb-command:run +//@ lldb-command:v *a +//@ lldb-check:[...] 1 +//@ lldb-command:v *b +//@ lldb-check:[...] { 0 = 2 1 = 3.5 } #![allow(unused_variables)] diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs index fc676e8ce618a..4990a189f2f1f 100644 --- a/tests/debuginfo/boxed-struct.rs +++ b/tests/debuginfo/boxed-struct.rs @@ -4,24 +4,24 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *boxed_with_padding -// gdb-check:$1 = boxed_struct::StructWithSomePadding {x: 99, y: 999, z: 9999, w: 99999} +//@ gdb-command:print *boxed_with_padding +//@ gdb-check:$1 = boxed_struct::StructWithSomePadding {x: 99, y: 999, z: 9999, w: 99999} -// gdb-command:print *boxed_with_dtor -// gdb-check:$2 = boxed_struct::StructWithDestructor {x: 77, y: 777, z: 7777, w: 77777} +//@ gdb-command:print *boxed_with_dtor +//@ gdb-check:$2 = boxed_struct::StructWithDestructor {x: 77, y: 777, z: 7777, w: 77777} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *boxed_with_padding -// lldb-check:[...] { x = 99 y = 999 z = 9999 w = 99999 } +//@ lldb-command:v *boxed_with_padding +//@ lldb-check:[...] { x = 99 y = 999 z = 9999 w = 99999 } -// lldb-command:v *boxed_with_dtor -// lldb-check:[...] { x = 77 y = 777 z = 7777 w = 77777 } +//@ lldb-command:v *boxed_with_dtor +//@ lldb-check:[...] { x = 77 y = 777 z = 7777 w = 77777 } #![allow(unused_variables)] diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index b5b0df73a68a4..523f6b7623d1d 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -8,60 +8,60 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print s -// gdb-check:$1 = by_value_non_immediate_argument::Struct {a: 1, b: 2.5} -// gdb-command:continue +//@ gdb-command:print s +//@ gdb-check:$1 = by_value_non_immediate_argument::Struct {a: 1, b: 2.5} +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = by_value_non_immediate_argument::Struct {a: 3, b: 4.5} -// gdb-command:print y -// gdb-check:$3 = 5 -// gdb-command:print z -// gdb-check:$4 = 6.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = by_value_non_immediate_argument::Struct {a: 3, b: 4.5} +//@ gdb-command:print y +//@ gdb-check:$3 = 5 +//@ gdb-command:print z +//@ gdb-check:$4 = 6.5 +//@ gdb-command:continue -// gdb-command:print a -// gdb-check:$5 = (7, 8, 9.5, 10.5) -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$5 = (7, 8, 9.5, 10.5) +//@ gdb-command:continue -// gdb-command:print a -// gdb-check:$6 = by_value_non_immediate_argument::Newtype (11.5, 12.5, 13, 14) -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$6 = by_value_non_immediate_argument::Newtype (11.5, 12.5, 13, 14) +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$7 = by_value_non_immediate_argument::Enum::Case1{x: 0, y: 8970181431921507452} -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = by_value_non_immediate_argument::Enum::Case1{x: 0, y: 8970181431921507452} +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v s -// lldb-check:[...] Struct { a = 1 b = 2.5 } -// lldb-command:continue +//@ lldb-command:v s +//@ lldb-check:[...] Struct { a = 1 b = 2.5 } +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] Struct { a = 3 b = 4.5 } -// lldb-command:v y -// lldb-check:[...] 5 -// lldb-command:v z -// lldb-check:[...] 6.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] Struct { a = 3 b = 4.5 } +//@ lldb-command:v y +//@ lldb-check:[...] 5 +//@ lldb-command:v z +//@ lldb-check:[...] 6.5 +//@ lldb-command:continue -// lldb-command:v a -// lldb-check:[...] (7, 8, 9.5, 10.5) -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] (7, 8, 9.5, 10.5) +//@ lldb-command:continue -// lldb-command:v a -// lldb-check:[...] Newtype(11.5, 12.5, 13, 14) -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] Newtype(11.5, 12.5, 13, 14) +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 } -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 } +//@ lldb-command:continue #[derive(Clone)] struct Struct { diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs index 409cfc533c879..9f36e3d89ee98 100644 --- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -4,36 +4,36 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print self -// gdb-check:$1 = 1111 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$1 = 1111 +//@ gdb-command:continue -// gdb-command:print self -// gdb-check:$2 = by_value_self_argument_in_trait_impl::Struct {x: 2222, y: 3333} -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$2 = by_value_self_argument_in_trait_impl::Struct {x: 2222, y: 3333} +//@ gdb-command:continue -// gdb-command:print self -// gdb-check:$3 = (4444.5, 5555, 6666, 7777.5) -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$3 = (4444.5, 5555, 6666, 7777.5) +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v self -// lldb-check:[...] 1111 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] 1111 +//@ lldb-command:continue -// lldb-command:v self -// lldb-check:[...] { x = 2222 y = 3333 } -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 2222 y = 3333 } +//@ lldb-command:continue -// lldb-command:v self -// lldb-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } +//@ lldb-command:continue trait Trait { fn method(self) -> Self; diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs index dd5e4f8b65d71..aa11ea14cf49a 100644 --- a/tests/debuginfo/c-style-enum-in-composite.rs +++ b/tests/debuginfo/c-style-enum-in-composite.rs @@ -4,53 +4,53 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print tuple_interior_padding -// gdb-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred) +//@ gdb-command:print tuple_interior_padding +//@ gdb-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred) -// gdb-command:print tuple_padding_at_end -// gdb-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2) +//@ gdb-command:print tuple_padding_at_end +//@ gdb-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2) -// gdb-command:print tuple_different_enums -// gdb-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna) +//@ gdb-command:print tuple_different_enums +//@ gdb-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna) -// gdb-command:print padded_struct -// gdb-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5} +//@ gdb-command:print padded_struct +//@ gdb-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5} -// gdb-command:print packed_struct -// gdb-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8} +//@ gdb-command:print packed_struct +//@ gdb-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8} -// gdb-command:print non_padded_struct -// gdb-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto} +//@ gdb-command:print non_padded_struct +//@ gdb-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto} -// gdb-command:print struct_with_drop -// gdb-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9) +//@ gdb-command:print struct_with_drop +//@ gdb-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v tuple_interior_padding -// lldb-check:[...] { 0 = 0 1 = OneHundred } +//@ lldb-command:v tuple_interior_padding +//@ lldb-check:[...] { 0 = 0 1 = OneHundred } -// lldb-command:v tuple_padding_at_end -// lldb-check:[...] { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } +//@ lldb-command:v tuple_padding_at_end +//@ lldb-check:[...] { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } -// lldb-command:v tuple_different_enums -// lldb-check:[...] { 0 = OneThousand 1 = MountainView 2 = OneMillion 3 = Vienna } +//@ lldb-command:v tuple_different_enums +//@ lldb-check:[...] { 0 = OneThousand 1 = MountainView 2 = OneMillion 3 = Vienna } -// lldb-command:v padded_struct -// lldb-check:[...] { a = 3 b = OneMillion c = 4 d = Toronto e = 5 } +//@ lldb-command:v padded_struct +//@ lldb-check:[...] { a = 3 b = OneMillion c = 4 d = Toronto e = 5 } -// lldb-command:v packed_struct -// lldb-check:[...] { a = 6 b = OneHundred c = 7 d = Vienna e = 8 } +//@ lldb-command:v packed_struct +//@ lldb-check:[...] { a = 6 b = OneHundred c = 7 d = Vienna e = 8 } -// lldb-command:v non_padded_struct -// lldb-check:[...] { a = OneMillion b = MountainView c = OneThousand d = Toronto } +//@ lldb-command:v non_padded_struct +//@ lldb-check:[...] { a = OneMillion b = MountainView c = OneThousand d = Toronto } -// lldb-command:v struct_with_drop -// lldb-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 } +//@ lldb-command:v struct_with_drop +//@ lldb-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 } #![allow(unused_variables)] diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs index 79438e3f2d439..5e568222727c2 100644 --- a/tests/debuginfo/c-style-enum.rs +++ b/tests/debuginfo/c-style-enum.rs @@ -6,87 +6,87 @@ // === GDB TESTS =================================================================================== -// gdb-command:print c_style_enum::SINGLE_VARIANT -// gdb-check:$1 = c_style_enum::SingleVariant::TheOnlyVariant +//@ gdb-command:print c_style_enum::SINGLE_VARIANT +//@ gdb-check:$1 = c_style_enum::SingleVariant::TheOnlyVariant -// gdb-command:print c_style_enum::AUTO_ONE -// gdb-check:$2 = c_style_enum::AutoDiscriminant::One +//@ gdb-command:print c_style_enum::AUTO_ONE +//@ gdb-check:$2 = c_style_enum::AutoDiscriminant::One -// gdb-command:print c_style_enum::AUTO_TWO -// gdb-check:$3 = c_style_enum::AutoDiscriminant::One +//@ gdb-command:print c_style_enum::AUTO_TWO +//@ gdb-check:$3 = c_style_enum::AutoDiscriminant::One -// gdb-command:print c_style_enum::AUTO_THREE -// gdb-check:$4 = c_style_enum::AutoDiscriminant::One +//@ gdb-command:print c_style_enum::AUTO_THREE +//@ gdb-check:$4 = c_style_enum::AutoDiscriminant::One -// gdb-command:print c_style_enum::MANUAL_ONE -// gdb-check:$5 = c_style_enum::ManualDiscriminant::OneHundred +//@ gdb-command:print c_style_enum::MANUAL_ONE +//@ gdb-check:$5 = c_style_enum::ManualDiscriminant::OneHundred -// gdb-command:print c_style_enum::MANUAL_TWO -// gdb-check:$6 = c_style_enum::ManualDiscriminant::OneHundred +//@ gdb-command:print c_style_enum::MANUAL_TWO +//@ gdb-check:$6 = c_style_enum::ManualDiscriminant::OneHundred -// gdb-command:print c_style_enum::MANUAL_THREE -// gdb-check:$7 = c_style_enum::ManualDiscriminant::OneHundred +//@ gdb-command:print c_style_enum::MANUAL_THREE +//@ gdb-check:$7 = c_style_enum::ManualDiscriminant::OneHundred -// gdb-command:run +//@ gdb-command:run -// gdb-command:print auto_one -// gdb-check:$8 = c_style_enum::AutoDiscriminant::One +//@ gdb-command:print auto_one +//@ gdb-check:$8 = c_style_enum::AutoDiscriminant::One -// gdb-command:print auto_two -// gdb-check:$9 = c_style_enum::AutoDiscriminant::Two +//@ gdb-command:print auto_two +//@ gdb-check:$9 = c_style_enum::AutoDiscriminant::Two -// gdb-command:print auto_three -// gdb-check:$10 = c_style_enum::AutoDiscriminant::Three +//@ gdb-command:print auto_three +//@ gdb-check:$10 = c_style_enum::AutoDiscriminant::Three -// gdb-command:print manual_one_hundred -// gdb-check:$11 = c_style_enum::ManualDiscriminant::OneHundred +//@ gdb-command:print manual_one_hundred +//@ gdb-check:$11 = c_style_enum::ManualDiscriminant::OneHundred -// gdb-command:print manual_one_thousand -// gdb-check:$12 = c_style_enum::ManualDiscriminant::OneThousand +//@ gdb-command:print manual_one_thousand +//@ gdb-check:$12 = c_style_enum::ManualDiscriminant::OneThousand -// gdb-command:print manual_one_million -// gdb-check:$13 = c_style_enum::ManualDiscriminant::OneMillion +//@ gdb-command:print manual_one_million +//@ gdb-check:$13 = c_style_enum::ManualDiscriminant::OneMillion -// gdb-command:print single_variant -// gdb-check:$14 = c_style_enum::SingleVariant::TheOnlyVariant +//@ gdb-command:print single_variant +//@ gdb-check:$14 = c_style_enum::SingleVariant::TheOnlyVariant -// gdb-command:print AUTO_TWO -// gdb-check:$15 = c_style_enum::AutoDiscriminant::Two +//@ gdb-command:print AUTO_TWO +//@ gdb-check:$15 = c_style_enum::AutoDiscriminant::Two -// gdb-command:print AUTO_THREE -// gdb-check:$16 = c_style_enum::AutoDiscriminant::Three +//@ gdb-command:print AUTO_THREE +//@ gdb-check:$16 = c_style_enum::AutoDiscriminant::Three -// gdb-command:print MANUAL_TWO -// gdb-check:$17 = c_style_enum::ManualDiscriminant::OneThousand +//@ gdb-command:print MANUAL_TWO +//@ gdb-check:$17 = c_style_enum::ManualDiscriminant::OneThousand -// gdb-command:print MANUAL_THREE -// gdb-check:$18 = c_style_enum::ManualDiscriminant::OneMillion +//@ gdb-command:print MANUAL_THREE +//@ gdb-check:$18 = c_style_enum::ManualDiscriminant::OneMillion // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v auto_one -// lldb-check:[...] One +//@ lldb-command:v auto_one +//@ lldb-check:[...] One -// lldb-command:v auto_two -// lldb-check:[...] Two +//@ lldb-command:v auto_two +//@ lldb-check:[...] Two -// lldb-command:v auto_three -// lldb-check:[...] Three +//@ lldb-command:v auto_three +//@ lldb-check:[...] Three -// lldb-command:v manual_one_hundred -// lldb-check:[...] OneHundred +//@ lldb-command:v manual_one_hundred +//@ lldb-check:[...] OneHundred -// lldb-command:v manual_one_thousand -// lldb-check:[...] OneThousand +//@ lldb-command:v manual_one_thousand +//@ lldb-check:[...] OneThousand -// lldb-command:v manual_one_million -// lldb-check:[...] OneMillion +//@ lldb-command:v manual_one_million +//@ lldb-check:[...] OneMillion -// lldb-command:v single_variant -// lldb-check:[...] TheOnlyVariant +//@ lldb-command:v single_variant +//@ lldb-check:[...] TheOnlyVariant #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/captured-fields-1.rs b/tests/debuginfo/captured-fields-1.rs index 53f77d3146855..81651331519c7 100644 --- a/tests/debuginfo/captured-fields-1.rs +++ b/tests/debuginfo/captured-fields-1.rs @@ -3,47 +3,47 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print test -// gdb-check:$1 = captured_fields_1::main::{closure_env#0} {_ref__my_ref__my_field1: 0x[...]} -// gdb-command:continue -// gdb-command:print test -// gdb-check:$2 = captured_fields_1::main::{closure_env#1} {_ref__my_ref__my_field2: 0x[...]} -// gdb-command:continue -// gdb-command:print test -// gdb-check:$3 = captured_fields_1::main::{closure_env#2} {_ref__my_ref: 0x[...]} -// gdb-command:continue -// gdb-command:print test -// gdb-check:$4 = captured_fields_1::main::{closure_env#3} {my_ref: 0x[...]} -// gdb-command:continue -// gdb-command:print test -// gdb-check:$5 = captured_fields_1::main::{closure_env#4} {my_var__my_field2: 22} -// gdb-command:continue -// gdb-command:print test -// gdb-check:$6 = captured_fields_1::main::{closure_env#5} {my_var: captured_fields_1::MyStruct {my_field1: 11, my_field2: 22}} -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:print test +//@ gdb-check:$1 = captured_fields_1::main::{closure_env#0} {_ref__my_ref__my_field1: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print test +//@ gdb-check:$2 = captured_fields_1::main::{closure_env#1} {_ref__my_ref__my_field2: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print test +//@ gdb-check:$3 = captured_fields_1::main::{closure_env#2} {_ref__my_ref: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print test +//@ gdb-check:$4 = captured_fields_1::main::{closure_env#3} {my_ref: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print test +//@ gdb-check:$5 = captured_fields_1::main::{closure_env#4} {my_var__my_field2: 22} +//@ gdb-command:continue +//@ gdb-command:print test +//@ gdb-check:$6 = captured_fields_1::main::{closure_env#5} {my_var: captured_fields_1::MyStruct {my_field1: 11, my_field2: 22}} +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#0}) test = { _ref__my_ref__my_field1 = 0x[...] } -// lldb-command:continue -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#1}) test = { _ref__my_ref__my_field2 = 0x[...] } -// lldb-command:continue -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#2}) test = { _ref__my_ref = 0x[...] } -// lldb-command:continue -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#3}) test = { my_ref = 0x[...] } -// lldb-command:continue -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#4}) test = { my_var__my_field2 = 22 } -// lldb-command:continue -// lldb-command:v test -// lldb-check:(captured_fields_1::main::{closure_env#5}) test = { my_var = { my_field1 = 11 my_field2 = 22 } } -// lldb-command:continue +//@ lldb-command:run +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#0}) test = { _ref__my_ref__my_field1 = 0x[...] } +//@ lldb-command:continue +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#1}) test = { _ref__my_ref__my_field2 = 0x[...] } +//@ lldb-command:continue +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#2}) test = { _ref__my_ref = 0x[...] } +//@ lldb-command:continue +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#3}) test = { my_ref = 0x[...] } +//@ lldb-command:continue +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#4}) test = { my_var__my_field2 = 22 } +//@ lldb-command:continue +//@ lldb-command:v test +//@ lldb-check:(captured_fields_1::main::{closure_env#5}) test = { my_var = { my_field1 = 11 my_field2 = 22 } } +//@ lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/captured-fields-2.rs b/tests/debuginfo/captured-fields-2.rs index cdebeaf3a9753..db1b867cb90eb 100644 --- a/tests/debuginfo/captured-fields-2.rs +++ b/tests/debuginfo/captured-fields-2.rs @@ -3,23 +3,23 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print my_ref__my_field1 -// gdb-check:$1 = 11 -// gdb-command:continue -// gdb-command:print my_var__my_field2 -// gdb-check:$2 = 22 -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:print my_ref__my_field1 +//@ gdb-check:$1 = 11 +//@ gdb-command:continue +//@ gdb-command:print my_var__my_field2 +//@ gdb-check:$2 = 22 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v my_ref__my_field1 -// lldb-check:(unsigned int) my_ref__my_field1 = 11 -// lldb-command:continue -// lldb-command:v my_var__my_field2 -// lldb-check:(unsigned int) my_var__my_field2 = 22 -// lldb-command:continue +//@ lldb-command:run +//@ lldb-command:v my_ref__my_field1 +//@ lldb-check:(unsigned int) my_ref__my_field1 = 11 +//@ lldb-command:continue +//@ lldb-command:v my_var__my_field2 +//@ lldb-check:(unsigned int) my_var__my_field2 = 22 +//@ lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs index 88769399f0895..1f171c24d1628 100644 --- a/tests/debuginfo/closure-in-generic-function.rs +++ b/tests/debuginfo/closure-in-generic-function.rs @@ -4,36 +4,36 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = 0.5 -// gdb-command:print y -// gdb-check:$2 = 10 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 0.5 +//@ gdb-command:print y +//@ gdb-check:$2 = 10 +//@ gdb-command:continue -// gdb-command:print *x -// gdb-check:$3 = 29 -// gdb-command:print *y -// gdb-check:$4 = 110 -// gdb-command:continue +//@ gdb-command:print *x +//@ gdb-check:$3 = 29 +//@ gdb-command:print *y +//@ gdb-check:$4 = 110 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] 0.5 -// lldb-command:v y -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 0.5 +//@ lldb-command:v y +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v *x -// lldb-check:[...] 29 -// lldb-command:v *y -// lldb-check:[...] 110 -// lldb-command:continue +//@ lldb-command:v *x +//@ lldb-check:[...] 29 +//@ lldb-command:v *y +//@ lldb-check:[...] 110 +//@ lldb-command:continue fn some_generic_fun(a: T1, b: T2) -> (T2, T1) { diff --git a/tests/debuginfo/closures.rs b/tests/debuginfo/closures.rs index f5220a49e29dc..2cad6aacae7be 100644 --- a/tests/debuginfo/closures.rs +++ b/tests/debuginfo/closures.rs @@ -3,51 +3,52 @@ // === CDB TESTS =================================================================================== // Generic functions cause ambigious breakpoints. -// cdb-command:dx @$debuggerRootNamespace.Debugger.Settings.EngineInitialization.ResolveAmbiguousBreakpoints = true; -// cdb-command:bp `closures.rs:57` -// cdb-command:g -// cdb-command:dx add_closure -// cdb-check:add_closure [Type: closures::main::closure_env$0] -// cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] -// cdb-command:dx increment -// cdb-check:increment [Type: closures::main::closure_env$1] -// cdb-check: [+0x[...]] _ref__count : 0x[...] : 2 [Type: int *] -// cdb-command:dx consume_closure -// cdb-check:consume_closure [Type: closures::main::closure_env$2] -// cdb-check: [+0x[...]] x : [...] [Type: alloc::string::String] -// cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] -// cdb-command:dx simple_closure +//@ cdb-command:dx @$debuggerRootNamespace.Debugger.Settings.EngineInitialization.ResolveAmbiguousBreakpoints = true; +//@ cdb-command:bp `closures.rs:57` +//@ cdb-command:g +//@ cdb-command:dx add_closure +//@ cdb-check:add_closure [Type: closures::main::closure_env$0] +//@ cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] +//@ cdb-command:dx increment +//@ cdb-check:increment [Type: closures::main::closure_env$1] +//@ cdb-check: [+0x[...]] _ref__count : 0x[...] : 2 [Type: int *] +//@ cdb-command:dx consume_closure +//@ cdb-check:consume_closure [Type: closures::main::closure_env$2] +//@ cdb-check: [+0x[...]] x : [...] [Type: alloc::string::String] +//@ cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] +//@ cdb-command:dx simple_closure +// FIXME(#148097): Change `// cdb-checksimple_closure` to `//@ cdb-check:simple_closure` // cdb-checksimple_closure [Type: closures::main::closure_env$5] -// cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] -// cdb-command:g -// cdb-command:dx first_closure -// cdb-check:first_closure [Type: closures::main::closure_env$6] -// cdb-check: [+0x[...]] _ref__variable : 0x[...] : 1 [Type: int *] -// cdb-check: [+0x[...]] _ref__constant : 0x[...] : 2 [Type: int *] -// cdb-check: [+0x[...]] _ref__a_struct : 0x[...] [Type: closures::Struct *] -// cdb-check: [+0x[...]] _ref__struct_ref : 0x[...] [Type: closures::Struct * *] -// cdb-check: [+0x[...]] _ref__owned_value : 0x[...] [Type: int * *] -// cdb-command:g -// cdb-command:dx many_param_closure -// cdb-check:many_param_closure [Type: closures::main::closure_env$7] -// cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] -// cdb-command:g -// cdb-command:dv -// cdb-command:dx generic_closure -// cdb-check:generic_closure [Type: closures::generic_func::closure_env$0] -// cdb-check: [+0x[...]] _ref__x : 0x[...] : 42 [Type: int *] -// cdb-command:g -// cdb-command:dx generic_closure -// cdb-check:generic_closure [Type: closures::generic_func::closure_env$0 >] -// cdb-check: [+0x000] _ref__x : 0x[...] : "base_value" [Type: ref$ *] -// cdb-command:g -// cdb-command:dx second_closure -// cdb-check:second_closure [Type: closures::main::closure_env$8] -// cdb-check: [+0x[...]] _ref__variable : 0x[...] : 2 [Type: int *] -// cdb-check: [+0x[...]] _ref__constant : 0x[...] : 2 [Type: int *] -// cdb-check: [+0x[...]] _ref__a_struct : 0x[...] [Type: closures::Struct *] -// cdb-check: [+0x[...]] _ref__struct_ref : 0x[...] [Type: closures::Struct * *] -// cdb-check: [+0x[...]] _ref__owned_value : 0x[...] [Type: int * *] +//@ cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] +//@ cdb-command:g +//@ cdb-command:dx first_closure +//@ cdb-check:first_closure [Type: closures::main::closure_env$6] +//@ cdb-check: [+0x[...]] _ref__variable : 0x[...] : 1 [Type: int *] +//@ cdb-check: [+0x[...]] _ref__constant : 0x[...] : 2 [Type: int *] +//@ cdb-check: [+0x[...]] _ref__a_struct : 0x[...] [Type: closures::Struct *] +//@ cdb-check: [+0x[...]] _ref__struct_ref : 0x[...] [Type: closures::Struct * *] +//@ cdb-check: [+0x[...]] _ref__owned_value : 0x[...] [Type: int * *] +//@ cdb-command:g +//@ cdb-command:dx many_param_closure +//@ cdb-check:many_param_closure [Type: closures::main::closure_env$7] +//@ cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *] +//@ cdb-command:g +//@ cdb-command:dv +//@ cdb-command:dx generic_closure +//@ cdb-check:generic_closure [Type: closures::generic_func::closure_env$0] +//@ cdb-check: [+0x[...]] _ref__x : 0x[...] : 42 [Type: int *] +//@ cdb-command:g +//@ cdb-command:dx generic_closure +//@ cdb-check:generic_closure [Type: closures::generic_func::closure_env$0 >] +//@ cdb-check: [+0x000] _ref__x : 0x[...] : "base_value" [Type: ref$ *] +//@ cdb-command:g +//@ cdb-command:dx second_closure +//@ cdb-check:second_closure [Type: closures::main::closure_env$8] +//@ cdb-check: [+0x[...]] _ref__variable : 0x[...] : 2 [Type: int *] +//@ cdb-check: [+0x[...]] _ref__constant : 0x[...] : 2 [Type: int *] +//@ cdb-check: [+0x[...]] _ref__a_struct : 0x[...] [Type: closures::Struct *] +//@ cdb-check: [+0x[...]] _ref__struct_ref : 0x[...] [Type: closures::Struct * *] +//@ cdb-check: [+0x[...]] _ref__owned_value : 0x[...] [Type: int * *] #[inline(never)] fn generic_func(x: Tfunc) { diff --git a/tests/debuginfo/collapse-debuginfo-external-attr.rs b/tests/debuginfo/collapse-debuginfo-external-attr.rs index 4d4fa92726f8e..7f4e6cda9f3f4 100644 --- a/tests/debuginfo/collapse-debuginfo-external-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-external-attr.rs @@ -6,11 +6,11 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#one_callsite[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#one_callsite[...] +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs index ab0ae8fef4df7..adbd1e4d9eabb 100644 --- a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs @@ -7,13 +7,13 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#one_callsite[...] -// gdb-command:next -// gdb-command:frame -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#one_callsite[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/collapse-debuginfo-external-flag.rs b/tests/debuginfo/collapse-debuginfo-external-flag.rs index b8e73d227b365..40082dce86c87 100644 --- a/tests/debuginfo/collapse-debuginfo-external-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-external-flag.rs @@ -6,11 +6,11 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#println_callsite[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#println_callsite[...] +//@ gdb-command:continue macro_rules! outer { () => { diff --git a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs index bafa5408b1978..29ed348340bb6 100644 --- a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs +++ b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs @@ -10,50 +10,50 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1_pre[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_in_proxy[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_rem_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1_pre[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_in_proxy[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_add_macro[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder_call2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1_pre[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_in_proxy[...] -// gdb-command:next 2 -// gdb-command:frame -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1_pre[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_in_proxy[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_rem_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1_pre[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_in_proxy[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_add_macro[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder_call2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1_pre[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_in_proxy[...] +//@ gdb-command:next 2 +//@ gdb-command:frame +//@ gdb-command:continue #[inline(never)] fn myprintln_impl(text: &str) { diff --git a/tests/debuginfo/collapse-debuginfo-no-attr.rs b/tests/debuginfo/collapse-debuginfo-no-attr.rs index 6f0d041024f4a..b55c7d6c948f1 100644 --- a/tests/debuginfo/collapse-debuginfo-no-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-no-attr.rs @@ -7,20 +7,20 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc4[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc4[...] +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/collapse-debuginfo-static-external.rs b/tests/debuginfo/collapse-debuginfo-static-external.rs index 6389bb734ddf3..764985ceeb041 100644 --- a/tests/debuginfo/collapse-debuginfo-static-external.rs +++ b/tests/debuginfo/collapse-debuginfo-static-external.rs @@ -7,8 +7,8 @@ // === GDB TESTS =================================================================================== -// gdb-command:info line collapse_debuginfo_static_external::FOO -// gdb-check:[...]Line 16[...] +//@ gdb-command:info line collapse_debuginfo_static_external::FOO +//@ gdb-check:[...]Line 16[...] #[collapse_debuginfo(external)] macro_rules! decl_foo { diff --git a/tests/debuginfo/collapse-debuginfo-static.rs b/tests/debuginfo/collapse-debuginfo-static.rs index a5542a44091a2..faa89f2784e59 100644 --- a/tests/debuginfo/collapse-debuginfo-static.rs +++ b/tests/debuginfo/collapse-debuginfo-static.rs @@ -7,8 +7,8 @@ // === GDB TESTS =================================================================================== -// gdb-command:info line collapse_debuginfo_static::FOO -// gdb-check:[...]Line 20[...] +//@ gdb-command:info line collapse_debuginfo_static::FOO +//@ gdb-check:[...]Line 20[...] #[collapse_debuginfo(yes)] macro_rules! decl_foo { diff --git a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs index 8da084126ca06..759f42c3a235b 100644 --- a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs @@ -7,20 +7,20 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc4[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc4[...] +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/collapse-debuginfo-with-attr.rs b/tests/debuginfo/collapse-debuginfo-with-attr.rs index fa66468779657..fc85da42308dd 100644 --- a/tests/debuginfo/collapse-debuginfo-with-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-with-attr.rs @@ -7,17 +7,17 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs index ef92f87ef4688..835eb6d86344a 100644 --- a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs @@ -7,17 +7,17 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:continue fn one() { println!("one"); diff --git a/tests/debuginfo/constant-ordering-prologue.rs b/tests/debuginfo/constant-ordering-prologue.rs index 1d4674b1d32b0..65a5d39a858a4 100644 --- a/tests/debuginfo/constant-ordering-prologue.rs +++ b/tests/debuginfo/constant-ordering-prologue.rs @@ -5,27 +5,27 @@ // === GDB TESTS =================================================================================== -// gdb-command:break constant_ordering_prologue::binding -// gdb-command:run +//@ gdb-command:break constant_ordering_prologue::binding +//@ gdb-command:run -// gdb-command:print a -// gdb-check: = 19 -// gdb-command:print b -// gdb-check: = 20 -// gdb-command:print c -// gdb-check: = 21.5 +//@ gdb-command:print a +//@ gdb-check: = 19 +//@ gdb-command:print b +//@ gdb-check: = 20 +//@ gdb-command:print c +//@ gdb-check: = 21.5 // === LLDB TESTS ================================================================================== -// lldb-command:b "constant_ordering_prologue::binding" -// lldb-command:run +//@ lldb-command:b "constant_ordering_prologue::binding" +//@ lldb-command:run -// lldb-command:print a -// lldb-check: 19 -// lldb-command:print b -// lldb-check: 20 -// lldb-command:print c -// lldb-check: 21.5 +//@ lldb-command:print a +//@ lldb-check: 19 +//@ lldb-command:print b +//@ lldb-check: 20 +//@ lldb-command:print c +//@ lldb-check: 21.5 fn binding(a: i64, b: u64, c: f64) { let x = 0; diff --git a/tests/debuginfo/coroutine-closure.rs b/tests/debuginfo/coroutine-closure.rs index 002531084fb9c..882ecda240e5b 100644 --- a/tests/debuginfo/coroutine-closure.rs +++ b/tests/debuginfo/coroutine-closure.rs @@ -5,11 +5,11 @@ // === CDB TESTS ================================================================================== -// cdb-command: g -// cdb-command: dx closure -// cdb-check:closure [Type: coroutine_closure::main::closure_env$0] -// cdb-check: [+0x[...]] y : "" [Type: alloc::string::String] -// cdb-check: [+0x[...]] x : "" [Type: alloc::string::String] +//@ cdb-command: g +//@ cdb-command: dx closure +//@ cdb-check:closure [Type: coroutine_closure::main::closure_env$0] +//@ cdb-check: [+0x[...]] y : "" [Type: alloc::string::String] +//@ cdb-check: [+0x[...]] x : "" [Type: alloc::string::String] #![allow(unused)] fn main() { let x = String::new(); diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs index d63ea4bde3675..ac870ce8fa435 100644 --- a/tests/debuginfo/coroutine-locals.rs +++ b/tests/debuginfo/coroutine-locals.rs @@ -4,47 +4,47 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print a -// gdb-check:$1 = 5 -// gdb-command:print c -// gdb-check:$2 = 6 -// gdb-command:print d -// gdb-check:$3 = 7 -// gdb-command:continue -// gdb-command:print a -// gdb-check:$4 = 7 -// gdb-command:print c -// gdb-check:$5 = 6 -// gdb-command:print e -// gdb-check:$6 = 8 -// gdb-command:continue -// gdb-command:print a -// gdb-check:$7 = 8 -// gdb-command:print c -// gdb-check:$8 = 6 +//@ gdb-command:run +//@ gdb-command:print a +//@ gdb-check:$1 = 5 +//@ gdb-command:print c +//@ gdb-check:$2 = 6 +//@ gdb-command:print d +//@ gdb-check:$3 = 7 +//@ gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$4 = 7 +//@ gdb-command:print c +//@ gdb-check:$5 = 6 +//@ gdb-command:print e +//@ gdb-check:$6 = 8 +//@ gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$7 = 8 +//@ gdb-command:print c +//@ gdb-check:$8 = 6 // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v a -// lldb-check:(int) a = 5 -// lldb-command:v c -// lldb-check:(int) c = 6 -// lldb-command:v d -// lldb-check:(int) d = 7 -// lldb-command:continue -// lldb-command:v a -// lldb-check:(int) a = 7 -// lldb-command:v c -// lldb-check:(int) c = 6 -// lldb-command:v e -// lldb-check:(int) e = 8 -// lldb-command:continue -// lldb-command:v a -// lldb-check:(int) a = 8 -// lldb-command:v c -// lldb-check:(int) c = 6 +//@ lldb-command:run +//@ lldb-command:v a +//@ lldb-check:(int) a = 5 +//@ lldb-command:v c +//@ lldb-check:(int) c = 6 +//@ lldb-command:v d +//@ lldb-check:(int) d = 7 +//@ lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:(int) a = 7 +//@ lldb-command:v c +//@ lldb-check:(int) c = 6 +//@ lldb-command:v e +//@ lldb-check:(int) e = 8 +//@ lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:(int) a = 8 +//@ lldb-command:v c +//@ lldb-check:(int) c = 6 #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs index f1165de4bfaaf..4a41ffc319c6a 100644 --- a/tests/debuginfo/coroutine-objects.rs +++ b/tests/debuginfo/coroutine-objects.rs @@ -10,50 +10,50 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print b -// gdb-check:$1 = coroutine_objects::main::{coroutine_env#0}::Unresumed{_ref__a: 0x[...]} -// gdb-command:continue -// gdb-command:print b -// gdb-check:$2 = coroutine_objects::main::{coroutine_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]} -// gdb-command:continue -// gdb-command:print b -// gdb-check:$3 = coroutine_objects::main::{coroutine_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]} -// gdb-command:continue -// gdb-command:print b -// gdb-check:$4 = coroutine_objects::main::{coroutine_env#0}::Returned{_ref__a: 0x[...]} +//@ gdb-command:run +//@ gdb-command:print b +//@ gdb-check:$1 = coroutine_objects::main::{coroutine_env#0}::Unresumed{_ref__a: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print b +//@ gdb-check:$2 = coroutine_objects::main::{coroutine_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print b +//@ gdb-check:$3 = coroutine_objects::main::{coroutine_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]} +//@ gdb-command:continue +//@ gdb-command:print b +//@ gdb-check:$4 = coroutine_objects::main::{coroutine_env#0}::Returned{_ref__a: 0x[...]} // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v b -// lldb-check:(coroutine_objects::main::{coroutine_env#0}) b = { value = { _ref__a = 0x[...] } $discr$ = [...] } +//@ lldb-command:run +//@ lldb-command:v b +//@ lldb-check:(coroutine_objects::main::{coroutine_env#0}) b = { value = { _ref__a = 0x[...] } $discr$ = [...] } // === CDB TESTS =================================================================================== -// cdb-command: g -// cdb-command: dx b -// cdb-check: b : Unresumed [Type: enum2$] -// cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *] - -// cdb-command: g -// cdb-command: dx b -// cdb-check: b : Suspend0 [Type: enum2$] -// cdb-check: [+0x[...]] c : 6 [Type: int] -// cdb-check: [+0x[...]] d : 7 [Type: int] -// cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *] - -// cdb-command: g -// cdb-command: dx b -// cdb-check: b : Suspend1 [Type: enum2$] -// cdb-check: [+0x[...]] c : 7 [Type: int] -// cdb-check: [+0x[...]] d : 8 [Type: int] -// cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *] - -// cdb-command: g -// cdb-command: dx b -// cdb-check: b : Returned [Type: enum2$] -// cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *] +//@ cdb-command: g +//@ cdb-command: dx b +//@ cdb-check: b : Unresumed [Type: enum2$] +//@ cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *] + +//@ cdb-command: g +//@ cdb-command: dx b +//@ cdb-check: b : Suspend0 [Type: enum2$] +//@ cdb-check: [+0x[...]] c : 6 [Type: int] +//@ cdb-check: [+0x[...]] d : 7 [Type: int] +//@ cdb-check: [+0x[...]] _ref__a : 0x[...] : 5 [Type: int *] + +//@ cdb-command: g +//@ cdb-command: dx b +//@ cdb-check: b : Suspend1 [Type: enum2$] +//@ cdb-check: [+0x[...]] c : 7 [Type: int] +//@ cdb-check: [+0x[...]] d : 8 [Type: int] +//@ cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *] + +//@ cdb-command: g +//@ cdb-command: dx b +//@ cdb-check: b : Returned [Type: enum2$] +//@ cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *] #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs index 6ef17061070e8..97fcda13fe4b9 100644 --- a/tests/debuginfo/cross-crate-spans.rs +++ b/tests/debuginfo/cross-crate-spans.rs @@ -8,47 +8,47 @@ extern crate cross_crate_spans; // === GDB TESTS =================================================================================== -// gdb-command:break cross_crate_spans.rs:12 -// gdb-command:run +//@ gdb-command:break cross_crate_spans.rs:12 +//@ gdb-command:run -// gdb-command:print result -// gdb-check:$1 = (17, 17) -// gdb-command:print a_variable -// gdb-check:$2 = 123456789 -// gdb-command:print another_variable -// gdb-check:$3 = 123456789.5 -// gdb-command:continue +//@ gdb-command:print result +//@ gdb-check:$1 = (17, 17) +//@ gdb-command:print a_variable +//@ gdb-check:$2 = 123456789 +//@ gdb-command:print another_variable +//@ gdb-check:$3 = 123456789.5 +//@ gdb-command:continue -// gdb-command:print result -// gdb-check:$4 = (1212, 1212) -// gdb-command:print a_variable -// gdb-check:$5 = 123456789 -// gdb-command:print another_variable -// gdb-check:$6 = 123456789.5 -// gdb-command:continue +//@ gdb-command:print result +//@ gdb-check:$4 = (1212, 1212) +//@ gdb-command:print a_variable +//@ gdb-check:$5 = 123456789 +//@ gdb-command:print another_variable +//@ gdb-check:$6 = 123456789.5 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:b cross_crate_spans.rs:12 -// lldb-command:run - -// lldb-command:v result -// lldb-check:[...] { 0 = 17 1 = 17 } -// lldb-command:v a_variable -// lldb-check:[...] 123456789 -// lldb-command:v another_variable -// lldb-check:[...] 123456789.5 -// lldb-command:continue - -// lldb-command:v result -// lldb-check:[...] { 0 = 1212 1 = 1212 } -// lldb-command:v a_variable -// lldb-check:[...] 123456789 -// lldb-command:v another_variable -// lldb-check:[...] 123456789.5 -// lldb-command:continue +//@ lldb-command:b cross_crate_spans.rs:12 +//@ lldb-command:run + +//@ lldb-command:v result +//@ lldb-check:[...] { 0 = 17 1 = 17 } +//@ lldb-command:v a_variable +//@ lldb-check:[...] 123456789 +//@ lldb-command:v another_variable +//@ lldb-check:[...] 123456789.5 +//@ lldb-command:continue + +//@ lldb-command:v result +//@ lldb-check:[...] { 0 = 1212 1 = 1212 } +//@ lldb-command:v a_variable +//@ lldb-check:[...] 123456789 +//@ lldb-command:v another_variable +//@ lldb-check:[...] 123456789.5 +//@ lldb-command:continue // This test makes sure that we can break in functions inlined from other crates. diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs index 27910ed46882e..af9e620e61512 100644 --- a/tests/debuginfo/destructured-fn-argument.rs +++ b/tests/debuginfo/destructured-fn-argument.rs @@ -4,300 +4,300 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print a -// gdb-check:$1 = 1 -// gdb-command:print b -// gdb-check:$2 = false -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$3 = 2 -// gdb-command:print b -// gdb-check:$4 = 3 -// gdb-command:print c -// gdb-check:$5 = 4 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$6 = 5 -// gdb-command:print b -// gdb-check:$7 = (6, 7) -// gdb-command:continue - -// gdb-command:print h -// gdb-check:$8 = 8 -// gdb-command:print i -// gdb-check:$9 = destructured_fn_argument::Struct {a: 9, b: 10} -// gdb-command:print j -// gdb-check:$10 = 11 -// gdb-command:continue - -// gdb-command:print k -// gdb-check:$11 = 12 -// gdb-command:print l -// gdb-check:$12 = 13 -// gdb-command:continue - -// gdb-command:print m -// gdb-check:$13 = 14 -// gdb-command:print n -// gdb-check:$14 = 16 -// gdb-command:continue - -// gdb-command:print o -// gdb-check:$15 = 18 -// gdb-command:continue - -// gdb-command:print p -// gdb-check:$16 = 19 -// gdb-command:print q -// gdb-check:$17 = 20 -// gdb-command:print r -// gdb-check:$18 = destructured_fn_argument::Struct {a: 21, b: 22} -// gdb-command:continue - -// gdb-command:print s -// gdb-check:$19 = 24 -// gdb-command:print t -// gdb-check:$20 = 23 -// gdb-command:continue - -// gdb-command:print u -// gdb-check:$21 = 25 -// gdb-command:print v -// gdb-check:$22 = 26 -// gdb-command:print w -// gdb-check:$23 = 27 -// gdb-command:print x -// gdb-check:$24 = 28 -// gdb-command:print y -// gdb-check:$25 = 29 -// gdb-command:print z -// gdb-check:$26 = 30 -// gdb-command:print ae -// gdb-check:$27 = 31 -// gdb-command:print oe -// gdb-check:$28 = 32 -// gdb-command:print ue -// gdb-check:$29 = 33 -// gdb-command:continue - -// gdb-command:print aa -// gdb-check:$30 = (34, 35) -// gdb-command:continue - -// gdb-command:print bb -// gdb-check:$31 = (36, 37) -// gdb-command:continue - -// gdb-command:print cc -// gdb-check:$32 = 38 -// gdb-command:continue - -// gdb-command:print dd -// gdb-check:$33 = (40, 41, 42) -// gdb-command:continue - -// gdb-command:print *ee -// gdb-check:$34 = (43, 44, 45) -// gdb-command:continue - -// gdb-command:print *ff -// gdb-check:$35 = 46 -// gdb-command:print gg -// gdb-check:$36 = (47, 48) -// gdb-command:continue - -// gdb-command:print *hh -// gdb-check:$37 = 50 -// gdb-command:continue - -// gdb-command:print ii -// gdb-check:$38 = 51 -// gdb-command:continue - -// gdb-command:print *jj -// gdb-check:$39 = 52 -// gdb-command:continue - -// gdb-command:print kk -// gdb-check:$40 = 53 -// gdb-command:print ll -// gdb-check:$41 = 54 -// gdb-command:continue - -// gdb-command:print mm -// gdb-check:$42 = 55 -// gdb-command:print *nn -// gdb-check:$43 = 56 -// gdb-command:continue - -// gdb-command:print oo -// gdb-check:$44 = 57 -// gdb-command:print pp -// gdb-check:$45 = 58 -// gdb-command:print qq -// gdb-check:$46 = 59 -// gdb-command:continue - -// gdb-command:print rr -// gdb-check:$47 = 60 -// gdb-command:print ss -// gdb-check:$48 = 61 -// gdb-command:print tt -// gdb-check:$49 = 62 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print a +//@ gdb-check:$1 = 1 +//@ gdb-command:print b +//@ gdb-check:$2 = false +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$3 = 2 +//@ gdb-command:print b +//@ gdb-check:$4 = 3 +//@ gdb-command:print c +//@ gdb-check:$5 = 4 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$6 = 5 +//@ gdb-command:print b +//@ gdb-check:$7 = (6, 7) +//@ gdb-command:continue + +//@ gdb-command:print h +//@ gdb-check:$8 = 8 +//@ gdb-command:print i +//@ gdb-check:$9 = destructured_fn_argument::Struct {a: 9, b: 10} +//@ gdb-command:print j +//@ gdb-check:$10 = 11 +//@ gdb-command:continue + +//@ gdb-command:print k +//@ gdb-check:$11 = 12 +//@ gdb-command:print l +//@ gdb-check:$12 = 13 +//@ gdb-command:continue + +//@ gdb-command:print m +//@ gdb-check:$13 = 14 +//@ gdb-command:print n +//@ gdb-check:$14 = 16 +//@ gdb-command:continue + +//@ gdb-command:print o +//@ gdb-check:$15 = 18 +//@ gdb-command:continue + +//@ gdb-command:print p +//@ gdb-check:$16 = 19 +//@ gdb-command:print q +//@ gdb-check:$17 = 20 +//@ gdb-command:print r +//@ gdb-check:$18 = destructured_fn_argument::Struct {a: 21, b: 22} +//@ gdb-command:continue + +//@ gdb-command:print s +//@ gdb-check:$19 = 24 +//@ gdb-command:print t +//@ gdb-check:$20 = 23 +//@ gdb-command:continue + +//@ gdb-command:print u +//@ gdb-check:$21 = 25 +//@ gdb-command:print v +//@ gdb-check:$22 = 26 +//@ gdb-command:print w +//@ gdb-check:$23 = 27 +//@ gdb-command:print x +//@ gdb-check:$24 = 28 +//@ gdb-command:print y +//@ gdb-check:$25 = 29 +//@ gdb-command:print z +//@ gdb-check:$26 = 30 +//@ gdb-command:print ae +//@ gdb-check:$27 = 31 +//@ gdb-command:print oe +//@ gdb-check:$28 = 32 +//@ gdb-command:print ue +//@ gdb-check:$29 = 33 +//@ gdb-command:continue + +//@ gdb-command:print aa +//@ gdb-check:$30 = (34, 35) +//@ gdb-command:continue + +//@ gdb-command:print bb +//@ gdb-check:$31 = (36, 37) +//@ gdb-command:continue + +//@ gdb-command:print cc +//@ gdb-check:$32 = 38 +//@ gdb-command:continue + +//@ gdb-command:print dd +//@ gdb-check:$33 = (40, 41, 42) +//@ gdb-command:continue + +//@ gdb-command:print *ee +//@ gdb-check:$34 = (43, 44, 45) +//@ gdb-command:continue + +//@ gdb-command:print *ff +//@ gdb-check:$35 = 46 +//@ gdb-command:print gg +//@ gdb-check:$36 = (47, 48) +//@ gdb-command:continue + +//@ gdb-command:print *hh +//@ gdb-check:$37 = 50 +//@ gdb-command:continue + +//@ gdb-command:print ii +//@ gdb-check:$38 = 51 +//@ gdb-command:continue + +//@ gdb-command:print *jj +//@ gdb-check:$39 = 52 +//@ gdb-command:continue + +//@ gdb-command:print kk +//@ gdb-check:$40 = 53 +//@ gdb-command:print ll +//@ gdb-check:$41 = 54 +//@ gdb-command:continue + +//@ gdb-command:print mm +//@ gdb-check:$42 = 55 +//@ gdb-command:print *nn +//@ gdb-check:$43 = 56 +//@ gdb-command:continue + +//@ gdb-command:print oo +//@ gdb-check:$44 = 57 +//@ gdb-command:print pp +//@ gdb-check:$45 = 58 +//@ gdb-command:print qq +//@ gdb-check:$46 = 59 +//@ gdb-command:continue + +//@ gdb-command:print rr +//@ gdb-check:$47 = 60 +//@ gdb-command:print ss +//@ gdb-check:$48 = 61 +//@ gdb-command:print tt +//@ gdb-check:$49 = 62 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v a -// lldb-check:[...] 1 -// lldb-command:v b -// lldb-check:[...] false -// lldb-command:continue - -// lldb-command:v a -// lldb-check:[...] 2 -// lldb-command:v b -// lldb-check:[...] 3 -// lldb-command:v c -// lldb-check:[...] 4 -// lldb-command:continue - -// lldb-command:v a -// lldb-check:[...] 5 -// lldb-command:v b -// lldb-check:[...] { 0 = 6 1 = 7 } -// lldb-command:continue - -// lldb-command:v h -// lldb-check:[...] 8 -// lldb-command:v i -// lldb-check:[...] { a = 9 b = 10 } -// lldb-command:v j -// lldb-check:[...] 11 -// lldb-command:continue - -// lldb-command:v k -// lldb-check:[...] 12 -// lldb-command:v l -// lldb-check:[...] 13 -// lldb-command:continue - -// lldb-command:v m -// lldb-check:[...] 14 -// lldb-command:v n -// lldb-check:[...] 16 -// lldb-command:continue - -// lldb-command:v o -// lldb-check:[...] 18 -// lldb-command:continue - -// lldb-command:v p -// lldb-check:[...] 19 -// lldb-command:v q -// lldb-check:[...] 20 -// lldb-command:v r -// lldb-check:[...] { a = 21 b = 22 } -// lldb-command:continue - -// lldb-command:v s -// lldb-check:[...] 24 -// lldb-command:v t -// lldb-check:[...] 23 -// lldb-command:continue - -// lldb-command:v u -// lldb-check:[...] 25 -// lldb-command:v v -// lldb-check:[...] 26 -// lldb-command:v w -// lldb-check:[...] 27 -// lldb-command:v x -// lldb-check:[...] 28 -// lldb-command:v y -// lldb-check:[...] 29 -// lldb-command:v z -// lldb-check:[...] 30 -// lldb-command:v ae -// lldb-check:[...] 31 -// lldb-command:v oe -// lldb-check:[...] 32 -// lldb-command:v ue -// lldb-check:[...] 33 -// lldb-command:continue - -// lldb-command:v aa -// lldb-check:[...] { 0 = 34 1 = 35 } -// lldb-command:continue - -// lldb-command:v bb -// lldb-check:[...] { 0 = 36 1 = 37 } -// lldb-command:continue - -// lldb-command:v cc -// lldb-check:[...] 38 -// lldb-command:continue - -// lldb-command:v dd -// lldb-check:[...] { 0 = 40 1 = 41 2 = 42 } -// lldb-command:continue - -// lldb-command:v *ee -// lldb-check:[...] { 0 = 43 1 = 44 2 = 45 } -// lldb-command:continue - -// lldb-command:v *ff -// lldb-check:[...] 46 -// lldb-command:v gg -// lldb-check:[...] { 0 = 47 1 = 48 } -// lldb-command:continue - -// lldb-command:v *hh -// lldb-check:[...] 50 -// lldb-command:continue - -// lldb-command:v ii -// lldb-check:[...] 51 -// lldb-command:continue - -// lldb-command:v *jj -// lldb-check:[...] 52 -// lldb-command:continue - -// lldb-command:v kk -// lldb-check:[...] 53 -// lldb-command:v ll -// lldb-check:[...] 54 -// lldb-command:continue - -// lldb-command:v mm -// lldb-check:[...] 55 -// lldb-command:v *nn -// lldb-check:[...] 56 -// lldb-command:continue - -// lldb-command:v oo -// lldb-check:[...] 57 -// lldb-command:v pp -// lldb-check:[...] 58 -// lldb-command:v qq -// lldb-check:[...] 59 -// lldb-command:continue - -// lldb-command:v rr -// lldb-check:[...] 60 -// lldb-command:v ss -// lldb-check:[...] 61 -// lldb-command:v tt -// lldb-check:[...] 62 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v a +//@ lldb-check:[...] 1 +//@ lldb-command:v b +//@ lldb-check:[...] false +//@ lldb-command:continue + +//@ lldb-command:v a +//@ lldb-check:[...] 2 +//@ lldb-command:v b +//@ lldb-check:[...] 3 +//@ lldb-command:v c +//@ lldb-check:[...] 4 +//@ lldb-command:continue + +//@ lldb-command:v a +//@ lldb-check:[...] 5 +//@ lldb-command:v b +//@ lldb-check:[...] { 0 = 6 1 = 7 } +//@ lldb-command:continue + +//@ lldb-command:v h +//@ lldb-check:[...] 8 +//@ lldb-command:v i +//@ lldb-check:[...] { a = 9 b = 10 } +//@ lldb-command:v j +//@ lldb-check:[...] 11 +//@ lldb-command:continue + +//@ lldb-command:v k +//@ lldb-check:[...] 12 +//@ lldb-command:v l +//@ lldb-check:[...] 13 +//@ lldb-command:continue + +//@ lldb-command:v m +//@ lldb-check:[...] 14 +//@ lldb-command:v n +//@ lldb-check:[...] 16 +//@ lldb-command:continue + +//@ lldb-command:v o +//@ lldb-check:[...] 18 +//@ lldb-command:continue + +//@ lldb-command:v p +//@ lldb-check:[...] 19 +//@ lldb-command:v q +//@ lldb-check:[...] 20 +//@ lldb-command:v r +//@ lldb-check:[...] { a = 21 b = 22 } +//@ lldb-command:continue + +//@ lldb-command:v s +//@ lldb-check:[...] 24 +//@ lldb-command:v t +//@ lldb-check:[...] 23 +//@ lldb-command:continue + +//@ lldb-command:v u +//@ lldb-check:[...] 25 +//@ lldb-command:v v +//@ lldb-check:[...] 26 +//@ lldb-command:v w +//@ lldb-check:[...] 27 +//@ lldb-command:v x +//@ lldb-check:[...] 28 +//@ lldb-command:v y +//@ lldb-check:[...] 29 +//@ lldb-command:v z +//@ lldb-check:[...] 30 +//@ lldb-command:v ae +//@ lldb-check:[...] 31 +//@ lldb-command:v oe +//@ lldb-check:[...] 32 +//@ lldb-command:v ue +//@ lldb-check:[...] 33 +//@ lldb-command:continue + +//@ lldb-command:v aa +//@ lldb-check:[...] { 0 = 34 1 = 35 } +//@ lldb-command:continue + +//@ lldb-command:v bb +//@ lldb-check:[...] { 0 = 36 1 = 37 } +//@ lldb-command:continue + +//@ lldb-command:v cc +//@ lldb-check:[...] 38 +//@ lldb-command:continue + +//@ lldb-command:v dd +//@ lldb-check:[...] { 0 = 40 1 = 41 2 = 42 } +//@ lldb-command:continue + +//@ lldb-command:v *ee +//@ lldb-check:[...] { 0 = 43 1 = 44 2 = 45 } +//@ lldb-command:continue + +//@ lldb-command:v *ff +//@ lldb-check:[...] 46 +//@ lldb-command:v gg +//@ lldb-check:[...] { 0 = 47 1 = 48 } +//@ lldb-command:continue + +//@ lldb-command:v *hh +//@ lldb-check:[...] 50 +//@ lldb-command:continue + +//@ lldb-command:v ii +//@ lldb-check:[...] 51 +//@ lldb-command:continue + +//@ lldb-command:v *jj +//@ lldb-check:[...] 52 +//@ lldb-command:continue + +//@ lldb-command:v kk +//@ lldb-check:[...] 53 +//@ lldb-command:v ll +//@ lldb-check:[...] 54 +//@ lldb-command:continue + +//@ lldb-command:v mm +//@ lldb-check:[...] 55 +//@ lldb-command:v *nn +//@ lldb-check:[...] 56 +//@ lldb-command:continue + +//@ lldb-command:v oo +//@ lldb-check:[...] 57 +//@ lldb-command:v pp +//@ lldb-check:[...] 58 +//@ lldb-command:v qq +//@ lldb-check:[...] 59 +//@ lldb-command:continue + +//@ lldb-command:v rr +//@ lldb-check:[...] 60 +//@ lldb-command:v ss +//@ lldb-check:[...] 61 +//@ lldb-command:v tt +//@ lldb-check:[...] 62 +//@ lldb-command:continue #![allow(unused_variables)] #![feature(box_patterns)] diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs index 12a9ff4172583..8ea6f70aa0497 100644 --- a/tests/debuginfo/destructured-for-loop-variable.rs +++ b/tests/debuginfo/destructured-for-loop-variable.rs @@ -4,142 +4,142 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // DESTRUCTURED STRUCT -// gdb-command:print x -// gdb-check:$1 = 400 -// gdb-command:print y -// gdb-check:$2 = 401.5 -// gdb-command:print z -// gdb-check:$3 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 400 +//@ gdb-command:print y +//@ gdb-check:$2 = 401.5 +//@ gdb-command:print z +//@ gdb-check:$3 = true +//@ gdb-command:continue // DESTRUCTURED TUPLE -// gdb-command:print/x _i8 -// gdb-check:$4 = 0x6f -// gdb-command:print/x _u8 -// gdb-check:$5 = 0x70 -// gdb-command:print _i16 -// gdb-check:$6 = -113 -// gdb-command:print _u16 -// gdb-check:$7 = 114 -// gdb-command:print _i32 -// gdb-check:$8 = -115 -// gdb-command:print _u32 -// gdb-check:$9 = 116 -// gdb-command:print _i64 -// gdb-check:$10 = -117 -// gdb-command:print _u64 -// gdb-check:$11 = 118 -// gdb-command:print _f32 -// gdb-check:$12 = 119.5 -// gdb-command:print _f64 -// gdb-check:$13 = 120.5 -// gdb-command:continue +//@ gdb-command:print/x _i8 +//@ gdb-check:$4 = 0x6f +//@ gdb-command:print/x _u8 +//@ gdb-check:$5 = 0x70 +//@ gdb-command:print _i16 +//@ gdb-check:$6 = -113 +//@ gdb-command:print _u16 +//@ gdb-check:$7 = 114 +//@ gdb-command:print _i32 +//@ gdb-check:$8 = -115 +//@ gdb-command:print _u32 +//@ gdb-check:$9 = 116 +//@ gdb-command:print _i64 +//@ gdb-check:$10 = -117 +//@ gdb-command:print _u64 +//@ gdb-check:$11 = 118 +//@ gdb-command:print _f32 +//@ gdb-check:$12 = 119.5 +//@ gdb-command:print _f64 +//@ gdb-check:$13 = 120.5 +//@ gdb-command:continue // MORE COMPLEX CASE -// gdb-command:print v1 -// gdb-check:$14 = 80000 -// gdb-command:print x1 -// gdb-check:$15 = 8000 -// gdb-command:print *y1 -// gdb-check:$16 = 80001.5 -// gdb-command:print z1 -// gdb-check:$17 = false -// gdb-command:print *x2 -// gdb-check:$18 = -30000 -// gdb-command:print y2 -// gdb-check:$19 = -300001.5 -// gdb-command:print *z2 -// gdb-check:$20 = true -// gdb-command:print v2 -// gdb-check:$21 = 854237.5 -// gdb-command:continue +//@ gdb-command:print v1 +//@ gdb-check:$14 = 80000 +//@ gdb-command:print x1 +//@ gdb-check:$15 = 8000 +//@ gdb-command:print *y1 +//@ gdb-check:$16 = 80001.5 +//@ gdb-command:print z1 +//@ gdb-check:$17 = false +//@ gdb-command:print *x2 +//@ gdb-check:$18 = -30000 +//@ gdb-command:print y2 +//@ gdb-check:$19 = -300001.5 +//@ gdb-command:print *z2 +//@ gdb-check:$20 = true +//@ gdb-command:print v2 +//@ gdb-check:$21 = 854237.5 +//@ gdb-command:continue // SIMPLE IDENTIFIER -// gdb-command:print i -// gdb-check:$22 = 1234 -// gdb-command:continue +//@ gdb-command:print i +//@ gdb-check:$22 = 1234 +//@ gdb-command:continue -// gdb-command:print simple_struct_ident -// gdb-check:$23 = destructured_for_loop_variable::Struct {x: 3537, y: 35437.5, z: true} -// gdb-command:continue +//@ gdb-command:print simple_struct_ident +//@ gdb-check:$23 = destructured_for_loop_variable::Struct {x: 3537, y: 35437.5, z: true} +//@ gdb-command:continue -// gdb-command:print simple_tuple_ident -// gdb-check:$24 = (34903493, 232323) -// gdb-command:continue +//@ gdb-command:print simple_tuple_ident +//@ gdb-check:$24 = (34903493, 232323) +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:type format add --format hex char -// lldb-command:type format add --format hex 'unsigned char' +//@ lldb-command:type format add --format hex char +//@ lldb-command:type format add --format hex 'unsigned char' -// lldb-command:run +//@ lldb-command:run // DESTRUCTURED STRUCT -// lldb-command:v x -// lldb-check:[...] 400 -// lldb-command:v y -// lldb-check:[...] 401.5 -// lldb-command:v z -// lldb-check:[...] true -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 400 +//@ lldb-command:v y +//@ lldb-check:[...] 401.5 +//@ lldb-command:v z +//@ lldb-check:[...] true +//@ lldb-command:continue // DESTRUCTURED TUPLE -// lldb-command:v _i8 -// lldb-check:[...] 0x6f -// lldb-command:v _u8 -// lldb-check:[...] 0x70 -// lldb-command:v _i16 -// lldb-check:[...] -113 -// lldb-command:v _u16 -// lldb-check:[...] 114 -// lldb-command:v _i32 -// lldb-check:[...] -115 -// lldb-command:v _u32 -// lldb-check:[...] 116 -// lldb-command:v _i64 -// lldb-check:[...] -117 -// lldb-command:v _u64 -// lldb-check:[...] 118 -// lldb-command:v _f32 -// lldb-check:[...] 119.5 -// lldb-command:v _f64 -// lldb-check:[...] 120.5 -// lldb-command:continue +//@ lldb-command:v _i8 +//@ lldb-check:[...] 0x6f +//@ lldb-command:v _u8 +//@ lldb-check:[...] 0x70 +//@ lldb-command:v _i16 +//@ lldb-check:[...] -113 +//@ lldb-command:v _u16 +//@ lldb-check:[...] 114 +//@ lldb-command:v _i32 +//@ lldb-check:[...] -115 +//@ lldb-command:v _u32 +//@ lldb-check:[...] 116 +//@ lldb-command:v _i64 +//@ lldb-check:[...] -117 +//@ lldb-command:v _u64 +//@ lldb-check:[...] 118 +//@ lldb-command:v _f32 +//@ lldb-check:[...] 119.5 +//@ lldb-command:v _f64 +//@ lldb-check:[...] 120.5 +//@ lldb-command:continue // MORE COMPLEX CASE -// lldb-command:v v1 -// lldb-check:[...] 80000 -// lldb-command:v x1 -// lldb-check:[...] 8000 -// lldb-command:v *y1 -// lldb-check:[...] 80001.5 -// lldb-command:v z1 -// lldb-check:[...] false -// lldb-command:v *x2 -// lldb-check:[...] -30000 -// lldb-command:v y2 -// lldb-check:[...] -300001.5 -// lldb-command:v *z2 -// lldb-check:[...] true -// lldb-command:v v2 -// lldb-check:[...] 854237.5 -// lldb-command:continue +//@ lldb-command:v v1 +//@ lldb-check:[...] 80000 +//@ lldb-command:v x1 +//@ lldb-check:[...] 8000 +//@ lldb-command:v *y1 +//@ lldb-check:[...] 80001.5 +//@ lldb-command:v z1 +//@ lldb-check:[...] false +//@ lldb-command:v *x2 +//@ lldb-check:[...] -30000 +//@ lldb-command:v y2 +//@ lldb-check:[...] -300001.5 +//@ lldb-command:v *z2 +//@ lldb-check:[...] true +//@ lldb-command:v v2 +//@ lldb-check:[...] 854237.5 +//@ lldb-command:continue // SIMPLE IDENTIFIER -// lldb-command:v i -// lldb-check:[...] 1234 -// lldb-command:continue +//@ lldb-command:v i +//@ lldb-check:[...] 1234 +//@ lldb-command:continue -// lldb-command:v simple_struct_ident -// lldb-check:[...] { x = 3537 y = 35437.5 z = true } -// lldb-command:continue +//@ lldb-command:v simple_struct_ident +//@ lldb-check:[...] { x = 3537 y = 35437.5 z = true } +//@ lldb-command:continue -// lldb-command:v simple_tuple_ident -// lldb-check:[...] { 0 = 34903493 1 = 232323 } -// lldb-command:continue +//@ lldb-command:v simple_tuple_ident +//@ lldb-check:[...] { 0 = 34903493 1 = 232323 } +//@ lldb-command:continue #![allow(unused_variables)] #![feature(box_patterns)] diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs index ef595468b473f..13399480ca445 100644 --- a/tests/debuginfo/destructured-local.rs +++ b/tests/debuginfo/destructured-local.rs @@ -4,232 +4,232 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print a -// gdb-check:$1 = 1 -// gdb-command:print b -// gdb-check:$2 = false - -// gdb-command:print c -// gdb-check:$3 = 2 -// gdb-command:print d -// gdb-check:$4 = 3 -// gdb-command:print e -// gdb-check:$5 = 4 - -// gdb-command:print f -// gdb-check:$6 = 5 -// gdb-command:print g -// gdb-check:$7 = (6, 7) - -// gdb-command:print h -// gdb-check:$8 = 8 -// gdb-command:print i -// gdb-check:$9 = destructured_local::Struct {a: 9, b: 10} -// gdb-command:print j -// gdb-check:$10 = 11 - -// gdb-command:print k -// gdb-check:$11 = 12 -// gdb-command:print l -// gdb-check:$12 = 13 - -// gdb-command:print m -// gdb-check:$13 = 14 -// gdb-command:print n -// gdb-check:$14 = 16 - -// gdb-command:print o -// gdb-check:$15 = 18 - -// gdb-command:print p -// gdb-check:$16 = 19 -// gdb-command:print q -// gdb-check:$17 = 20 -// gdb-command:print r -// gdb-check:$18 = destructured_local::Struct {a: 21, b: 22} - -// gdb-command:print s -// gdb-check:$19 = 24 -// gdb-command:print t -// gdb-check:$20 = 23 - -// gdb-command:print u -// gdb-check:$21 = 25 -// gdb-command:print v -// gdb-check:$22 = 26 -// gdb-command:print w -// gdb-check:$23 = 27 -// gdb-command:print x -// gdb-check:$24 = 28 -// gdb-command:print y -// gdb-check:$25 = 29 -// gdb-command:print z -// gdb-check:$26 = 30 -// gdb-command:print ae -// gdb-check:$27 = 31 -// gdb-command:print oe -// gdb-check:$28 = 32 -// gdb-command:print ue -// gdb-check:$29 = 33 - -// gdb-command:print aa -// gdb-check:$30 = (34, 35) - -// gdb-command:print bb -// gdb-check:$31 = (36, 37) - -// gdb-command:print cc -// gdb-check:$32 = 38 - -// gdb-command:print dd -// gdb-check:$33 = (40, 41, 42) - -// gdb-command:print *ee -// gdb-check:$34 = (43, 44, 45) - -// gdb-command:print *ff -// gdb-check:$35 = 46 - -// gdb-command:print gg -// gdb-check:$36 = (47, 48) - -// gdb-command:print *hh -// gdb-check:$37 = 50 - -// gdb-command:print ii -// gdb-check:$38 = 51 - -// gdb-command:print *jj -// gdb-check:$39 = 52 - -// gdb-command:print kk -// gdb-check:$40 = 53 - -// gdb-command:print ll -// gdb-check:$41 = 54 - -// gdb-command:print mm -// gdb-check:$42 = 55 - -// gdb-command:print *nn -// gdb-check:$43 = 56 +//@ gdb-command:run + +//@ gdb-command:print a +//@ gdb-check:$1 = 1 +//@ gdb-command:print b +//@ gdb-check:$2 = false + +//@ gdb-command:print c +//@ gdb-check:$3 = 2 +//@ gdb-command:print d +//@ gdb-check:$4 = 3 +//@ gdb-command:print e +//@ gdb-check:$5 = 4 + +//@ gdb-command:print f +//@ gdb-check:$6 = 5 +//@ gdb-command:print g +//@ gdb-check:$7 = (6, 7) + +//@ gdb-command:print h +//@ gdb-check:$8 = 8 +//@ gdb-command:print i +//@ gdb-check:$9 = destructured_local::Struct {a: 9, b: 10} +//@ gdb-command:print j +//@ gdb-check:$10 = 11 + +//@ gdb-command:print k +//@ gdb-check:$11 = 12 +//@ gdb-command:print l +//@ gdb-check:$12 = 13 + +//@ gdb-command:print m +//@ gdb-check:$13 = 14 +//@ gdb-command:print n +//@ gdb-check:$14 = 16 + +//@ gdb-command:print o +//@ gdb-check:$15 = 18 + +//@ gdb-command:print p +//@ gdb-check:$16 = 19 +//@ gdb-command:print q +//@ gdb-check:$17 = 20 +//@ gdb-command:print r +//@ gdb-check:$18 = destructured_local::Struct {a: 21, b: 22} + +//@ gdb-command:print s +//@ gdb-check:$19 = 24 +//@ gdb-command:print t +//@ gdb-check:$20 = 23 + +//@ gdb-command:print u +//@ gdb-check:$21 = 25 +//@ gdb-command:print v +//@ gdb-check:$22 = 26 +//@ gdb-command:print w +//@ gdb-check:$23 = 27 +//@ gdb-command:print x +//@ gdb-check:$24 = 28 +//@ gdb-command:print y +//@ gdb-check:$25 = 29 +//@ gdb-command:print z +//@ gdb-check:$26 = 30 +//@ gdb-command:print ae +//@ gdb-check:$27 = 31 +//@ gdb-command:print oe +//@ gdb-check:$28 = 32 +//@ gdb-command:print ue +//@ gdb-check:$29 = 33 + +//@ gdb-command:print aa +//@ gdb-check:$30 = (34, 35) + +//@ gdb-command:print bb +//@ gdb-check:$31 = (36, 37) + +//@ gdb-command:print cc +//@ gdb-check:$32 = 38 + +//@ gdb-command:print dd +//@ gdb-check:$33 = (40, 41, 42) + +//@ gdb-command:print *ee +//@ gdb-check:$34 = (43, 44, 45) + +//@ gdb-command:print *ff +//@ gdb-check:$35 = 46 + +//@ gdb-command:print gg +//@ gdb-check:$36 = (47, 48) + +//@ gdb-command:print *hh +//@ gdb-check:$37 = 50 + +//@ gdb-command:print ii +//@ gdb-check:$38 = 51 + +//@ gdb-command:print *jj +//@ gdb-check:$39 = 52 + +//@ gdb-command:print kk +//@ gdb-check:$40 = 53 + +//@ gdb-command:print ll +//@ gdb-check:$41 = 54 + +//@ gdb-command:print mm +//@ gdb-check:$42 = 55 + +//@ gdb-command:print *nn +//@ gdb-check:$43 = 56 // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v a -// lldb-check:[...] 1 -// lldb-command:v b -// lldb-check:[...] false - -// lldb-command:v c -// lldb-check:[...] 2 -// lldb-command:v d -// lldb-check:[...] 3 -// lldb-command:v e -// lldb-check:[...] 4 - -// lldb-command:v f -// lldb-check:[...] 5 -// lldb-command:v g -// lldb-check:[...] { 0 = 6 1 = 7 } - -// lldb-command:v h -// lldb-check:[...] 8 -// lldb-command:v i -// lldb-check:[...] { a = 9 b = 10 } -// lldb-command:v j -// lldb-check:[...] 11 - -// lldb-command:v k -// lldb-check:[...] 12 -// lldb-command:v l -// lldb-check:[...] 13 - -// lldb-command:v m -// lldb-check:[...] 14 -// lldb-command:v n -// lldb-check:[...] 16 - -// lldb-command:v o -// lldb-check:[...] 18 - -// lldb-command:v p -// lldb-check:[...] 19 -// lldb-command:v q -// lldb-check:[...] 20 -// lldb-command:v r -// lldb-check:[...] { a = 21 b = 22 } - -// lldb-command:v s -// lldb-check:[...] 24 -// lldb-command:v t -// lldb-check:[...] 23 - -// lldb-command:v u -// lldb-check:[...] 25 -// lldb-command:v v -// lldb-check:[...] 26 -// lldb-command:v w -// lldb-check:[...] 27 -// lldb-command:v x -// lldb-check:[...] 28 -// lldb-command:v y -// lldb-check:[...] 29 -// lldb-command:v z -// lldb-check:[...] 30 -// lldb-command:v ae -// lldb-check:[...] 31 -// lldb-command:v oe -// lldb-check:[...] 32 -// lldb-command:v ue -// lldb-check:[...] 33 - -// lldb-command:v aa -// lldb-check:[...] { 0 = 34 1 = 35 } - -// lldb-command:v bb -// lldb-check:[...] { 0 = 36 1 = 37 } - -// lldb-command:v cc -// lldb-check:[...] 38 - -// lldb-command:v dd -// lldb-check:[...] { 0 = 40 1 = 41 2 = 42 } - -// lldb-command:v *ee -// lldb-check:[...] { 0 = 43 1 = 44 2 = 45 } - -// lldb-command:v *ff -// lldb-check:[...] 46 - -// lldb-command:v gg -// lldb-check:[...] { 0 = 47 1 = 48 } - -// lldb-command:v *hh -// lldb-check:[...] 50 - -// lldb-command:v ii -// lldb-check:[...] 51 - -// lldb-command:v *jj -// lldb-check:[...] 52 - -// lldb-command:v kk -// lldb-check:[...] 53 - -// lldb-command:v ll -// lldb-check:[...] 54 - -// lldb-command:v mm -// lldb-check:[...] 55 - -// lldb-command:v *nn -// lldb-check:[...] 56 +//@ lldb-command:run + +//@ lldb-command:v a +//@ lldb-check:[...] 1 +//@ lldb-command:v b +//@ lldb-check:[...] false + +//@ lldb-command:v c +//@ lldb-check:[...] 2 +//@ lldb-command:v d +//@ lldb-check:[...] 3 +//@ lldb-command:v e +//@ lldb-check:[...] 4 + +//@ lldb-command:v f +//@ lldb-check:[...] 5 +//@ lldb-command:v g +//@ lldb-check:[...] { 0 = 6 1 = 7 } + +//@ lldb-command:v h +//@ lldb-check:[...] 8 +//@ lldb-command:v i +//@ lldb-check:[...] { a = 9 b = 10 } +//@ lldb-command:v j +//@ lldb-check:[...] 11 + +//@ lldb-command:v k +//@ lldb-check:[...] 12 +//@ lldb-command:v l +//@ lldb-check:[...] 13 + +//@ lldb-command:v m +//@ lldb-check:[...] 14 +//@ lldb-command:v n +//@ lldb-check:[...] 16 + +//@ lldb-command:v o +//@ lldb-check:[...] 18 + +//@ lldb-command:v p +//@ lldb-check:[...] 19 +//@ lldb-command:v q +//@ lldb-check:[...] 20 +//@ lldb-command:v r +//@ lldb-check:[...] { a = 21 b = 22 } + +//@ lldb-command:v s +//@ lldb-check:[...] 24 +//@ lldb-command:v t +//@ lldb-check:[...] 23 + +//@ lldb-command:v u +//@ lldb-check:[...] 25 +//@ lldb-command:v v +//@ lldb-check:[...] 26 +//@ lldb-command:v w +//@ lldb-check:[...] 27 +//@ lldb-command:v x +//@ lldb-check:[...] 28 +//@ lldb-command:v y +//@ lldb-check:[...] 29 +//@ lldb-command:v z +//@ lldb-check:[...] 30 +//@ lldb-command:v ae +//@ lldb-check:[...] 31 +//@ lldb-command:v oe +//@ lldb-check:[...] 32 +//@ lldb-command:v ue +//@ lldb-check:[...] 33 + +//@ lldb-command:v aa +//@ lldb-check:[...] { 0 = 34 1 = 35 } + +//@ lldb-command:v bb +//@ lldb-check:[...] { 0 = 36 1 = 37 } + +//@ lldb-command:v cc +//@ lldb-check:[...] 38 + +//@ lldb-command:v dd +//@ lldb-check:[...] { 0 = 40 1 = 41 2 = 42 } + +//@ lldb-command:v *ee +//@ lldb-check:[...] { 0 = 43 1 = 44 2 = 45 } + +//@ lldb-command:v *ff +//@ lldb-check:[...] 46 + +//@ lldb-command:v gg +//@ lldb-check:[...] { 0 = 47 1 = 48 } + +//@ lldb-command:v *hh +//@ lldb-check:[...] 50 + +//@ lldb-command:v ii +//@ lldb-check:[...] 51 + +//@ lldb-command:v *jj +//@ lldb-check:[...] 52 + +//@ lldb-command:v kk +//@ lldb-check:[...] 53 + +//@ lldb-command:v ll +//@ lldb-check:[...] 54 + +//@ lldb-command:v mm +//@ lldb-check:[...] 55 + +//@ lldb-command:v *nn +//@ lldb-check:[...] 56 #![allow(unused_variables)] diff --git a/tests/debuginfo/drop-locations.rs b/tests/debuginfo/drop-locations.rs index 91b3da5c34a8e..527ea8d9ed3a1 100644 --- a/tests/debuginfo/drop-locations.rs +++ b/tests/debuginfo/drop-locations.rs @@ -12,52 +12,52 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc4[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc5[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc6[...] +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc4[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc5[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc6[...] // === LLDB TESTS ================================================================================== -// lldb-command:set set stop-line-count-before 0 -// lldb-command:set set stop-line-count-after 1 +//@ lldb-command:set set stop-line-count-before 0 +//@ lldb-command:set set stop-line-count-after 1 // Can't set both to zero or lldb will stop printing source at all. So it will output the current // line and the next. We deal with this by having at least 2 lines between the #loc's -// lldb-command:run -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc1 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc2 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc3 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc4 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc5 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc6 [...] +//@ lldb-command:run +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc1 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc2 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc3 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc4 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc5 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc6 [...] fn main() { diff --git a/tests/debuginfo/dummy_span.rs b/tests/debuginfo/dummy_span.rs index 23822222006c2..fec4f33e3d569 100644 --- a/tests/debuginfo/dummy_span.rs +++ b/tests/debuginfo/dummy_span.rs @@ -5,25 +5,25 @@ // === GDB TESTS =================================================================================== -// gdb-command:run 7 +//@ gdb-command:run 7 -// gdb-command:next -// gdb-command:next -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:next +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-check:[...]#loc2[...] // === LLDB TESTS ================================================================================== -// lldb-command:run 7 +//@ lldb-command:run 7 -// lldb-command:next -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...]#loc1[...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...]#loc2[...] +//@ lldb-command:next +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...]#loc1[...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...]#loc2[...] use std::env; use std::num::ParseIntError; diff --git a/tests/debuginfo/duration-type.rs b/tests/debuginfo/duration-type.rs index 4e4b17c02e10e..2d980cc295563 100644 --- a/tests/debuginfo/duration-type.rs +++ b/tests/debuginfo/duration-type.rs @@ -3,13 +3,13 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx duration -// cdb-check:duration : 5s 12ns [Type: core::time::Duration] -// cdb-check: [] [Type: core::time::Duration] -// cdb-check: seconds : 5 [Type: unsigned __int64] -// cdb-check: nanoseconds : 12 [Type: unsigned int] +//@ cdb-command: dx duration +//@ cdb-check:duration : 5s 12ns [Type: core::time::Duration] +//@ cdb-check: [] [Type: core::time::Duration] +//@ cdb-check: seconds : 5 [Type: unsigned __int64] +//@ cdb-check: nanoseconds : 12 [Type: unsigned int] use std::time::Duration; diff --git a/tests/debuginfo/embedded-visualizer.rs b/tests/debuginfo/embedded-visualizer.rs index 3652036ae8b64..3f403d57abe9b 100644 --- a/tests/debuginfo/embedded-visualizer.rs +++ b/tests/debuginfo/embedded-visualizer.rs @@ -4,59 +4,59 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g // The .nvlist command in cdb does not always have a deterministic output // for the order that NatVis files are displayed. -// cdb-command: .nvlist -// cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-0.natvis") +//@ cdb-command: .nvlist +//@ cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-0.natvis") -// cdb-command: .nvlist -// cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-1.natvis") +//@ cdb-command: .nvlist +//@ cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-1.natvis") -// cdb-command: .nvlist -// cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-2.natvis") +//@ cdb-command: .nvlist +//@ cdb-check: [...].exe (embedded NatVis "[...]embedded_visualizer-2.natvis") -// cdb-command: dx point_a -// cdb-check:point_a : (0, 0) [Type: embedded_visualizer::point::Point] -// cdb-check: [] [Type: embedded_visualizer::point::Point] -// cdb-check: [x] : 0 [Type: int] -// cdb-check: [y] : 0 [Type: int] +//@ cdb-command: dx point_a +//@ cdb-check:point_a : (0, 0) [Type: embedded_visualizer::point::Point] +//@ cdb-check: [] [Type: embedded_visualizer::point::Point] +//@ cdb-check: [x] : 0 [Type: int] +//@ cdb-check: [y] : 0 [Type: int] -// cdb-command: dx point_b -// cdb-check:point_b : (5, 8) [Type: embedded_visualizer::point::Point] -// cdb-check: [] [Type: embedded_visualizer::point::Point] -// cdb-check: [x] : 5 [Type: int] -// cdb-check: [y] : 8 [Type: int] +//@ cdb-command: dx point_b +//@ cdb-check:point_b : (5, 8) [Type: embedded_visualizer::point::Point] +//@ cdb-check: [] [Type: embedded_visualizer::point::Point] +//@ cdb-check: [x] : 5 [Type: int] +//@ cdb-check: [y] : 8 [Type: int] -// cdb-command: dx line -// cdb-check:line : ((0, 0), (5, 8)) [Type: embedded_visualizer::Line] -// cdb-check: [] [Type: embedded_visualizer::Line] -// cdb-check: [a] : (0, 0) [Type: embedded_visualizer::point::Point] -// cdb-check: [b] : (5, 8) [Type: embedded_visualizer::point::Point] +//@ cdb-command: dx line +//@ cdb-check:line : ((0, 0), (5, 8)) [Type: embedded_visualizer::Line] +//@ cdb-check: [] [Type: embedded_visualizer::Line] +//@ cdb-check: [a] : (0, 0) [Type: embedded_visualizer::point::Point] +//@ cdb-check: [b] : (5, 8) [Type: embedded_visualizer::point::Point] -// cdb-command: dx person -// cdb-check:person : "Person A" is 10 years old. [Type: dependency_with_embedded_visualizers::Person] -// cdb-check: [] [Type: dependency_with_embedded_visualizers::Person] -// cdb-check: [name] : "Person A" [Type: alloc::string::String] -// cdb-check: [age] : 10 [Type: int] +//@ cdb-command: dx person +//@ cdb-check:person : "Person A" is 10 years old. [Type: dependency_with_embedded_visualizers::Person] +//@ cdb-check: [] [Type: dependency_with_embedded_visualizers::Person] +//@ cdb-check: [name] : "Person A" [Type: alloc::string::String] +//@ cdb-check: [age] : 10 [Type: int] // === GDB TESTS =================================================================================== -// gdb-command: run - -// gdb-command: info auto-load python-scripts -// gdb-check:Yes pretty-printer-embedded_visualizer-0 -// gdb-check:Yes pretty-printer-embedded_visualizer-1 -// gdb-command: print point_a -// gdb-check:$1 = (0, 0) -// gdb-command: print point_b -// gdb-check:$2 = (5, 8) -// gdb-command: print line -// gdb-check:$3 = ((0, 0), (5, 8)) -// gdb-command: print person -// gdb-check:$4 = "Person A" is 10 years old. +//@ gdb-command: run + +//@ gdb-command: info auto-load python-scripts +//@ gdb-check:Yes pretty-printer-embedded_visualizer-0 +//@ gdb-check:Yes pretty-printer-embedded_visualizer-1 +//@ gdb-command: print point_a +//@ gdb-check:$1 = (0, 0) +//@ gdb-command: print point_b +//@ gdb-check:$2 = (5, 8) +//@ gdb-command: print line +//@ gdb-check:$3 = ((0, 0), (5, 8)) +//@ gdb-command: print person +//@ gdb-check:$4 = "Person A" is 10 years old. #![allow(unused_variables)] #![debugger_visualizer(natvis_file = "embedded-visualizer.natvis")] diff --git a/tests/debuginfo/empty-string.rs b/tests/debuginfo/empty-string.rs index d9368001b6312..7454d171a4592 100644 --- a/tests/debuginfo/empty-string.rs +++ b/tests/debuginfo/empty-string.rs @@ -5,23 +5,23 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print empty_string -// gdb-check:$1 = "" +//@ gdb-command: print empty_string +//@ gdb-check:$1 = "" -// gdb-command: print empty_str -// gdb-check:$2 = "" +//@ gdb-command: print empty_str +//@ gdb-check:$2 = "" // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:fr v empty_string -// lldb-check:[...] empty_string = "" +//@ lldb-command:fr v empty_string +//@ lldb-check:[...] empty_string = "" -// lldb-command:fr v empty_str -// lldb-check:[...] empty_str = "" +//@ lldb-command:fr v empty_str +//@ lldb-check:[...] empty_str = "" fn main() { let empty_string = String::new(); diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index 789755438a6b9..c29dd6b174c13 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -5,17 +5,17 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *abc -// gdb-check:$1 = enum_thinlto::ABC::TheA{x: 0, y: 8970181431921507452} +//@ gdb-command:print *abc +//@ gdb-check:$1 = enum_thinlto::ABC::TheA{x: 0, y: 8970181431921507452} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *abc -// lldb-check:(enum_thinlto::ABC) *abc = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 } +//@ lldb-command:v *abc +//@ lldb-check:(enum_thinlto::ABC) *abc = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 } #![allow(unused_variables)] diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs index 1c0c0a36bace8..bbcad48259e00 100644 --- a/tests/debuginfo/evec-in-struct.rs +++ b/tests/debuginfo/evec-in-struct.rs @@ -4,40 +4,40 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print no_padding1 -// gdb-check:$1 = evec_in_struct::NoPadding1 {x: [0, 1, 2], y: -3, z: [4.5, 5.5]} -// gdb-command:print no_padding2 -// gdb-check:$2 = evec_in_struct::NoPadding2 {x: [6, 7, 8], y: [[9, 10], [11, 12]]} +//@ gdb-command:print no_padding1 +//@ gdb-check:$1 = evec_in_struct::NoPadding1 {x: [0, 1, 2], y: -3, z: [4.5, 5.5]} +//@ gdb-command:print no_padding2 +//@ gdb-check:$2 = evec_in_struct::NoPadding2 {x: [6, 7, 8], y: [[9, 10], [11, 12]]} -// gdb-command:print struct_internal_padding -// gdb-check:$3 = evec_in_struct::StructInternalPadding {x: [13, 14], y: [15, 16]} +//@ gdb-command:print struct_internal_padding +//@ gdb-check:$3 = evec_in_struct::StructInternalPadding {x: [13, 14], y: [15, 16]} -// gdb-command:print single_vec -// gdb-check:$4 = evec_in_struct::SingleVec {x: [17, 18, 19, 20, 21]} +//@ gdb-command:print single_vec +//@ gdb-check:$4 = evec_in_struct::SingleVec {x: [17, 18, 19, 20, 21]} -// gdb-command:print struct_padded_at_end -// gdb-check:$5 = evec_in_struct::StructPaddedAtEnd {x: [22, 23], y: [24, 25]} +//@ gdb-command:print struct_padded_at_end +//@ gdb-check:$5 = evec_in_struct::StructPaddedAtEnd {x: [22, 23], y: [24, 25]} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v no_padding1 -// lldb-check:[...] { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } -// lldb-command:v no_padding2 -// lldb-check:[...] { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } +//@ lldb-command:v no_padding1 +//@ lldb-check:[...] { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } +//@ lldb-command:v no_padding2 +//@ lldb-check:[...] { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } -// lldb-command:v struct_internal_padding -// lldb-check:[...] { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } +//@ lldb-command:v struct_internal_padding +//@ lldb-check:[...] { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } -// lldb-command:v single_vec -// lldb-check:[...] { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } +//@ lldb-command:v single_vec +//@ lldb-check:[...] { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } -// lldb-command:v struct_padded_at_end -// lldb-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } +//@ lldb-command:v struct_padded_at_end +//@ lldb-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs index 3a8a110afa2cb..522787ecf570f 100644 --- a/tests/debuginfo/extern-c-fn.rs +++ b/tests/debuginfo/extern-c-fn.rs @@ -3,34 +3,34 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:printf "s = \"%s\"\n", s -// gdb-check:s = "abcd" -// gdb-command:print len -// gdb-check:$1 = 20 -// gdb-command:print local0 -// gdb-check:$2 = 19 -// gdb-command:print local1 -// gdb-check:$3 = true -// gdb-command:print local2 -// gdb-check:$4 = 20.5 +//@ gdb-command:printf "s = \"%s\"\n", s +//@ gdb-check:s = "abcd" +//@ gdb-command:print len +//@ gdb-check:$1 = 20 +//@ gdb-command:print local0 +//@ gdb-check:$2 = 19 +//@ gdb-command:print local1 +//@ gdb-check:$3 = true +//@ gdb-command:print local2 +//@ gdb-check:$4 = 20.5 -// gdb-command:continue +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v len -// lldb-check:[...] 20 -// lldb-command:v local0 -// lldb-check:[...] 19 -// lldb-command:v local1 -// lldb-check:[...] true -// lldb-command:v local2 -// lldb-check:[...] 20.5 - -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v len +//@ lldb-check:[...] 20 +//@ lldb-command:v local0 +//@ lldb-check:[...] 19 +//@ lldb-command:v local1 +//@ lldb-check:[...] true +//@ lldb-command:v local2 +//@ lldb-check:[...] 20.5 + +//@ lldb-command:continue #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/f16-natvis.rs b/tests/debuginfo/f16-natvis.rs index 9b9749f2bad46..92775548a942a 100644 --- a/tests/debuginfo/f16-natvis.rs +++ b/tests/debuginfo/f16-natvis.rs @@ -2,35 +2,35 @@ //@ only-msvc // This tests the `f16` Natvis visualiser. -// cdb-command:g -// cdb-command:dx v0_0 -// cdb-check:v0_0 : 0.000000 [Type: f16] -// cdb-command:dx neg_0_0 -// cdb-check:neg_0_0 : -0.000000 [Type: f16] -// cdb-command:dx v1_0 -// cdb-check:v1_0 : 1.000000 [Type: f16] -// cdb-command:dx v1_5 -// cdb-check:v1_5 : 1.500000 [Type: f16] -// cdb-command:dx v72_3 -// cdb-check:v72_3 : 72.312500 [Type: f16] -// cdb-command:dx neg_0_126 -// cdb-check:neg_0_126 : -0.125977 [Type: f16] -// cdb-command:dx v0_00003 -// cdb-check:v0_00003 : 0.000030 [Type: f16] -// cdb-command:dx neg_0_00004 -// cdb-check:neg_0_00004 : -0.000040 [Type: f16] -// cdb-command:dx max -// cdb-check:max : 65504.000000 [Type: f16] -// cdb-command:dx min -// cdb-check:min : -65504.000000 [Type: f16] -// cdb-command:dx inf -// cdb-check:inf : inf [Type: f16] -// cdb-command:dx neg_inf -// cdb-check:neg_inf : -inf [Type: f16] -// cdb-command:dx nan -// cdb-check:nan : NaN [Type: f16] -// cdb-command:dx other_nan -// cdb-check:other_nan : NaN [Type: f16] +//@ cdb-command:g +//@ cdb-command:dx v0_0 +//@ cdb-check:v0_0 : 0.000000 [Type: f16] +//@ cdb-command:dx neg_0_0 +//@ cdb-check:neg_0_0 : -0.000000 [Type: f16] +//@ cdb-command:dx v1_0 +//@ cdb-check:v1_0 : 1.000000 [Type: f16] +//@ cdb-command:dx v1_5 +//@ cdb-check:v1_5 : 1.500000 [Type: f16] +//@ cdb-command:dx v72_3 +//@ cdb-check:v72_3 : 72.312500 [Type: f16] +//@ cdb-command:dx neg_0_126 +//@ cdb-check:neg_0_126 : -0.125977 [Type: f16] +//@ cdb-command:dx v0_00003 +//@ cdb-check:v0_00003 : 0.000030 [Type: f16] +//@ cdb-command:dx neg_0_00004 +//@ cdb-check:neg_0_00004 : -0.000040 [Type: f16] +//@ cdb-command:dx max +//@ cdb-check:max : 65504.000000 [Type: f16] +//@ cdb-command:dx min +//@ cdb-check:min : -65504.000000 [Type: f16] +//@ cdb-command:dx inf +//@ cdb-check:inf : inf [Type: f16] +//@ cdb-command:dx neg_inf +//@ cdb-check:neg_inf : -inf [Type: f16] +//@ cdb-command:dx nan +//@ cdb-check:nan : NaN [Type: f16] +//@ cdb-command:dx other_nan +//@ cdb-check:other_nan : NaN [Type: f16] #![feature(f16)] diff --git a/tests/debuginfo/fixed-sized-array.rs b/tests/debuginfo/fixed-sized-array.rs index e538c57f5fefc..91ce7cecf8a7a 100644 --- a/tests/debuginfo/fixed-sized-array.rs +++ b/tests/debuginfo/fixed-sized-array.rs @@ -6,21 +6,21 @@ // === CDB TESTS ================================================================================== -// cdb-command: g - -// cdb-command: dx xs,d -// cdb-check:xs,d [Type: int [5]] -// cdb-check: [0] : 1 [Type: int] -// cdb-check: [1] : 2 [Type: int] -// cdb-check: [2] : 3 [Type: int] -// cdb-check: [3] : 4 [Type: int] -// cdb-check: [4] : 5 [Type: int] - -// cdb-command: dx ys,d -// cdb-check:ys,d [Type: int [3]] -// cdb-check: [0] : 0 [Type: int] -// cdb-check: [1] : 0 [Type: int] -// cdb-check: [2] : 0 [Type: int] +//@ cdb-command: g + +//@ cdb-command: dx xs,d +//@ cdb-check:xs,d [Type: int [5]] +//@ cdb-check: [0] : 1 [Type: int] +//@ cdb-check: [1] : 2 [Type: int] +//@ cdb-check: [2] : 3 [Type: int] +//@ cdb-check: [3] : 4 [Type: int] +//@ cdb-check: [4] : 5 [Type: int] + +//@ cdb-command: dx ys,d +//@ cdb-check:ys,d [Type: int [3]] +//@ cdb-check: [0] : 0 [Type: int] +//@ cdb-check: [1] : 0 [Type: int] +//@ cdb-check: [2] : 0 [Type: int] fn main() { // Fixed-size array (type signature is superfluous) diff --git a/tests/debuginfo/fn_ptr.rs b/tests/debuginfo/fn_ptr.rs index b6eb0f11a25c0..22e98ae04d074 100644 --- a/tests/debuginfo/fn_ptr.rs +++ b/tests/debuginfo/fn_ptr.rs @@ -3,22 +3,22 @@ // === CDB TESTS ================================================================================== -// cdb-command: g -// cdb-command: dx basic -// cdb-check: basic : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)(int,int)] -// cdb-check: a!core::ops::function::FnOnce::call_once >+0x0 [Type: int __cdecl(int,int)] - -// cdb-command: dx paramless -// cdb-check: paramless : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)()] -// cdb-check: a!core::ops::function::FnOnce::call_once >+0x0 [Type: int __cdecl()] - -// cdb-command: dx my_struct -// cdb-check: my_struct [Type: fn_ptr::MyStruct] -// cdb-check: [+0x000] my_field : [...] : a!core::ops::function::FnOnce::call_once > >+0x0 [Type: int (__cdecl*)(fn_ptr::MyStruct *)] - -// cdb-command: dx non_rec_struct -// cdb-check: non_rec_struct [Type: fn_ptr::NonRecStruct] -// cdb-check: [+0x000] my_field : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)(int)] +//@ cdb-command: g +//@ cdb-command: dx basic +//@ cdb-check: basic : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)(int,int)] +//@ cdb-check: a!core::ops::function::FnOnce::call_once >+0x0 [Type: int __cdecl(int,int)] + +//@ cdb-command: dx paramless +//@ cdb-check: paramless : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)()] +//@ cdb-check: a!core::ops::function::FnOnce::call_once >+0x0 [Type: int __cdecl()] + +//@ cdb-command: dx my_struct +//@ cdb-check: my_struct [Type: fn_ptr::MyStruct] +//@ cdb-check: [+0x000] my_field : [...] : a!core::ops::function::FnOnce::call_once > >+0x0 [Type: int (__cdecl*)(fn_ptr::MyStruct *)] + +//@ cdb-command: dx non_rec_struct +//@ cdb-check: non_rec_struct [Type: fn_ptr::NonRecStruct] +//@ cdb-check: [+0x000] my_field : [...] : a!core::ops::function::FnOnce::call_once >+0x0 [Type: int (__cdecl*)(int)] type BasicFnPtr = fn(i32, i32) -> i32; diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs index d9ce6ead5f2bf..c3b7ed81d0264 100644 --- a/tests/debuginfo/function-arg-initialization.rs +++ b/tests/debuginfo/function-arg-initialization.rs @@ -13,206 +13,206 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // IMMEDIATE ARGS -// gdb-command:print a -// gdb-check:$1 = 1 -// gdb-command:print b -// gdb-check:$2 = true -// gdb-command:print c -// gdb-check:$3 = 2.5 -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$1 = 1 +//@ gdb-command:print b +//@ gdb-check:$2 = true +//@ gdb-command:print c +//@ gdb-check:$3 = 2.5 +//@ gdb-command:continue // NON IMMEDIATE ARGS -// gdb-command:print a -// gdb-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10} -// gdb-command:print b -// gdb-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18} -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10} +//@ gdb-command:print b +//@ gdb-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18} +//@ gdb-command:continue // BINDING -// gdb-command:print a -// gdb-check:$6 = 19 -// gdb-command:print b -// gdb-check:$7 = 20 -// gdb-command:print c -// gdb-check:$8 = 21.5 -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$6 = 19 +//@ gdb-command:print b +//@ gdb-check:$7 = 20 +//@ gdb-command:print c +//@ gdb-check:$8 = 21.5 +//@ gdb-command:continue // ASSIGNMENT -// gdb-command:print a -// gdb-check:$9 = 22 -// gdb-command:print b -// gdb-check:$10 = 23 -// gdb-command:print c -// gdb-check:$11 = 24.5 -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$9 = 22 +//@ gdb-command:print b +//@ gdb-check:$10 = 23 +//@ gdb-command:print c +//@ gdb-check:$11 = 24.5 +//@ gdb-command:continue // FUNCTION CALL -// gdb-command:print x -// gdb-check:$12 = 25 -// gdb-command:print y -// gdb-check:$13 = 26 -// gdb-command:print z -// gdb-check:$14 = 27.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$12 = 25 +//@ gdb-command:print y +//@ gdb-check:$13 = 26 +//@ gdb-command:print z +//@ gdb-check:$14 = 27.5 +//@ gdb-command:continue // EXPR -// gdb-command:print x -// gdb-check:$15 = 28 -// gdb-command:print y -// gdb-check:$16 = 29 -// gdb-command:print z -// gdb-check:$17 = 30.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$15 = 28 +//@ gdb-command:print y +//@ gdb-check:$16 = 29 +//@ gdb-command:print z +//@ gdb-check:$17 = 30.5 +//@ gdb-command:continue // RETURN EXPR -// gdb-command:print x -// gdb-check:$18 = 31 -// gdb-command:print y -// gdb-check:$19 = 32 -// gdb-command:print z -// gdb-check:$20 = 33.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$18 = 31 +//@ gdb-command:print y +//@ gdb-check:$19 = 32 +//@ gdb-command:print z +//@ gdb-check:$20 = 33.5 +//@ gdb-command:continue // ARITHMETIC EXPR -// gdb-command:print x -// gdb-check:$21 = 34 -// gdb-command:print y -// gdb-check:$22 = 35 -// gdb-command:print z -// gdb-check:$23 = 36.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$21 = 34 +//@ gdb-command:print y +//@ gdb-check:$22 = 35 +//@ gdb-command:print z +//@ gdb-check:$23 = 36.5 +//@ gdb-command:continue // IF EXPR -// gdb-command:print x -// gdb-check:$24 = 37 -// gdb-command:print y -// gdb-check:$25 = 38 -// gdb-command:print z -// gdb-check:$26 = 39.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$24 = 37 +//@ gdb-command:print y +//@ gdb-check:$25 = 38 +//@ gdb-command:print z +//@ gdb-check:$26 = 39.5 +//@ gdb-command:continue // WHILE EXPR -// gdb-command:print x -// gdb-check:$27 = 40 -// gdb-command:print y -// gdb-check:$28 = 41 -// gdb-command:print z -// gdb-check:$29 = 42 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$27 = 40 +//@ gdb-command:print y +//@ gdb-check:$28 = 41 +//@ gdb-command:print z +//@ gdb-check:$29 = 42 +//@ gdb-command:continue // LOOP EXPR -// gdb-command:print x -// gdb-check:$30 = 43 -// gdb-command:print y -// gdb-check:$31 = 44 -// gdb-command:print z -// gdb-check:$32 = 45 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$30 = 43 +//@ gdb-command:print y +//@ gdb-check:$31 = 44 +//@ gdb-command:print z +//@ gdb-check:$32 = 45 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // IMMEDIATE ARGS -// lldb-command:v a -// lldb-check:[...] 1 -// lldb-command:v b -// lldb-check:[...] true -// lldb-command:v c -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 1 +//@ lldb-command:v b +//@ lldb-check:[...] true +//@ lldb-command:v c +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue // NON IMMEDIATE ARGS -// lldb-command:v a -// lldb-check:[...] BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 } -// lldb-command:v b -// lldb-check:[...] BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 } -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 } +//@ lldb-command:v b +//@ lldb-check:[...] BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 } +//@ lldb-command:continue // BINDING -// lldb-command:v a -// lldb-check:[...] 19 -// lldb-command:v b -// lldb-check:[...] 20 -// lldb-command:v c -// lldb-check:[...] 21.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 19 +//@ lldb-command:v b +//@ lldb-check:[...] 20 +//@ lldb-command:v c +//@ lldb-check:[...] 21.5 +//@ lldb-command:continue // ASSIGNMENT -// lldb-command:v a -// lldb-check:[...] 22 -// lldb-command:v b -// lldb-check:[...] 23 -// lldb-command:v c -// lldb-check:[...] 24.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 22 +//@ lldb-command:v b +//@ lldb-check:[...] 23 +//@ lldb-command:v c +//@ lldb-check:[...] 24.5 +//@ lldb-command:continue // FUNCTION CALL -// lldb-command:v x -// lldb-check:[...] 25 -// lldb-command:v y -// lldb-check:[...] 26 -// lldb-command:v z -// lldb-check:[...] 27.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 25 +//@ lldb-command:v y +//@ lldb-check:[...] 26 +//@ lldb-command:v z +//@ lldb-check:[...] 27.5 +//@ lldb-command:continue // EXPR -// lldb-command:v x -// lldb-check:[...] 28 -// lldb-command:v y -// lldb-check:[...] 29 -// lldb-command:v z -// lldb-check:[...] 30.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 28 +//@ lldb-command:v y +//@ lldb-check:[...] 29 +//@ lldb-command:v z +//@ lldb-check:[...] 30.5 +//@ lldb-command:continue // RETURN EXPR -// lldb-command:v x -// lldb-check:[...] 31 -// lldb-command:v y -// lldb-check:[...] 32 -// lldb-command:v z -// lldb-check:[...] 33.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 31 +//@ lldb-command:v y +//@ lldb-check:[...] 32 +//@ lldb-command:v z +//@ lldb-check:[...] 33.5 +//@ lldb-command:continue // ARITHMETIC EXPR -// lldb-command:v x -// lldb-check:[...] 34 -// lldb-command:v y -// lldb-check:[...] 35 -// lldb-command:v z -// lldb-check:[...] 36.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 34 +//@ lldb-command:v y +//@ lldb-check:[...] 35 +//@ lldb-command:v z +//@ lldb-check:[...] 36.5 +//@ lldb-command:continue // IF EXPR -// lldb-command:v x -// lldb-check:[...] 37 -// lldb-command:v y -// lldb-check:[...] 38 -// lldb-command:v z -// lldb-check:[...] 39.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 37 +//@ lldb-command:v y +//@ lldb-check:[...] 38 +//@ lldb-command:v z +//@ lldb-check:[...] 39.5 +//@ lldb-command:continue // WHILE EXPR -// lldb-command:v x -// lldb-check:[...] 40 -// lldb-command:v y -// lldb-check:[...] 41 -// lldb-command:v z -// lldb-check:[...] 42 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 40 +//@ lldb-command:v y +//@ lldb-check:[...] 41 +//@ lldb-command:v z +//@ lldb-check:[...] 42 +//@ lldb-command:continue // LOOP EXPR -// lldb-command:v x -// lldb-check:[...] 43 -// lldb-command:v y -// lldb-check:[...] 44 -// lldb-command:v z -// lldb-check:[...] 45 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 43 +//@ lldb-command:v y +//@ lldb-check:[...] 44 +//@ lldb-command:v z +//@ lldb-check:[...] 45 +//@ lldb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs index 47c6ebe115547..6fdf299004b31 100644 --- a/tests/debuginfo/function-arguments.rs +++ b/tests/debuginfo/function-arguments.rs @@ -4,35 +4,35 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = 111102 -// gdb-command:print y -// gdb-check:$2 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 111102 +//@ gdb-command:print y +//@ gdb-check:$2 = true +//@ gdb-command:continue -// gdb-command:print a -// gdb-check:$3 = 2000 -// gdb-command:print b -// gdb-check:$4 = 3000 -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$3 = 2000 +//@ gdb-command:print b +//@ gdb-check:$4 = 3000 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] 111102 -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 111102 +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue -// lldb-command:v a -// lldb-check:[...] 2000 -// lldb-command:v b -// lldb-check:[...] 3000 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 2000 +//@ lldb-command:v b +//@ lldb-check:[...] 3000 +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/function-call.rs b/tests/debuginfo/function-call.rs index c0b23dc551ead..37eda165d99ca 100644 --- a/tests/debuginfo/function-call.rs +++ b/tests/debuginfo/function-call.rs @@ -6,15 +6,15 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print fun(45, true) -// gdb-check:$1 = true -// gdb-command:print fun(444, false) -// gdb-check:$2 = false +//@ gdb-command:print fun(45, true) +//@ gdb-check:$1 = true +//@ gdb-command:print fun(444, false) +//@ gdb-check:$2 = false -// gdb-command:print r.get_x() -// gdb-check:$3 = 4 +//@ gdb-command:print r.get_x() +//@ gdb-check:$3 = 4 #![allow(dead_code, unused_variables)] diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs index 75fc14129761b..e2f106e565439 100644 --- a/tests/debuginfo/function-names.rs +++ b/tests/debuginfo/function-names.rs @@ -8,76 +8,76 @@ // === GDB TESTS =================================================================================== // Top-level function -// gdb-command:info functions -q function_names::main -// gdb-check:[...]static fn function_names::main(); -// gdb-command:info functions -q function_names::generic_func<* -// gdb-check:[...]static fn function_names::generic_func(i32) -> i32; +//@ gdb-command:info functions -q function_names::main +//@ gdb-check:[...]static fn function_names::main(); +//@ gdb-command:info functions -q function_names::generic_func<* +//@ gdb-check:[...]static fn function_names::generic_func(i32) -> i32; // Implementations -// gdb-command:info functions -q function_names::.*::impl_function.* -// gdb-check:[...]static fn function_names::GenericStruct::impl_function(); -// gdb-check:[...]static fn function_names::Mod1::TestStruct2::impl_function(); -// gdb-check:[...]static fn function_names::TestStruct1::impl_function(); +//@ gdb-command:info functions -q function_names::.*::impl_function.* +//@ gdb-check:[...]static fn function_names::GenericStruct::impl_function(); +//@ gdb-check:[...]static fn function_names::Mod1::TestStruct2::impl_function(); +//@ gdb-check:[...]static fn function_names::TestStruct1::impl_function(); // Trait implementations -// gdb-command:info functions -q function_names::.*::trait_function.* -// gdb-check:[...]static fn function_names::Mod1::{impl#1}::trait_function(); -// gdb-check:[...]static fn function_names::{impl#1}::trait_function(); -// gdb-check:[...]static fn function_names::{impl#3}::trait_function(); -// gdb-check:[...]static fn function_names::{impl#5}::trait_function3(); -// gdb-check:[...]static fn function_names::{impl#6}::trait_function(); +//@ gdb-command:info functions -q function_names::.*::trait_function.* +//@ gdb-check:[...]static fn function_names::Mod1::{impl#1}::trait_function(); +//@ gdb-check:[...]static fn function_names::{impl#1}::trait_function(); +//@ gdb-check:[...]static fn function_names::{impl#3}::trait_function(); +//@ gdb-check:[...]static fn function_names::{impl#5}::trait_function3(); +//@ gdb-check:[...]static fn function_names::{impl#6}::trait_function(); // Closure -// gdb-command:info functions -q function_names::.*::{closure.* -// gdb-check:[...]static fn function_names::generic_func::{closure#0}(*mut function_names::generic_func::{closure_env#0}); -// gdb-check:[...]static fn function_names::main::{closure#0}(*mut function_names::main::{closure_env#0}); -// gdb-check:[...]static fn function_names::{impl#2}::impl_function::{closure#0}(*mut function_names::{impl#2}::impl_function::{closure_env#0}); +//@ gdb-command:info functions -q function_names::.*::{closure.* +//@ gdb-check:[...]static fn function_names::generic_func::{closure#0}(*mut function_names::generic_func::{closure_env#0}); +//@ gdb-check:[...]static fn function_names::main::{closure#0}(*mut function_names::main::{closure_env#0}); +//@ gdb-check:[...]static fn function_names::{impl#2}::impl_function::{closure#0}(*mut function_names::{impl#2}::impl_function::{closure_env#0}); // Coroutine // Coroutines don't seem to appear in GDB's symbol table. // Const generic parameter -// gdb-command:info functions -q function_names::const_generic_fn.* -// gdb-check:[...]static fn function_names::const_generic_fn_bool(); -// gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#ffa3db4ca1d52dce}>(); -// gdb-check:[...]static fn function_names::const_generic_fn_signed_int<-7>(); -// gdb-check:[...]static fn function_names::const_generic_fn_unsigned_int<14>(); +//@ gdb-command:info functions -q function_names::const_generic_fn.* +//@ gdb-check:[...]static fn function_names::const_generic_fn_bool(); +//@ gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#ffa3db4ca1d52dce}>(); +//@ gdb-check:[...]static fn function_names::const_generic_fn_signed_int<-7>(); +//@ gdb-check:[...]static fn function_names::const_generic_fn_unsigned_int<14>(); // === CDB TESTS =================================================================================== // Top-level function -// cdb-command:x a!function_names::main -// cdb-check:[...] a!function_names::main (void) -// cdb-command:x a!function_names::generic_func<* -// cdb-check:[...] a!function_names::generic_func (int) +//@ cdb-command:x a!function_names::main +//@ cdb-check:[...] a!function_names::main (void) +//@ cdb-command:x a!function_names::generic_func<* +//@ cdb-check:[...] a!function_names::generic_func (int) // Implementations -// cdb-command:x a!function_names::*::impl_function* -// cdb-check:[...] a!function_names::Mod1::TestStruct2::impl_function (void) -// cdb-check:[...] a!function_names::TestStruct1::impl_function (void) -// cdb-check:[...] a!function_names::GenericStruct::impl_function (void) +//@ cdb-command:x a!function_names::*::impl_function* +//@ cdb-check:[...] a!function_names::Mod1::TestStruct2::impl_function (void) +//@ cdb-check:[...] a!function_names::TestStruct1::impl_function (void) +//@ cdb-check:[...] a!function_names::GenericStruct::impl_function (void) // Trait implementations -// cdb-command:x a!function_names::*::trait_function* -// cdb-check:[...] a!function_names::impl$3::trait_function (void) -// cdb-check:[...] a!function_names::impl$6::trait_function (void) -// cdb-check:[...] a!function_names::impl$1::trait_function (void) -// cdb-check:[...] a!function_names::impl$5::trait_function3 (void) -// cdb-check:[...] a!function_names::Mod1::impl$1::trait_function (void) +//@ cdb-command:x a!function_names::*::trait_function* +//@ cdb-check:[...] a!function_names::impl$3::trait_function (void) +//@ cdb-check:[...] a!function_names::impl$6::trait_function (void) +//@ cdb-check:[...] a!function_names::impl$1::trait_function (void) +//@ cdb-check:[...] a!function_names::impl$5::trait_function3 (void) +//@ cdb-check:[...] a!function_names::Mod1::impl$1::trait_function (void) // Closure -// cdb-command:x a!function_names::*::closure* -// cdb-check:[...] a!function_names::impl$2::impl_function::closure$0 (void) -// cdb-check:[...] a!function_names::main::closure$0 (void) -// cdb-check:[...] a!function_names::generic_func::closure$0 (void) +//@ cdb-command:x a!function_names::*::closure* +//@ cdb-check:[...] a!function_names::impl$2::impl_function::closure$0 (void) +//@ cdb-check:[...] a!function_names::main::closure$0 (void) +//@ cdb-check:[...] a!function_names::generic_func::closure$0 (void) // Coroutine -// cdb-command:x a!function_names::*::coroutine* -// cdb-check:[...] a!function_names::main::coroutine$1 (void) +//@ cdb-command:x a!function_names::*::coroutine* +//@ cdb-check:[...] a!function_names::main::coroutine$1 (void) // Const generic parameter -// cdb-command:x a!function_names::const_generic_fn* -// cdb-check:[...] a!function_names::const_generic_fn_bool (void) +//@ cdb-command:x a!function_names::const_generic_fn* +//@ cdb-check:[...] a!function_names::const_generic_fn_bool (void) #![allow(unused_variables)] #![feature(adt_const_params, coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs index f61128ca2df1d..83d5aa3c0a10c 100644 --- a/tests/debuginfo/function-prologue-stepping-regular.rs +++ b/tests/debuginfo/function-prologue-stepping-regular.rs @@ -6,115 +6,115 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers -// lldb-command:breakpoint set --name immediate_args -// lldb-command:breakpoint set --name non_immediate_args -// lldb-command:breakpoint set --name binding -// lldb-command:breakpoint set --name assignment -// lldb-command:breakpoint set --name function_call -// lldb-command:breakpoint set --name identifier -// lldb-command:breakpoint set --name return_expr -// lldb-command:breakpoint set --name arithmetic_expr -// lldb-command:breakpoint set --name if_expr -// lldb-command:breakpoint set --name while_expr -// lldb-command:breakpoint set --name loop_expr -// lldb-command:run +//@ lldb-command:breakpoint set --name immediate_args +//@ lldb-command:breakpoint set --name non_immediate_args +//@ lldb-command:breakpoint set --name binding +//@ lldb-command:breakpoint set --name assignment +//@ lldb-command:breakpoint set --name function_call +//@ lldb-command:breakpoint set --name identifier +//@ lldb-command:breakpoint set --name return_expr +//@ lldb-command:breakpoint set --name arithmetic_expr +//@ lldb-command:breakpoint set --name if_expr +//@ lldb-command:breakpoint set --name while_expr +//@ lldb-command:breakpoint set --name loop_expr +//@ lldb-command:run // IMMEDIATE ARGS -// lldb-command:v a -// lldb-check:[...] 1 -// lldb-command:v b -// lldb-check:[...] true -// lldb-command:v c -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 1 +//@ lldb-command:v b +//@ lldb-check:[...] true +//@ lldb-command:v c +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue // NON IMMEDIATE ARGS -// lldb-command:v a -// lldb-check:[...] { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 } -// lldb-command:v b -// lldb-check:[...] { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 } -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 } +//@ lldb-command:v b +//@ lldb-check:[...] { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 } +//@ lldb-command:continue // BINDING -// lldb-command:v a -// lldb-check:[...] 19 -// lldb-command:v b -// lldb-check:[...] 20 -// lldb-command:v c -// lldb-check:[...] 21.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 19 +//@ lldb-command:v b +//@ lldb-check:[...] 20 +//@ lldb-command:v c +//@ lldb-check:[...] 21.5 +//@ lldb-command:continue // ASSIGNMENT -// lldb-command:v a -// lldb-check:[...] 22 -// lldb-command:v b -// lldb-check:[...] 23 -// lldb-command:v c -// lldb-check:[...] 24.5 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 22 +//@ lldb-command:v b +//@ lldb-check:[...] 23 +//@ lldb-command:v c +//@ lldb-check:[...] 24.5 +//@ lldb-command:continue // FUNCTION CALL -// lldb-command:v x -// lldb-check:[...] 25 -// lldb-command:v y -// lldb-check:[...] 26 -// lldb-command:v z -// lldb-check:[...] 27.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 25 +//@ lldb-command:v y +//@ lldb-check:[...] 26 +//@ lldb-command:v z +//@ lldb-check:[...] 27.5 +//@ lldb-command:continue // EXPR -// lldb-command:v x -// lldb-check:[...] 28 -// lldb-command:v y -// lldb-check:[...] 29 -// lldb-command:v z -// lldb-check:[...] 30.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 28 +//@ lldb-command:v y +//@ lldb-check:[...] 29 +//@ lldb-command:v z +//@ lldb-check:[...] 30.5 +//@ lldb-command:continue // RETURN EXPR -// lldb-command:v x -// lldb-check:[...] 31 -// lldb-command:v y -// lldb-check:[...] 32 -// lldb-command:v z -// lldb-check:[...] 33.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 31 +//@ lldb-command:v y +//@ lldb-check:[...] 32 +//@ lldb-command:v z +//@ lldb-check:[...] 33.5 +//@ lldb-command:continue // ARITHMETIC EXPR -// lldb-command:v x -// lldb-check:[...] 34 -// lldb-command:v y -// lldb-check:[...] 35 -// lldb-command:v z -// lldb-check:[...] 36.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 34 +//@ lldb-command:v y +//@ lldb-check:[...] 35 +//@ lldb-command:v z +//@ lldb-check:[...] 36.5 +//@ lldb-command:continue // IF EXPR -// lldb-command:v x -// lldb-check:[...] 37 -// lldb-command:v y -// lldb-check:[...] 38 -// lldb-command:v z -// lldb-check:[...] 39.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 37 +//@ lldb-command:v y +//@ lldb-check:[...] 38 +//@ lldb-command:v z +//@ lldb-check:[...] 39.5 +//@ lldb-command:continue // WHILE EXPR -// lldb-command:v x -// lldb-check:[...] 40 -// lldb-command:v y -// lldb-check:[...] 41 -// lldb-command:v z -// lldb-check:[...] 42 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 40 +//@ lldb-command:v y +//@ lldb-check:[...] 41 +//@ lldb-command:v z +//@ lldb-check:[...] 42 +//@ lldb-command:continue // LOOP EXPR -// lldb-command:v x -// lldb-check:[...] 43 -// lldb-command:v y -// lldb-check:[...] 44 -// lldb-command:v z -// lldb-check:[...] 45 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 43 +//@ lldb-command:v y +//@ lldb-check:[...] 44 +//@ lldb-command:v z +//@ lldb-check:[...] 45 +//@ lldb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/gdb-char.rs b/tests/debuginfo/gdb-char.rs index 5f44fa5c4233d..a2e4c278a6606 100644 --- a/tests/debuginfo/gdb-char.rs +++ b/tests/debuginfo/gdb-char.rs @@ -8,9 +8,9 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print ch -// gdb-check:$1 = 97 'a' +//@ gdb-command:run +//@ gdb-command:print ch +//@ gdb-check:$1 = 97 'a' #![allow(unused_variables)] diff --git a/tests/debuginfo/gdb-pretty-struct-and-enums.rs b/tests/debuginfo/gdb-pretty-struct-and-enums.rs index ab6aea6b6316e..74197cddb0d88 100644 --- a/tests/debuginfo/gdb-pretty-struct-and-enums.rs +++ b/tests/debuginfo/gdb-pretty-struct-and-enums.rs @@ -4,22 +4,22 @@ //@ compile-flags:-g //@ ignore-backends: gcc -// gdb-command: run +//@ gdb-command: run -// gdb-command: print regular_struct -// gdb-check:$1 = gdb_pretty_struct_and_enums::RegularStruct {the_first_field: 101, the_second_field: 102.5, the_third_field: false} +//@ gdb-command: print regular_struct +//@ gdb-check:$1 = gdb_pretty_struct_and_enums::RegularStruct {the_first_field: 101, the_second_field: 102.5, the_third_field: false} -// gdb-command: print empty_struct -// gdb-check:$2 = gdb_pretty_struct_and_enums::EmptyStruct +//@ gdb-command: print empty_struct +//@ gdb-check:$2 = gdb_pretty_struct_and_enums::EmptyStruct -// gdb-command: print c_style_enum1 -// gdb-check:$3 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar1 +//@ gdb-command: print c_style_enum1 +//@ gdb-check:$3 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar1 -// gdb-command: print c_style_enum2 -// gdb-check:$4 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar2 +//@ gdb-command: print c_style_enum2 +//@ gdb-check:$4 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar2 -// gdb-command: print c_style_enum3 -// gdb-check:$5 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar3 +//@ gdb-command: print c_style_enum3 +//@ gdb-check:$5 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar3 #![allow(dead_code, unused_variables)] diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs index 07a92619e211e..24381d4accdae 100644 --- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -5,57 +5,57 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print eight_bytes1 -// gdb-check:$1 = generic_enum_with_different_disr_sizes::Enum::Variant1(100) +//@ gdb-command:print eight_bytes1 +//@ gdb-check:$1 = generic_enum_with_different_disr_sizes::Enum::Variant1(100) -// gdb-command:print four_bytes1 -// gdb-check:$2 = generic_enum_with_different_disr_sizes::Enum::Variant1(101) +//@ gdb-command:print four_bytes1 +//@ gdb-check:$2 = generic_enum_with_different_disr_sizes::Enum::Variant1(101) -// gdb-command:print two_bytes1 -// gdb-check:$3 = generic_enum_with_different_disr_sizes::Enum::Variant1(102) +//@ gdb-command:print two_bytes1 +//@ gdb-check:$3 = generic_enum_with_different_disr_sizes::Enum::Variant1(102) -// gdb-command:print one_byte1 -// gdb-check:$4 = generic_enum_with_different_disr_sizes::Enum::Variant1(65) +//@ gdb-command:print one_byte1 +//@ gdb-check:$4 = generic_enum_with_different_disr_sizes::Enum::Variant1(65) -// gdb-command:print eight_bytes2 -// gdb-check:$5 = generic_enum_with_different_disr_sizes::Enum::Variant2(100) +//@ gdb-command:print eight_bytes2 +//@ gdb-check:$5 = generic_enum_with_different_disr_sizes::Enum::Variant2(100) -// gdb-command:print four_bytes2 -// gdb-check:$6 = generic_enum_with_different_disr_sizes::Enum::Variant2(101) +//@ gdb-command:print four_bytes2 +//@ gdb-check:$6 = generic_enum_with_different_disr_sizes::Enum::Variant2(101) -// gdb-command:print two_bytes2 -// gdb-check:$7 = generic_enum_with_different_disr_sizes::Enum::Variant2(102) +//@ gdb-command:print two_bytes2 +//@ gdb-check:$7 = generic_enum_with_different_disr_sizes::Enum::Variant2(102) -// gdb-command:print one_byte2 -// gdb-check:$8 = generic_enum_with_different_disr_sizes::Enum::Variant2(65) +//@ gdb-command:print one_byte2 +//@ gdb-check:$8 = generic_enum_with_different_disr_sizes::Enum::Variant2(65) -// gdb-command:continue +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v eight_bytes1 -// lldb-check:[...] Variant1(100) -// lldb-command:v four_bytes1 -// lldb-check:[...] Variant1(101) -// lldb-command:v two_bytes1 -// lldb-check:[...] Variant1(102) -// lldb-command:v one_byte1 -// lldb-check:[...] Variant1('A') - -// lldb-command:v eight_bytes2 -// lldb-check:[...] Variant2(100) -// lldb-command:v four_bytes2 -// lldb-check:[...] Variant2(101) -// lldb-command:v two_bytes2 -// lldb-check:[...] Variant2(102) -// lldb-command:v one_byte2 -// lldb-check:[...] Variant2('A') - -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v eight_bytes1 +//@ lldb-check:[...] Variant1(100) +//@ lldb-command:v four_bytes1 +//@ lldb-check:[...] Variant1(101) +//@ lldb-command:v two_bytes1 +//@ lldb-check:[...] Variant1(102) +//@ lldb-command:v one_byte1 +//@ lldb-check:[...] Variant1('A') + +//@ lldb-command:v eight_bytes2 +//@ lldb-check:[...] Variant2(100) +//@ lldb-command:v four_bytes2 +//@ lldb-check:[...] Variant2(101) +//@ lldb-command:v two_bytes2 +//@ lldb-check:[...] Variant2(102) +//@ lldb-command:v one_byte2 +//@ lldb-check:[...] Variant2('A') + +//@ lldb-command:continue #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs index 9ca9eb32a2e10..4e66021b633cc 100644 --- a/tests/debuginfo/generic-function.rs +++ b/tests/debuginfo/generic-function.rs @@ -4,47 +4,47 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *t0 -// gdb-check:$1 = 1 -// gdb-command:print *t1 -// gdb-check:$2 = 2.5 -// gdb-command:continue +//@ gdb-command:print *t0 +//@ gdb-check:$1 = 1 +//@ gdb-command:print *t1 +//@ gdb-check:$2 = 2.5 +//@ gdb-command:continue -// gdb-command:print *t0 -// gdb-check:$3 = 3.5 -// gdb-command:print *t1 -// gdb-check:$4 = 4 -// gdb-command:continue +//@ gdb-command:print *t0 +//@ gdb-check:$3 = 3.5 +//@ gdb-command:print *t1 +//@ gdb-check:$4 = 4 +//@ gdb-command:continue -// gdb-command:print *t0 -// gdb-check:$5 = 5 -// gdb-command:print *t1 -// gdb-check:$6 = generic_function::Struct {a: 6, b: 7.5} -// gdb-command:continue +//@ gdb-command:print *t0 +//@ gdb-check:$5 = 5 +//@ gdb-command:print *t1 +//@ gdb-check:$6 = generic_function::Struct {a: 6, b: 7.5} +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *t0 -// lldb-check:[...] 1 -// lldb-command:v *t1 -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:v *t0 +//@ lldb-check:[...] 1 +//@ lldb-command:v *t1 +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue -// lldb-command:v *t0 -// lldb-check:[...] 3.5 -// lldb-command:v *t1 -// lldb-check:[...] 4 -// lldb-command:continue +//@ lldb-command:v *t0 +//@ lldb-check:[...] 3.5 +//@ lldb-command:v *t1 +//@ lldb-check:[...] 4 +//@ lldb-command:continue -// lldb-command:v *t0 -// lldb-check:[...] 5 -// lldb-command:v *t1 -// lldb-check:[...] { a = 6 b = 7.5 } -// lldb-command:continue +//@ lldb-command:v *t0 +//@ lldb-check:[...] 5 +//@ lldb-command:v *t1 +//@ lldb-check:[...] { a = 6 b = 7.5 } +//@ lldb-command:continue #[derive(Clone)] struct Struct { diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs index 1a87827c7759d..eab4a5f6c4aff 100644 --- a/tests/debuginfo/generic-functions-nested.rs +++ b/tests/debuginfo/generic-functions-nested.rs @@ -4,60 +4,60 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = -1 -// gdb-command:print y -// gdb-check:$2 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = -1 +//@ gdb-command:print y +//@ gdb-check:$2 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = -1 -// gdb-command:print y -// gdb-check:$4 = 2.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = -1 +//@ gdb-command:print y +//@ gdb-check:$4 = 2.5 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = -2.5 -// gdb-command:print y -// gdb-check:$6 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = -2.5 +//@ gdb-command:print y +//@ gdb-check:$6 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$7 = -2.5 -// gdb-command:print y -// gdb-check:$8 = 2.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = -2.5 +//@ gdb-command:print y +//@ gdb-check:$8 = 2.5 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v x -// lldb-check:[...] -1 -// lldb-command:v y -// lldb-check:[...] 1 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] -1 -// lldb-command:v y -// lldb-check:[...] 2.5 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] -2.5 -// lldb-command:v y -// lldb-check:[...] 1 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] -2.5 -// lldb-command:v y -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v x +//@ lldb-check:[...] -1 +//@ lldb-command:v y +//@ lldb-check:[...] 1 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] -1 +//@ lldb-command:v y +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] -2.5 +//@ lldb-command:v y +//@ lldb-check:[...] 1 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] -2.5 +//@ lldb-command:v y +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue fn outer(a: TA) { inner(a.clone(), 1); diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs index c549a14153659..790c6110500e8 100644 --- a/tests/debuginfo/generic-method-on-generic-struct.rs +++ b/tests/debuginfo/generic-method-on-generic-struct.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = generic_method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = 2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = generic_method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = 2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = generic_method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = generic_method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = generic_method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = generic_method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = generic_method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = generic_method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = generic_method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10.5 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = generic_method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10.5 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { x = { 0 = 8888 1 = -8888 } } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = { 0 = 8888 1 = -8888 } } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] 2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { x = { 0 = 8888 1 = -8888 } } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = { 0 = 8888 1 = -8888 } } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10.5 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10.5 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs index be9f394f133d3..d2800f24092a9 100644 --- a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs @@ -2,23 +2,23 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run +//@ gdb-command:run // STRUCT -// gdb-command:print arg1 -// gdb-check:$1 = 1 -// gdb-command:print arg2 -// gdb-check:$2 = 2 -// gdb-command:continue +//@ gdb-command:print arg1 +//@ gdb-check:$1 = 1 +//@ gdb-command:print arg2 +//@ gdb-check:$2 = 2 +//@ gdb-command:continue // ENUM -// gdb-command:print arg1 -// gdb-check:$3 = -3 -// gdb-command:print arg2 -// gdb-check:$4 = 4.5 -// gdb-command:print arg3 -// gdb-check:$5 = 5 -// gdb-command:continue +//@ gdb-command:print arg1 +//@ gdb-check:$3 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$4 = 4.5 +//@ gdb-command:print arg3 +//@ gdb-check:$5 = 5 +//@ gdb-command:continue struct Struct { diff --git a/tests/debuginfo/generic-struct-style-enum.rs b/tests/debuginfo/generic-struct-style-enum.rs index 7b7a36effd575..4c6ebdfb0fd0e 100644 --- a/tests/debuginfo/generic-struct-style-enum.rs +++ b/tests/debuginfo/generic-struct-style-enum.rs @@ -2,20 +2,20 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:set print union on -// gdb-command:run +//@ gdb-command:set print union on +//@ gdb-command:run -// gdb-command:print case1 -// gdb-check:$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868} +//@ gdb-command:print case1 +//@ gdb-check:$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868} -// gdb-command:print case2 -// gdb-check:$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153} +//@ gdb-command:print case2 +//@ gdb-check:$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153} -// gdb-command:print case3 -// gdb-check:$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897} +//@ gdb-command:print case3 +//@ gdb-check:$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897} -// gdb-command:print univariant -// gdb-check:$4 = generic_struct_style_enum::Univariant::TheOnlyCase{a: -1} +//@ gdb-command:print univariant +//@ gdb-check:$4 = generic_struct_style_enum::Univariant::TheOnlyCase{a: -1} use self::Regular::{Case1, Case2, Case3}; diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs index daf6554fab0a4..e6e56e288e8d0 100644 --- a/tests/debuginfo/generic-struct.rs +++ b/tests/debuginfo/generic-struct.rs @@ -4,51 +4,51 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print int_int -// gdb-check:$1 = generic_struct::AGenericStruct {key: 0, value: 1} -// gdb-command:print int_float -// gdb-check:$2 = generic_struct::AGenericStruct {key: 2, value: 3.5} -// gdb-command:print float_int -// gdb-check:$3 = generic_struct::AGenericStruct {key: 4.5, value: 5} -// gdb-command:print float_int_float -// gdb-check:$4 = generic_struct::AGenericStruct> {key: 6.5, value: generic_struct::AGenericStruct {key: 7, value: 8.5}} +//@ gdb-command:print int_int +//@ gdb-check:$1 = generic_struct::AGenericStruct {key: 0, value: 1} +//@ gdb-command:print int_float +//@ gdb-check:$2 = generic_struct::AGenericStruct {key: 2, value: 3.5} +//@ gdb-command:print float_int +//@ gdb-check:$3 = generic_struct::AGenericStruct {key: 4.5, value: 5} +//@ gdb-command:print float_int_float +//@ gdb-check:$4 = generic_struct::AGenericStruct> {key: 6.5, value: generic_struct::AGenericStruct {key: 7, value: 8.5}} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v int_int -// lldb-check:[...]AGenericStruct) int_int = { key = 0 value = 1 } -// lldb-command:v int_float -// lldb-check:[...]AGenericStruct) int_float = { key = 2 value = 3.5 } -// lldb-command:v float_int -// lldb-check:[...]AGenericStruct) float_int = { key = 4.5 value = 5 } +//@ lldb-command:v int_int +//@ lldb-check:[...]AGenericStruct) int_int = { key = 0 value = 1 } +//@ lldb-command:v int_float +//@ lldb-check:[...]AGenericStruct) int_float = { key = 2 value = 3.5 } +//@ lldb-command:v float_int +//@ lldb-check:[...]AGenericStruct) float_int = { key = 4.5 value = 5 } -// lldb-command:v float_int_float -// lldb-check:[...]AGenericStruct >) float_int_float = { key = 6.5 value = { key = 7 value = 8.5 } } +//@ lldb-command:v float_int_float +//@ lldb-check:[...]AGenericStruct >) float_int_float = { key = 6.5 value = { key = 7 value = 8.5 } } // === CDB TESTS =================================================================================== -// cdb-command:g - -// cdb-command:dx int_int -// cdb-check:int_int [Type: generic_struct::AGenericStruct] -// cdb-check:[...]key : 0 [Type: int] -// cdb-check:[...]value : 1 [Type: int] -// cdb-command:dx int_float -// cdb-check:int_float [Type: generic_struct::AGenericStruct] -// cdb-check:[...]key : 2 [Type: int] -// cdb-check:[...]value : 3.500000 [Type: double] -// cdb-command:dx float_int -// cdb-check:float_int [Type: generic_struct::AGenericStruct] -// cdb-check:[...]key : 4.500000 [Type: double] -// cdb-check:[...]value : 5 [Type: int] -// cdb-command:dx float_int_float -// cdb-check:float_int_float [Type: generic_struct::AGenericStruct >] -// cdb-check:[...]key : 6.500000 [Type: double] -// cdb-check:[...]value [Type: generic_struct::AGenericStruct] +//@ cdb-command:g + +//@ cdb-command:dx int_int +//@ cdb-check:int_int [Type: generic_struct::AGenericStruct] +//@ cdb-check:[...]key : 0 [Type: int] +//@ cdb-check:[...]value : 1 [Type: int] +//@ cdb-command:dx int_float +//@ cdb-check:int_float [Type: generic_struct::AGenericStruct] +//@ cdb-check:[...]key : 2 [Type: int] +//@ cdb-check:[...]value : 3.500000 [Type: double] +//@ cdb-command:dx float_int +//@ cdb-check:float_int [Type: generic_struct::AGenericStruct] +//@ cdb-check:[...]key : 4.500000 [Type: double] +//@ cdb-check:[...]value : 5 [Type: int] +//@ cdb-command:dx float_int_float +//@ cdb-check:float_int_float [Type: generic_struct::AGenericStruct >] +//@ cdb-check:[...]key : 6.500000 [Type: double] +//@ cdb-check:[...]value [Type: generic_struct::AGenericStruct] struct AGenericStruct { diff --git a/tests/debuginfo/generic-tuple-style-enum.rs b/tests/debuginfo/generic-tuple-style-enum.rs index de8681bc53618..e805e1fea9f63 100644 --- a/tests/debuginfo/generic-tuple-style-enum.rs +++ b/tests/debuginfo/generic-tuple-style-enum.rs @@ -4,33 +4,33 @@ // === GDB TESTS =================================================================================== -// gdb-command:set print union on -// gdb-command:run +//@ gdb-command:set print union on +//@ gdb-command:run -// gdb-command:print case1 -// gdb-check:$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868) +//@ gdb-command:print case1 +//@ gdb-check:$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868) -// gdb-command:print case2 -// gdb-check:$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153) +//@ gdb-command:print case2 +//@ gdb-check:$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153) -// gdb-command:print case3 -// gdb-check:$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897) +//@ gdb-command:print case3 +//@ gdb-check:$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897) -// gdb-command:print univariant -// gdb-check:$4 = generic_tuple_style_enum::Univariant::TheOnlyCase(-1) +//@ gdb-command:print univariant +//@ gdb-check:$4 = generic_tuple_style_enum::Univariant::TheOnlyCase(-1) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v case1 +//@ lldb-command:v case1 -// lldb-command:v case2 +//@ lldb-command:v case2 -// lldb-command:v case3 +//@ lldb-command:v case3 -// lldb-command:v univariant +//@ lldb-command:v univariant use self::Regular::{Case1, Case2, Case3}; diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 565bd09f89e98..e61aa3026b278 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -4,28 +4,28 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run -// gdb-command:print string1.length -// gdb-check:$1 = 48 -// gdb-command:print string2.length -// gdb-check:$2 = 49 -// gdb-command:print string3.length -// gdb-check:$3 = 50 -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:print string1.length +//@ gdb-check:$1 = 48 +//@ gdb-command:print string2.length +//@ gdb-check:$2 = 49 +//@ gdb-command:print string3.length +//@ gdb-check:$3 = 50 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v string1.length -// lldb-check:[...] 48 -// lldb-command:v string2.length -// lldb-check:[...] 49 -// lldb-command:v string3.length -// lldb-check:[...] 50 +//@ lldb-command:v string1.length +//@ lldb-check:[...] 48 +//@ lldb-command:v string2.length +//@ lldb-check:[...] 49 +//@ lldb-command:v string3.length +//@ lldb-check:[...] 50 -// lldb-command:continue +//@ lldb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/issue-12886.rs b/tests/debuginfo/issue-12886.rs index 5574294cd57c9..b775505a0c6ca 100644 --- a/tests/debuginfo/issue-12886.rs +++ b/tests/debuginfo/issue-12886.rs @@ -4,10 +4,10 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers -// gdb-command:run -// gdb-command:next -// gdb-check:[...]22[...]let s = Some(5).unwrap(); // #break -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-check:[...]22[...]let s = Some(5).unwrap(); // #break +//@ gdb-command:continue // IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs index 3407c0524ebb1..54c381b4e76ab 100644 --- a/tests/debuginfo/issue-22656.rs +++ b/tests/debuginfo/issue-22656.rs @@ -8,12 +8,12 @@ //@ disable-gdb-pretty-printers // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v v -// lldb-check:[...] size=3 { [0] = 1 [1] = 2 [2] = 3 } -// lldb-command:v zs -// lldb-check:[...] { x = y = 123 z = w = 456 } +//@ lldb-command:v v +//@ lldb-check:[...] size=3 { [0] = 1 [1] = 2 [2] = 3 } +//@ lldb-command:v zs +//@ lldb-check:[...] { x = y = 123 z = w = 456 } #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs index 59c0759737dd0..4b514759ee3b9 100644 --- a/tests/debuginfo/issue-57822.rs +++ b/tests/debuginfo/issue-57822.rs @@ -8,23 +8,23 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print g -// gdb-check:$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}} +//@ gdb-command:print g +//@ gdb-check:$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}} -// gdb-command:print b -// gdb-check:$2 = issue_57822::main::{coroutine_env#3}::Unresumed{a: issue_57822::main::{coroutine_env#2}::Unresumed{y: 2}} +//@ gdb-command:print b +//@ gdb-check:$2 = issue_57822::main::{coroutine_env#3}::Unresumed{a: issue_57822::main::{coroutine_env#2}::Unresumed{y: 2}} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v g -// lldb-check:(issue_57822::main::{closure_env#1}) g = { f = { x = 1 } } +//@ lldb-command:v g +//@ lldb-check:(issue_57822::main::{closure_env#1}) g = { f = { x = 1 } } -// lldb-command:v b -// lldb-check:(issue_57822::main::{coroutine_env#3}) b = { value = { a = { value = { y = 2 } $discr$ = '\x02' } } $discr$ = '\x02' } +//@ lldb-command:v b +//@ lldb-check:(issue_57822::main::{coroutine_env#3}) b = { value = { a = { value = { y = 2 } $discr$ = '\x02' } } $discr$ = '\x02' } #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs index c2e97ad469ef2..8c5f195452f90 100644 --- a/tests/debuginfo/lexical-scope-in-for-loop.rs +++ b/tests/debuginfo/lexical-scope-in-for-loop.rs @@ -4,76 +4,76 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // FIRST ITERATION -// gdb-command:print x -// gdb-check:$1 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = -1 +//@ gdb-command:continue // SECOND ITERATION -// gdb-command:print x -// gdb-check:$3 = 2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 2 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = -2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = -2 +//@ gdb-command:continue // THIRD ITERATION -// gdb-command:print x -// gdb-check:$5 = 3 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = 3 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = -3 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = -3 +//@ gdb-command:continue // AFTER LOOP -// gdb-command:print x -// gdb-check:$7 = 1000000 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = 1000000 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // FIRST ITERATION -// lldb-command:v x -// lldb-check:[...] 1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -1 +//@ lldb-command:continue // SECOND ITERATION -// lldb-command:v x -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -2 +//@ lldb-command:continue // THIRD ITERATION -// lldb-command:v x -// lldb-check:[...] 3 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 3 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -3 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -3 +//@ lldb-command:continue // AFTER LOOP -// lldb-command:v x -// lldb-check:[...] 1000000 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1000000 +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-in-if-let.rs b/tests/debuginfo/lexical-scope-in-if-let.rs index 3bc0c231b4d39..0c16fbf751ff8 100644 --- a/tests/debuginfo/lexical-scope-in-if-let.rs +++ b/tests/debuginfo/lexical-scope-in-if-let.rs @@ -3,78 +3,78 @@ // === GDB TESTS ================================================================================== -// gdb-command:run -// gdb-command:info locals -// gdb-check:a = 123 - -// gdb-command:continue -// gdb-command:info locals -// gdb-check:x = 42 -// gdb-check:a = 123 - -// gdb-command:continue -// gdb-command:info locals -// gdb-check:y = true -// gdb-check:b = 456 -// gdb-check:x = 42 -// gdb-check:a = 123 - -// gdb-command:continue -// gdb-command:info locals -// gdb-check:z = 10 -// gdb-check:c = 789 -// gdb-check:y = true -// gdb-check:b = 456 -// gdb-check:x = 42 -// gdb-check:a = 123 +//@ gdb-command:run +//@ gdb-command:info locals +//@ gdb-check:a = 123 + +//@ gdb-command:continue +//@ gdb-command:info locals +//@ gdb-check:x = 42 +//@ gdb-check:a = 123 + +//@ gdb-command:continue +//@ gdb-command:info locals +//@ gdb-check:y = true +//@ gdb-check:b = 456 +//@ gdb-check:x = 42 +//@ gdb-check:a = 123 + +//@ gdb-command:continue +//@ gdb-command:info locals +//@ gdb-check:z = 10 +//@ gdb-check:c = 789 +//@ gdb-check:y = true +//@ gdb-check:b = 456 +//@ gdb-check:x = 42 +//@ gdb-check:a = 123 // === LLDB TESTS ================================================================================= -// lldb-command:run -// lldb-command:frame variable -// lldb-check:(int) a = 123 +//@ lldb-command:run +//@ lldb-command:frame variable +//@ lldb-check:(int) a = 123 -// lldb-command:continue -// lldb-command:frame variable -// lldb-check:(int) a = 123 (int) x = 42 +//@ lldb-command:continue +//@ lldb-command:frame variable +//@ lldb-check:(int) a = 123 (int) x = 42 -// lldb-command:continue -// lldb-command:frame variable -// lldb-check:(int) a = 123 (int) x = 42 (int) b = 456 (bool) y = true +//@ lldb-command:continue +//@ lldb-command:frame variable +//@ lldb-check:(int) a = 123 (int) x = 42 (int) b = 456 (bool) y = true -// lldb-command:continue -// lldb-command:frame variable -// lldb-check:(int) a = 123 (int) x = 42 (int) b = 456 (bool) y = true (int) c = 789 (int) z = 10 +//@ lldb-command:continue +//@ lldb-command:frame variable +//@ lldb-check:(int) a = 123 (int) x = 42 (int) b = 456 (bool) y = true (int) c = 789 (int) z = 10 // === CDB TESTS ================================================================================== // Note: `/n` causes the the output to be sorted to avoid depending on the order in PDB which may // be arbitrary. -// cdb-command: g -// cdb-command: dv /n -// cdb-check:[...]a = 0n123 - -// cdb-command: g -// cdb-command: dv /n -// cdb-check:[...]a = 0n123 -// cdb-check:[...]x = 0n42 - -// cdb-command: g -// cdb-command: dv /n -// cdb-check:[...]a = 0n123 -// cdb-check:[...]b = 0n456 -// cdb-check:[...]x = 0n42 -// cdb-check:[...]y = true - -// cdb-command: g -// cdb-command: dv /n -// cdb-check:[...]a = 0n123 -// cdb-check:[...]b = 0n456 -// cdb-check:[...]c = 0n789 -// cdb-check:[...]x = 0n42 -// cdb-check:[...]y = true -// cdb-check:[...]z = 0n10 +//@ cdb-command: g +//@ cdb-command: dv /n +//@ cdb-check:[...]a = 0n123 + +//@ cdb-command: g +//@ cdb-command: dv /n +//@ cdb-check:[...]a = 0n123 +//@ cdb-check:[...]x = 0n42 + +//@ cdb-command: g +//@ cdb-command: dv /n +//@ cdb-check:[...]a = 0n123 +//@ cdb-check:[...]b = 0n456 +//@ cdb-check:[...]x = 0n42 +//@ cdb-check:[...]y = true + +//@ cdb-command: g +//@ cdb-command: dv /n +//@ cdb-check:[...]a = 0n123 +//@ cdb-check:[...]b = 0n456 +//@ cdb-check:[...]c = 0n789 +//@ cdb-check:[...]x = 0n42 +//@ cdb-check:[...]y = true +//@ cdb-check:[...]z = 0n10 fn main() { let a = id(123); diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs index 622188269307a..b52f221321648 100644 --- a/tests/debuginfo/lexical-scope-in-if.rs +++ b/tests/debuginfo/lexical-scope-in-if.rs @@ -4,124 +4,124 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // BEFORE if -// gdb-command:print x -// gdb-check:$1 = 999 -// gdb-command:print y -// gdb-check:$2 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 999 +//@ gdb-command:print y +//@ gdb-check:$2 = -1 +//@ gdb-command:continue // AT BEGINNING of 'then' block -// gdb-command:print x -// gdb-check:$3 = 999 -// gdb-command:print y -// gdb-check:$4 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 999 +//@ gdb-command:print y +//@ gdb-check:$4 = -1 +//@ gdb-command:continue // AFTER 1st redeclaration of 'x' -// gdb-command:print x -// gdb-check:$5 = 1001 -// gdb-command:print y -// gdb-check:$6 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = 1001 +//@ gdb-command:print y +//@ gdb-check:$6 = -1 +//@ gdb-command:continue // AFTER 2st redeclaration of 'x' -// gdb-command:print x -// gdb-check:$7 = 1002 -// gdb-command:print y -// gdb-check:$8 = 1003 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = 1002 +//@ gdb-command:print y +//@ gdb-check:$8 = 1003 +//@ gdb-command:continue // AFTER 1st if expression -// gdb-command:print x -// gdb-check:$9 = 999 -// gdb-command:print y -// gdb-check:$10 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$9 = 999 +//@ gdb-command:print y +//@ gdb-check:$10 = -1 +//@ gdb-command:continue // BEGINNING of else branch -// gdb-command:print x -// gdb-check:$11 = 999 -// gdb-command:print y -// gdb-check:$12 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$11 = 999 +//@ gdb-command:print y +//@ gdb-check:$12 = -1 +//@ gdb-command:continue // BEGINNING of else branch -// gdb-command:print x -// gdb-check:$13 = 1004 -// gdb-command:print y -// gdb-check:$14 = 1005 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$13 = 1004 +//@ gdb-command:print y +//@ gdb-check:$14 = 1005 +//@ gdb-command:continue // BEGINNING of else branch -// gdb-command:print x -// gdb-check:$15 = 999 -// gdb-command:print y -// gdb-check:$16 = -1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$15 = 999 +//@ gdb-command:print y +//@ gdb-check:$16 = -1 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // BEFORE if -// lldb-command:v x -// lldb-check:[...] 999 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 999 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue // AT BEGINNING of 'then' block -// lldb-command:v x -// lldb-check:[...] 999 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 999 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue // AFTER 1st redeclaration of 'x' -// lldb-command:v x -// lldb-check:[...] 1001 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1001 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue // AFTER 2st redeclaration of 'x' -// lldb-command:v x -// lldb-check:[...] 1002 -// lldb-command:v y -// lldb-check:[...] 1003 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1002 +//@ lldb-command:v y +//@ lldb-check:[...] 1003 +//@ lldb-command:continue // AFTER 1st if expression -// lldb-command:v x -// lldb-check:[...] 999 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 999 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue // BEGINNING of else branch -// lldb-command:v x -// lldb-check:[...] 999 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 999 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue // BEGINNING of else branch -// lldb-command:v x -// lldb-check:[...] 1004 -// lldb-command:v y -// lldb-check:[...] 1005 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1004 +//@ lldb-command:v y +//@ lldb-check:[...] 1005 +//@ lldb-command:continue // BEGINNING of else branch -// lldb-command:v x -// lldb-check:[...] 999 -// lldb-command:v y -// lldb-check:[...] -1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 999 +//@ lldb-command:v y +//@ lldb-check:[...] -1 +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs index 329d959bc8488..f91a623112e3b 100644 --- a/tests/debuginfo/lexical-scope-in-match.rs +++ b/tests/debuginfo/lexical-scope-in-match.rs @@ -4,116 +4,116 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print shadowed -// gdb-check:$1 = 231 -// gdb-command:print not_shadowed -// gdb-check:$2 = 232 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$3 = 233 -// gdb-command:print not_shadowed -// gdb-check:$4 = 232 -// gdb-command:print local_to_arm -// gdb-check:$5 = 234 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$6 = 236 -// gdb-command:print not_shadowed -// gdb-check:$7 = 232 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$8 = 237 -// gdb-command:print not_shadowed -// gdb-check:$9 = 232 -// gdb-command:print local_to_arm -// gdb-check:$10 = 238 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$11 = 239 -// gdb-command:print not_shadowed -// gdb-check:$12 = 232 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$13 = 241 -// gdb-command:print not_shadowed -// gdb-check:$14 = 232 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$15 = 243 -// gdb-command:print *local_to_arm -// gdb-check:$16 = 244 -// gdb-command:continue - -// gdb-command:print shadowed -// gdb-check:$17 = 231 -// gdb-command:print not_shadowed -// gdb-check:$18 = 232 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print shadowed +//@ gdb-check:$1 = 231 +//@ gdb-command:print not_shadowed +//@ gdb-check:$2 = 232 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$3 = 233 +//@ gdb-command:print not_shadowed +//@ gdb-check:$4 = 232 +//@ gdb-command:print local_to_arm +//@ gdb-check:$5 = 234 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$6 = 236 +//@ gdb-command:print not_shadowed +//@ gdb-check:$7 = 232 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$8 = 237 +//@ gdb-command:print not_shadowed +//@ gdb-check:$9 = 232 +//@ gdb-command:print local_to_arm +//@ gdb-check:$10 = 238 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$11 = 239 +//@ gdb-command:print not_shadowed +//@ gdb-check:$12 = 232 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$13 = 241 +//@ gdb-command:print not_shadowed +//@ gdb-check:$14 = 232 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$15 = 243 +//@ gdb-command:print *local_to_arm +//@ gdb-check:$16 = 244 +//@ gdb-command:continue + +//@ gdb-command:print shadowed +//@ gdb-check:$17 = 231 +//@ gdb-command:print not_shadowed +//@ gdb-check:$18 = 232 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v shadowed -// lldb-check:[...] 231 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 233 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:v local_to_arm -// lldb-check:[...] 234 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 236 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 237 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:v local_to_arm -// lldb-check:[...] 238 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 239 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 241 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 243 -// lldb-command:v *local_to_arm -// lldb-check:[...] 244 -// lldb-command:continue - -// lldb-command:v shadowed -// lldb-check:[...] 231 -// lldb-command:v not_shadowed -// lldb-check:[...] 232 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 231 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 233 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:v local_to_arm +//@ lldb-check:[...] 234 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 236 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 237 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:v local_to_arm +//@ lldb-check:[...] 238 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 239 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 241 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 243 +//@ lldb-command:v *local_to_arm +//@ lldb-check:[...] 244 +//@ lldb-command:continue + +//@ lldb-command:v shadowed +//@ lldb-check:[...] 231 +//@ lldb-command:v not_shadowed +//@ lldb-check:[...] 232 +//@ lldb-command:continue struct Struct { x: isize, diff --git a/tests/debuginfo/lexical-scope-in-parameterless-closure.rs b/tests/debuginfo/lexical-scope-in-parameterless-closure.rs index dd6da95d388c5..225f52f0bfd06 100644 --- a/tests/debuginfo/lexical-scope-in-parameterless-closure.rs +++ b/tests/debuginfo/lexical-scope-in-parameterless-closure.rs @@ -1,7 +1,7 @@ //@ compile-flags:-C debuginfo=1 -// gdb-command:run -// lldb-command:run +//@ gdb-command:run +//@ lldb-command:run // Nothing to do here really, just make sure it compiles. See issue #8513. fn main() { diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs index b6abf507f26b5..0bb01b3975980 100644 --- a/tests/debuginfo/lexical-scope-in-stack-closure.rs +++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs @@ -4,60 +4,60 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 1000 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 1000 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = 2.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = 2.5 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = true +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = false +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 1000 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1000 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] true -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] true +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs index 270fbcf6ebf55..0dd2136b474be 100644 --- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -4,122 +4,122 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // FIRST ITERATION -// gdb-command:print x -// gdb-check:$1 = 0 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 0 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 101 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = 101 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = -987 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = -987 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = 101 +//@ gdb-command:continue // SECOND ITERATION -// gdb-command:print x -// gdb-check:$7 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$8 = 2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$8 = 2 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$9 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$9 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$10 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$10 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$11 = -987 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$11 = -987 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$12 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$12 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$13 = 2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$13 = 2 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // FIRST ITERATION -// lldb-command:v x -// lldb-check:[...] 0 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 0 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -987 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -987 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue // SECOND ITERATION -// lldb-command:v x -// lldb-check:[...] 1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -987 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -987 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2 +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs index b4909a97bea50..890de7fde794e 100644 --- a/tests/debuginfo/lexical-scope-in-unique-closure.rs +++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs @@ -4,60 +4,60 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 1000 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 1000 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = 2.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = 2.5 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = true +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = false +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 1000 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1000 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2.5 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] true -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] true +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs index e8e66d2835cd8..7bfbfe4c21567 100644 --- a/tests/debuginfo/lexical-scope-in-while.rs +++ b/tests/debuginfo/lexical-scope-in-while.rs @@ -4,122 +4,122 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // FIRST ITERATION -// gdb-command:print x -// gdb-check:$1 = 0 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = 0 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 101 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = 101 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = -987 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = -987 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = 101 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = 101 +//@ gdb-command:continue // SECOND ITERATION -// gdb-command:print x -// gdb-check:$7 = 1 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = 1 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$8 = 2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$8 = 2 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$9 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$9 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$10 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$10 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$11 = -987 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$11 = -987 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$12 = 102 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$12 = 102 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$13 = 2 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$13 = 2 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // FIRST ITERATION -// lldb-command:v x -// lldb-check:[...] 0 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 0 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -987 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -987 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 101 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 101 +//@ lldb-command:continue // SECOND ITERATION -// lldb-command:v x -// lldb-check:[...] 1 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 1 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] -987 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] -987 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 102 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 102 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 2 +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs index 8c302a94ea2aa..080eded4000bc 100644 --- a/tests/debuginfo/lexical-scope-with-macro.rs +++ b/tests/debuginfo/lexical-scope-with-macro.rs @@ -4,100 +4,100 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print a -// gdb-check:$1 = 10 -// gdb-command:print b -// gdb-check:$2 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$3 = 890242 -// gdb-command:print b -// gdb-check:$4 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$5 = 10 -// gdb-command:print b -// gdb-check:$6 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$7 = 102 -// gdb-command:print b -// gdb-check:$8 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$9 = 110 -// gdb-command:print b -// gdb-check:$10 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$11 = 10 -// gdb-command:print b -// gdb-check:$12 = 34 -// gdb-command:continue - -// gdb-command:print a -// gdb-check:$13 = 10 -// gdb-command:print b -// gdb-check:$14 = 34 -// gdb-command:print c -// gdb-check:$15 = 400 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print a +//@ gdb-check:$1 = 10 +//@ gdb-command:print b +//@ gdb-check:$2 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$3 = 890242 +//@ gdb-command:print b +//@ gdb-check:$4 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$5 = 10 +//@ gdb-command:print b +//@ gdb-check:$6 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$7 = 102 +//@ gdb-command:print b +//@ gdb-check:$8 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$9 = 110 +//@ gdb-command:print b +//@ gdb-check:$10 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$11 = 10 +//@ gdb-command:print b +//@ gdb-check:$12 = 34 +//@ gdb-command:continue + +//@ gdb-command:print a +//@ gdb-check:$13 = 10 +//@ gdb-command:print b +//@ gdb-check:$14 = 34 +//@ gdb-command:print c +//@ gdb-check:$15 = 400 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v a -// lldb-check:[...] 10 -// lldb-command:v b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:v a -// lldb-check:[...] 890242 -// lldb-command:v b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:v a -// lldb-check:[...] 10 -// lldb-command:v b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:v a -// lldb-check:[...] 102 -// lldb-command:v b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:print a -// lldb-check:[...] 110 -// lldb-command:print b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:print a -// lldb-check:[...] 10 -// lldb-command:print b -// lldb-check:[...] 34 -// lldb-command:continue - -// lldb-command:print a -// lldb-check:[...] 10 -// lldb-command:print b -// lldb-check:[...] 34 -// lldb-command:print c -// lldb-check:[...] 400 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v a +//@ lldb-check:[...] 10 +//@ lldb-command:v b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:v a +//@ lldb-check:[...] 890242 +//@ lldb-command:v b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:v a +//@ lldb-check:[...] 10 +//@ lldb-command:v b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:v a +//@ lldb-check:[...] 102 +//@ lldb-command:v b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:print a +//@ lldb-check:[...] 110 +//@ lldb-command:print b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:print a +//@ lldb-check:[...] 10 +//@ lldb-command:print b +//@ lldb-check:[...] 34 +//@ lldb-command:continue + +//@ lldb-command:print a +//@ lldb-check:[...] 10 +//@ lldb-command:print b +//@ lldb-check:[...] 34 +//@ lldb-command:print c +//@ lldb-check:[...] 400 +//@ lldb-command:continue macro_rules! trivial { ($e1:expr) => ($e1) diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs index 9a7fba30397e1..36705eb192329 100644 --- a/tests/debuginfo/lexical-scopes-in-block-expression.rs +++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs @@ -4,337 +4,337 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$1 = 0 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$1 = 0 // STRUCT EXPRESSION -// gdb-command:print val -// gdb-check:$2 = -1 -// gdb-command:print ten -// gdb-check:$3 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$4 = 11 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$5 = 1 -// gdb-command:print ten -// gdb-check:$6 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$7 = -1 -// gdb-command:print ten -// gdb-check:$8 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$2 = -1 +//@ gdb-command:print ten +//@ gdb-check:$3 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$4 = 11 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$5 = 1 +//@ gdb-command:print ten +//@ gdb-check:$6 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$7 = -1 +//@ gdb-command:print ten +//@ gdb-check:$8 = 10 +//@ gdb-command:continue // FUNCTION CALL -// gdb-command:print val -// gdb-check:$9 = -1 -// gdb-command:print ten -// gdb-check:$10 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$11 = 12 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$12 = 2 -// gdb-command:print ten -// gdb-check:$13 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$14 = -1 -// gdb-command:print ten -// gdb-check:$15 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$9 = -1 +//@ gdb-command:print ten +//@ gdb-check:$10 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$11 = 12 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$12 = 2 +//@ gdb-command:print ten +//@ gdb-check:$13 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$14 = -1 +//@ gdb-command:print ten +//@ gdb-check:$15 = 10 +//@ gdb-command:continue // TUPLE EXPRESSION -// gdb-command:print val -// gdb-check:$16 = -1 -// gdb-command:print ten -// gdb-check:$17 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$18 = 13 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$19 = 3 -// gdb-command:print ten -// gdb-check:$20 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$21 = -1 -// gdb-command:print ten -// gdb-check:$22 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$16 = -1 +//@ gdb-command:print ten +//@ gdb-check:$17 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$18 = 13 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$19 = 3 +//@ gdb-command:print ten +//@ gdb-check:$20 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$21 = -1 +//@ gdb-command:print ten +//@ gdb-check:$22 = 10 +//@ gdb-command:continue // VEC EXPRESSION -// gdb-command:print val -// gdb-check:$23 = -1 -// gdb-command:print ten -// gdb-check:$24 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$25 = 14 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$26 = 4 -// gdb-command:print ten -// gdb-check:$27 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$28 = -1 -// gdb-command:print ten -// gdb-check:$29 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$23 = -1 +//@ gdb-command:print ten +//@ gdb-check:$24 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$25 = 14 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$26 = 4 +//@ gdb-command:print ten +//@ gdb-check:$27 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$28 = -1 +//@ gdb-command:print ten +//@ gdb-check:$29 = 10 +//@ gdb-command:continue // REPEAT VEC EXPRESSION -// gdb-command:print val -// gdb-check:$30 = -1 -// gdb-command:print ten -// gdb-check:$31 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$32 = 15 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$33 = 5 -// gdb-command:print ten -// gdb-check:$34 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$35 = -1 -// gdb-command:print ten -// gdb-check:$36 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$30 = -1 +//@ gdb-command:print ten +//@ gdb-check:$31 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$32 = 15 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$33 = 5 +//@ gdb-command:print ten +//@ gdb-check:$34 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$35 = -1 +//@ gdb-command:print ten +//@ gdb-check:$36 = 10 +//@ gdb-command:continue // ASSIGNMENT EXPRESSION -// gdb-command:print val -// gdb-check:$37 = -1 -// gdb-command:print ten -// gdb-check:$38 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$39 = 16 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$40 = 6 -// gdb-command:print ten -// gdb-check:$41 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$42 = -1 -// gdb-command:print ten -// gdb-check:$43 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$37 = -1 +//@ gdb-command:print ten +//@ gdb-check:$38 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$39 = 16 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$40 = 6 +//@ gdb-command:print ten +//@ gdb-check:$41 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$42 = -1 +//@ gdb-command:print ten +//@ gdb-check:$43 = 10 +//@ gdb-command:continue // ARITHMETIC EXPRESSION -// gdb-command:print val -// gdb-check:$44 = -1 -// gdb-command:print ten -// gdb-check:$45 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$46 = 17 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$47 = 7 -// gdb-command:print ten -// gdb-check:$48 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$49 = -1 -// gdb-command:print ten -// gdb-check:$50 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$44 = -1 +//@ gdb-command:print ten +//@ gdb-check:$45 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$46 = 17 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$47 = 7 +//@ gdb-command:print ten +//@ gdb-check:$48 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$49 = -1 +//@ gdb-command:print ten +//@ gdb-check:$50 = 10 +//@ gdb-command:continue // INDEX EXPRESSION -// gdb-command:print val -// gdb-check:$51 = -1 -// gdb-command:print ten -// gdb-check:$52 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$53 = 18 -// gdb-command:print lexical_scopes_in_block_expression::MUT_INT -// gdb-check:$54 = 8 -// gdb-command:print ten -// gdb-check:$55 = 10 -// gdb-command:continue - -// gdb-command:print val -// gdb-check:$56 = -1 -// gdb-command:print ten -// gdb-check:$57 = 10 -// gdb-command:continue +//@ gdb-command:print val +//@ gdb-check:$51 = -1 +//@ gdb-command:print ten +//@ gdb-check:$52 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$53 = 18 +//@ gdb-command:print lexical_scopes_in_block_expression::MUT_INT +//@ gdb-check:$54 = 8 +//@ gdb-command:print ten +//@ gdb-check:$55 = 10 +//@ gdb-command:continue + +//@ gdb-command:print val +//@ gdb-check:$56 = -1 +//@ gdb-command:print ten +//@ gdb-check:$57 = 10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STRUCT EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 11 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 11 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // FUNCTION CALL -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 12 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 12 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // TUPLE EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 13 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 13 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // VEC EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 14 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 14 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // REPEAT VEC EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 15 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 15 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // ASSIGNMENT EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v val -// lldb-check:[...] 16 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] 16 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // ARITHMETIC EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 17 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 17 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue // INDEX EXPRESSION -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] 18 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue - -// lldb-command:v val -// lldb-check:[...] -1 -// lldb-command:v ten -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] 18 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue + +//@ lldb-command:v val +//@ lldb-check:[...] -1 +//@ lldb-command:v ten +//@ lldb-check:[...] 10 +//@ lldb-command:continue #![allow(unused_variables)] #![allow(unused_assignments)] diff --git a/tests/debuginfo/limited-debuginfo.rs b/tests/debuginfo/limited-debuginfo.rs index 136953641a4da..d44e07882727b 100644 --- a/tests/debuginfo/limited-debuginfo.rs +++ b/tests/debuginfo/limited-debuginfo.rs @@ -5,18 +5,18 @@ //@ ignore-backends: gcc // Make sure functions have proper names -// gdb-command:info functions -// gdb-check:fn limited_debuginfo::main(); -// gdb-check:fn limited_debuginfo::some_function(); -// gdb-check:fn limited_debuginfo::some_other_function(); -// gdb-check:fn limited_debuginfo::zzz(); +//@ gdb-command:info functions +//@ gdb-check:fn limited_debuginfo::main(); +//@ gdb-check:fn limited_debuginfo::some_function(); +//@ gdb-check:fn limited_debuginfo::some_other_function(); +//@ gdb-check:fn limited_debuginfo::zzz(); -// gdb-command:run +//@ gdb-command:run // Make sure there is no information about locals -// gdb-command:info locals -// gdb-check:No locals. -// gdb-command:continue +//@ gdb-command:info locals +//@ gdb-check:No locals. +//@ gdb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/macro-stepping.rs b/tests/debuginfo/macro-stepping.rs index e58975764e533..bdeadf8a5c05e 100644 --- a/tests/debuginfo/macro-stepping.rs +++ b/tests/debuginfo/macro-stepping.rs @@ -14,77 +14,77 @@ extern crate macro_stepping; // exports new_scope!() // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc4[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc5[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc6[...] - -// gdb-command:continue -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#inc-loc1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#inc-loc2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#inc-loc3[...] +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc4[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc5[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc6[...] + +//@ gdb-command:continue +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#inc-loc1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#inc-loc2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#inc-loc3[...] // === LLDB TESTS ================================================================================== -// lldb-command:set set stop-line-count-before 0 -// lldb-command:set set stop-line-count-after 1 +//@ lldb-command:set set stop-line-count-before 0 +//@ lldb-command:set set stop-line-count-after 1 // Can't set both to zero or lldb will stop printing source at all. So it will output the current // line and the next. We deal with this by having at least 2 lines between the #loc's -// lldb-command:run -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc1 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc2 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc3 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc4 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #loc5 [...] - -// lldb-command:continue -// lldb-command:step -// lldb-command:frame select -// lldb-check:[...] #inc-loc1 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #inc-loc2 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #inc-loc1 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #inc-loc2 [...] -// lldb-command:next -// lldb-command:frame select -// lldb-check:[...] #inc-loc3 [...] +//@ lldb-command:run +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc1 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc2 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc3 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc4 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #loc5 [...] + +//@ lldb-command:continue +//@ lldb-command:step +//@ lldb-command:frame select +//@ lldb-check:[...] #inc-loc1 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #inc-loc2 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #inc-loc1 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #inc-loc2 [...] +//@ lldb-command:next +//@ lldb-command:frame select +//@ lldb-check:[...] #inc-loc3 [...] #[collapse_debuginfo(yes)] macro_rules! foo { diff --git a/tests/debuginfo/marker-types.rs b/tests/debuginfo/marker-types.rs index 6686b057ef7b3..3c9cba608178c 100644 --- a/tests/debuginfo/marker-types.rs +++ b/tests/debuginfo/marker-types.rs @@ -3,29 +3,29 @@ // === CDB TESTS ================================================================================== -// cdb-command: g - -// cdb-command: dx nonnull -// cdb-check:nonnull : NonNull(0x[...]: 0xc) [Type: core::ptr::non_null::NonNull] -// cdb-check: [] [Type: core::ptr::non_null::NonNull] -// cdb-check: 0xc [Type: unsigned int] - -// cdb-command: dx manuallydrop -// cdb-check:manuallydrop : 12345 [Type: core::mem::manually_drop::ManuallyDrop] -// cdb-check: [] [Type: core::mem::manually_drop::ManuallyDrop] - -// cdb-command: dx pin -// cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin >] -// cdb-check: [] [Type: core::pin::Pin >] -// cdb-check: [len] : 0x4 [Type: unsigned [...]] -// cdb-check: [capacity] : 0x4 [Type: unsigned [...]] -// cdb-check: [chars] : "this" - -// cdb-command: dx unique -// cdb-check:unique : Unique(0x[...]: (0x2a, 4321)) [Type: core::ptr::unique::Unique >] -// cdb-check: [] [Type: core::ptr::unique::Unique >] -// cdb-check: [0] : 0x2a [Type: unsigned __int64] -// cdb-check: [1] : 4321 [Type: int] +//@ cdb-command: g + +//@ cdb-command: dx nonnull +//@ cdb-check:nonnull : NonNull(0x[...]: 0xc) [Type: core::ptr::non_null::NonNull] +//@ cdb-check: [] [Type: core::ptr::non_null::NonNull] +//@ cdb-check: 0xc [Type: unsigned int] + +//@ cdb-command: dx manuallydrop +//@ cdb-check:manuallydrop : 12345 [Type: core::mem::manually_drop::ManuallyDrop] +//@ cdb-check: [] [Type: core::mem::manually_drop::ManuallyDrop] + +//@ cdb-command: dx pin +//@ cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin >] +//@ cdb-check: [] [Type: core::pin::Pin >] +//@ cdb-check: [len] : 0x4 [Type: unsigned [...]] +//@ cdb-check: [capacity] : 0x4 [Type: unsigned [...]] +//@ cdb-check: [chars] : "this" + +//@ cdb-command: dx unique +//@ cdb-check:unique : Unique(0x[...]: (0x2a, 4321)) [Type: core::ptr::unique::Unique >] +//@ cdb-check: [] [Type: core::ptr::unique::Unique >] +//@ cdb-check: [0] : 0x2a [Type: unsigned __int64] +//@ cdb-check: [1] : 4321 [Type: int] #![feature(ptr_internals)] diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs index f86cf8ccfdf76..c7955a7e875a0 100644 --- a/tests/debuginfo/method-on-enum.rs +++ b/tests/debuginfo/method-on-enum.rs @@ -8,102 +8,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = method_on_enum::Enum::Variant2(117901063) -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = method_on_enum::Enum::Variant2(117901063) +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = method_on_enum::Enum::Variant2(117901063) -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = method_on_enum::Enum::Variant2(117901063) +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = method_on_enum::Enum::Variant1{x: 1799, y: 1799} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] Variant2(117901063) -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] Variant2(117901063) +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] Variant2(117901063) -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] Variant2(117901063) +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] Variant1 { x: 1799, y: 1799 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] Variant1 { x: 1799, y: 1799 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] Variant1 { x: 1799, y: 1799 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] enum Enum { diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs index b9627f27b9123..dbda3e8a8f7a1 100644 --- a/tests/debuginfo/method-on-generic-struct.rs +++ b/tests/debuginfo/method-on-generic-struct.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = method_on_generic_struct::Struct<(u32, i32)> {x: (8888, -8888)} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = method_on_generic_struct::Struct {x: 1234.5} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = method_on_generic_struct::Struct {x: 1234.5} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...]Struct<(u32, i32)>) *self = { x = { 0 = 8888 1 = -8888 } } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...]Struct<(u32, i32)>) *self = { x = { 0 = 8888 1 = -8888 } } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...]Struct<(u32, i32)>) self = { x = { 0 = 8888 1 = -8888 } } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...]Struct<(u32, i32)>) self = { x = { 0 = 8888 1 = -8888 } } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...]Struct) *self = { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...]Struct) *self = { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...]Struct) self = { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...]Struct) self = { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...]Struct) *self = { x = 1234.5 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...]Struct) *self = { x = 1234.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs index 4ccb55d3704b0..5a4c275e7041e 100644 --- a/tests/debuginfo/method-on-struct.rs +++ b/tests/debuginfo/method-on-struct.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = method_on_struct::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = method_on_struct::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = method_on_struct::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = method_on_struct::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = method_on_struct::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = method_on_struct::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = method_on_struct::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = method_on_struct::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = method_on_struct::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = method_on_struct::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs index baf1a8567bbf3..673d25a72845b 100644 --- a/tests/debuginfo/method-on-trait.rs +++ b/tests/debuginfo/method-on-trait.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = method_on_trait::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = method_on_trait::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = method_on_trait::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = method_on_trait::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = method_on_trait::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = method_on_trait::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = method_on_trait::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = method_on_trait::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = method_on_trait::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = method_on_trait::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs index 077c0bc13d90b..03c00d668741c 100644 --- a/tests/debuginfo/method-on-tuple-struct.rs +++ b/tests/debuginfo/method-on-tuple-struct.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = method_on_tuple_struct::TupleStruct (100, -100.5) -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = method_on_tuple_struct::TupleStruct (100, -100.5) +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = method_on_tuple_struct::TupleStruct (100, -100.5) -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = method_on_tuple_struct::TupleStruct (100, -100.5) +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = method_on_tuple_struct::TupleStruct (200, -200.5) -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = method_on_tuple_struct::TupleStruct (200, -200.5) +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = method_on_tuple_struct::TupleStruct (200, -200.5) -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = method_on_tuple_struct::TupleStruct (200, -200.5) +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = method_on_tuple_struct::TupleStruct (200, -200.5) -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = method_on_tuple_struct::TupleStruct (200, -200.5) +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { 0 = 100 1 = -100.5 } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { 0 = 100 1 = -100.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { 0 = 100 1 = -100.5 } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { 0 = 100 1 = -100.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { 0 = 200 1 = -200.5 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { 0 = 200 1 = -200.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { 0 = 200 1 = -200.5 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { 0 = 200 1 = -200.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { 0 = 200 1 = -200.5 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { 0 = 200 1 = -200.5 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] struct TupleStruct(isize, f64); diff --git a/tests/debuginfo/msvc-pretty-enums.rs b/tests/debuginfo/msvc-pretty-enums.rs index aa6629ef1e1be..98878fddf859d 100644 --- a/tests/debuginfo/msvc-pretty-enums.rs +++ b/tests/debuginfo/msvc-pretty-enums.rs @@ -3,233 +3,233 @@ //@ compile-flags:-g // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v a -// lldb-check:(core::option::Option) a = { value = { 0 = Low } } +//@ lldb-command:v a +//@ lldb-check:(core::option::Option) a = { value = { 0 = Low } } -// lldb-command:v b -// lldb-check:(core::option::Option) b = { value = $discr$ = '\x01' } +//@ lldb-command:v b +//@ lldb-check:(core::option::Option) b = { value = $discr$ = '\x01' } -// lldb-command:v c -// lldb-check:(msvc_pretty_enums::NicheLayoutEnum) c = { value = $discr$ = '\x11' } +//@ lldb-command:v c +//@ lldb-check:(msvc_pretty_enums::NicheLayoutEnum) c = { value = $discr$ = '\x11' } -// lldb-command:v d -// lldb-check:(msvc_pretty_enums::NicheLayoutEnum) d = { value = { my_data = High } } +//@ lldb-command:v d +//@ lldb-check:(msvc_pretty_enums::NicheLayoutEnum) d = { value = { my_data = High } } -// lldb-command:v e -// lldb-check:(msvc_pretty_enums::NicheLayoutEnum) e = { value = $discr$ = '\x13' } +//@ lldb-command:v e +//@ lldb-check:(msvc_pretty_enums::NicheLayoutEnum) e = { value = $discr$ = '\x13' } -// lldb-command:v h -// lldb-check:(core::option::Option) h = { value = { 0 = 12 } $discr$ = 1 } +//@ lldb-command:v h +//@ lldb-check:(core::option::Option) h = { value = { 0 = 12 } $discr$ = 1 } -// lldb-command:v i -// lldb-check:(core::option::Option) i = { value = $discr$ = 0 } +//@ lldb-command:v i +//@ lldb-check:(core::option::Option) i = { value = $discr$ = 0 } -// lldb-command:v j -// lldb-check:(msvc_pretty_enums::CStyleEnum) j = High +//@ lldb-command:v j +//@ lldb-check:(msvc_pretty_enums::CStyleEnum) j = High -// lldb-command:v k -// lldb-check:(core::option::Option) k = { value = { 0 = "IAMA optional string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'o' [6] = 'p' [7] = 't' [8] = 'i' [9] = 'o' [10] = 'n' [11] = 'a' [12] = 'l' [13] = ' ' [14] = 's' [15] = 't' [16] = 'r' [17] = 'i' [18] = 'n' [19] = 'g' [20] = '!' } } } +//@ lldb-command:v k +//@ lldb-check:(core::option::Option) k = { value = { 0 = "IAMA optional string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'o' [6] = 'p' [7] = 't' [8] = 'i' [9] = 'o' [10] = 'n' [11] = 'a' [12] = 'l' [13] = ' ' [14] = 's' [15] = 't' [16] = 'r' [17] = 'i' [18] = 'n' [19] = 'g' [20] = '!' } } } -// lldb-command:v l -// lldb-check:(core::result::Result) l = { value = { 0 = {} } } +//@ lldb-command:v l +//@ lldb-check:(core::result::Result) l = { value = { 0 = {} } } -// lldb-command:v niche128_some -// lldb-check:(core::option::Option>) niche128_some = { value = $discr$ = 123456 } +//@ lldb-command:v niche128_some +//@ lldb-check:(core::option::Option>) niche128_some = { value = $discr$ = 123456 } -// lldb-command:v niche128_none -// lldb-check:(core::option::Option>) niche128_none = { value = $discr$ = 0 } +//@ lldb-command:v niche128_none +//@ lldb-check:(core::option::Option>) niche128_none = { value = $discr$ = 0 } -// lldb-command:v wrapping_niche128_untagged -// lldb-check:(msvc_pretty_enums::Wrapping128Niche) wrapping_niche128_untagged = { value = { 0 = { 0 = 340282366920938463463374607431768211454 } } } +//@ lldb-command:v wrapping_niche128_untagged +//@ lldb-check:(msvc_pretty_enums::Wrapping128Niche) wrapping_niche128_untagged = { value = { 0 = { 0 = 340282366920938463463374607431768211454 } } } -// lldb-command:v wrapping_niche128_none1 -// lldb-check:(msvc_pretty_enums::Wrapping128Niche) wrapping_niche128_none1 = { value = { 0 = { 0 = 2 } } } +//@ lldb-command:v wrapping_niche128_none1 +//@ lldb-check:(msvc_pretty_enums::Wrapping128Niche) wrapping_niche128_none1 = { value = { 0 = { 0 = 2 } } } -// lldb-command:v direct_tag_128_a -// lldb-check:(msvc_pretty_enums::DirectTag128) direct_tag_128_a = { value = { 0 = 42 } $discr$ = 0 } +//@ lldb-command:v direct_tag_128_a +//@ lldb-check:(msvc_pretty_enums::DirectTag128) direct_tag_128_a = { value = { 0 = 42 } $discr$ = 0 } -// lldb-command:v direct_tag_128_b -// lldb-check:(msvc_pretty_enums::DirectTag128) direct_tag_128_b = { value = { 0 = 137 } $discr$ = 1 } +//@ lldb-command:v direct_tag_128_b +//@ lldb-check:(msvc_pretty_enums::DirectTag128) direct_tag_128_b = { value = { 0 = 137 } $discr$ = 1 } // &u32 is incorrectly formatted and LLDB thinks it's a char* so skipping niche_w_fields_1_some -// lldb-command:v niche_w_fields_1_none -// lldb-check:(msvc_pretty_enums::NicheLayoutWithFields1) niche_w_fields_1_none = { value = { 0 = 99 } $discr$ = 1 } +//@ lldb-command:v niche_w_fields_1_none +//@ lldb-check:(msvc_pretty_enums::NicheLayoutWithFields1) niche_w_fields_1_none = { value = { 0 = 99 } $discr$ = 1 } -// lldb-command:v niche_w_fields_2_some -// lldb-check:(msvc_pretty_enums::NicheLayoutWithFields2) niche_w_fields_2_some = { value = { 0 = 800 { __0 = { 0 = 800 } } 1 = 900 } $discr$ = 0 } +//@ lldb-command:v niche_w_fields_2_some +//@ lldb-check:(msvc_pretty_enums::NicheLayoutWithFields2) niche_w_fields_2_some = { value = { 0 = 800 { __0 = { 0 = 800 } } 1 = 900 } $discr$ = 0 } -// lldb-command:v niche_w_fields_3_some -// lldb-check:(msvc_pretty_enums::NicheLayoutWithFields3) niche_w_fields_3_some = { value = { 0 = '\x89' 1 = true } } +//@ lldb-command:v niche_w_fields_3_some +//@ lldb-check:(msvc_pretty_enums::NicheLayoutWithFields3) niche_w_fields_3_some = { value = { 0 = '\x89' 1 = true } } -// lldb-command:v niche_w_fields_3_niche3 -// lldb-check:(msvc_pretty_enums::NicheLayoutWithFields3) niche_w_fields_3_niche3 = { value = { 0 = '"' } $discr$ = '\x04' } +//@ lldb-command:v niche_w_fields_3_niche3 +//@ lldb-check:(msvc_pretty_enums::NicheLayoutWithFields3) niche_w_fields_3_niche3 = { value = { 0 = '"' } $discr$ = '\x04' } -// lldb-command:v arbitrary_discr1 -// lldb-check:(msvc_pretty_enums::ArbitraryDiscr) arbitrary_discr1 = { value = { 0 = 1234 } $discr$ = 1000 } +//@ lldb-command:v arbitrary_discr1 +//@ lldb-check:(msvc_pretty_enums::ArbitraryDiscr) arbitrary_discr1 = { value = { 0 = 1234 } $discr$ = 1000 } -// lldb-command:v arbitrary_discr2 -// lldb-check:(msvc_pretty_enums::ArbitraryDiscr) arbitrary_discr2 = { value = { 0 = 5678 } $discr$ = 5000000 } +//@ lldb-command:v arbitrary_discr2 +//@ lldb-check:(msvc_pretty_enums::ArbitraryDiscr) arbitrary_discr2 = { value = { 0 = 5678 } $discr$ = 5000000 } // === CDB TESTS ================================================================================== -// cdb-command: g -// -// cdb-command: dx a -// cdb-check:a : Some [Type: enum2$ >] -// cdb-check: [+0x000] __0 : Low (0x2) [Type: msvc_pretty_enums::CStyleEnum] -// -// cdb-command: dx b -// cdb-check:b : None [Type: enum2$ >] -// -// cdb-command: dx c -// cdb-check:c : Tag1 [Type: enum2$] -// -// cdb-command: dx d -// cdb-check:d : Data [Type: enum2$] -// cdb-check: [+0x000] my_data : High (0x10) [Type: msvc_pretty_enums::CStyleEnum] -// -// cdb-command: dx e -// cdb-check:e : Tag2 [Type: enum2$] -// -// cdb-command: dx f -// cdb-check:f : Some [Type: enum2$ > >] -// cdb-check: [+0x000] __0 : 0x[...] : 0x1 [Type: unsigned int *] -// -// cdb-command: dx g -// cdb-check:g : None [Type: enum2$ > >] -// -// cdb-command: dx h -// cdb-check:h : Some [Type: enum2$ >] -// cdb-check: [+0x004] __0 : 0xc [Type: unsigned int] -// -// cdb-command: dx i -// cdb-check:i : None [Type: enum2$ >] -// -// cdb-command: dx j -// cdb-check:j : High (0x10) [Type: msvc_pretty_enums::CStyleEnum] -// -// cdb-command: dx k -// cdb-check:k : Some [Type: enum2$ >] -// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String] -// -// cdb-command: dx l -// cdb-check:l : Ok [Type: enum2$ > >] -// cdb-check: [+0x000] __0 : 0x2a [Type: unsigned int] -// -// cdb-command: dx niche128_some -// cdb-check: niche128_some : Some [Type: enum2$ > >] +//@ cdb-command: g + +//@ cdb-command: dx a +//@ cdb-check:a : Some [Type: enum2$ >] +//@ cdb-check: [+0x000] __0 : Low (0x2) [Type: msvc_pretty_enums::CStyleEnum] + +//@ cdb-command: dx b +//@ cdb-check:b : None [Type: enum2$ >] + +//@ cdb-command: dx c +//@ cdb-check:c : Tag1 [Type: enum2$] + +//@ cdb-command: dx d +//@ cdb-check:d : Data [Type: enum2$] +//@ cdb-check: [+0x000] my_data : High (0x10) [Type: msvc_pretty_enums::CStyleEnum] + +//@ cdb-command: dx e +//@ cdb-check:e : Tag2 [Type: enum2$] + +//@ cdb-command: dx f +//@ cdb-check:f : Some [Type: enum2$ > >] +//@ cdb-check: [+0x000] __0 : 0x[...] : 0x1 [Type: unsigned int *] + +//@ cdb-command: dx g +//@ cdb-check:g : None [Type: enum2$ > >] + +//@ cdb-command: dx h +//@ cdb-check:h : Some [Type: enum2$ >] +//@ cdb-check: [+0x004] __0 : 0xc [Type: unsigned int] + +//@ cdb-command: dx i +//@ cdb-check:i : None [Type: enum2$ >] + +//@ cdb-command: dx j +//@ cdb-check:j : High (0x10) [Type: msvc_pretty_enums::CStyleEnum] + +//@ cdb-command: dx k +//@ cdb-check:k : Some [Type: enum2$ >] +//@ cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String] + +//@ cdb-command: dx l +//@ cdb-check:l : Ok [Type: enum2$ > >] +//@ cdb-check: [+0x000] __0 : 0x2a [Type: unsigned int] + +//@ cdb-command: dx niche128_some +//@ cdb-check: niche128_some : Some [Type: enum2$ > >] // Note: we can't actually read the value of the field because CDB cannot handle 128 bit integers. -// cdb-check: [+0x000] __0 [...] [Type: core::num::nonzero::NonZero] -// -// cdb-command: dx niche128_none -// cdb-check: niche128_none : None [Type: enum2$ > >] -// -// cdb-command: dx wrapping_niche128_untagged -// cdb-check: wrapping_niche128_untagged : X [Type: enum2$] -// cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] -// -// cdb-command: dx wrapping_niche128_none1 -// cdb-check: wrapping_niche128_none1 : Y [Type: enum2$] -// cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] -// -// cdb-command: dx wrapping_niche128_none2 -// cdb-check: wrapping_niche128_none2 : Z [Type: enum2$] -// cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] -// -// cdb-command: dx direct_tag_128_a,d -// cdb-check: direct_tag_128_a,d : A [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 42 [Type: unsigned int] -// -// cdb-command: dx direct_tag_128_b,d -// cdb-check: direct_tag_128_b,d : B [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 137 [Type: unsigned int] -// -// cdb-command: dx niche_w_fields_1_some,d -// cdb-check: niche_w_fields_1_some,d : A [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 0x[...] : 77 [Type: unsigned char *] -// cdb-check: [+0x[...]] __1 : 7 [Type: unsigned int] -// -// cdb-command: dx niche_w_fields_1_none,d -// cdb-check: niche_w_fields_1_none,d : B [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 99 [Type: unsigned int] -// -// cdb-command: dx niche_w_fields_2_some,d -// cdb-check: niche_w_fields_2_some,d : A [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 800 [Type: core::num::nonzero::NonZero] -// cdb-check: [+0x[...]] __1 : 900 [Type: unsigned __int64] -// -// cdb-command: dx niche_w_fields_2_none,d -// cdb-check: niche_w_fields_2_none,d : B [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 1000 [Type: unsigned __int64] -// -// cdb-command: dx niche_w_fields_3_some,d -// cdb-check: niche_w_fields_3_some,d : A [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 137 [Type: unsigned char] -// cdb-check: [+0x[...]] __1 : true [Type: bool] -// -// cdb-command: dx niche_w_fields_3_niche1,d -// cdb-check: niche_w_fields_3_niche1,d : B [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 12 [Type: unsigned char] -// -// cdb-command: dx niche_w_fields_3_niche2,d -// cdb-check: niche_w_fields_3_niche2,d : C [Type: enum2$] -// cdb-check: [+0x[...]] __0 : false [Type: bool] -// -// cdb-command: dx niche_w_fields_3_niche3,d -// cdb-check: niche_w_fields_3_niche3,d : D [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 34 [Type: unsigned char] -// -// cdb-command: dx niche_w_fields_3_niche4,d -// cdb-check: niche_w_fields_3_niche4,d : E [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 56 [Type: unsigned char] -// -// cdb-command: dx niche_w_fields_3_niche5,d -// cdb-check: niche_w_fields_3_niche5,d : F [Type: enum2$] -// -// cdb-command: dx -r3 niche_w_fields_std_result_ok,d -// cdb-check: niche_w_fields_std_result_ok,d : Ok [Type: enum2$,alloc::alloc::Global>,u64> >] -// cdb-check: [+0x[...]] __0 [Type: alloc::boxed::Box,alloc::alloc::Global>] -// cdb-check: [+0x[...]] data_ptr : [...] -// cdb-check: [+0x[...]] length : 3 [...] -// -// cdb-command: dx -r3 niche_w_fields_std_result_err,d -// cdb-check: niche_w_fields_std_result_err,d : Err [Type: enum2$,alloc::alloc::Global>,u64> >] -// cdb-check: [+0x[...]] __0 : 789 [Type: unsigned __int64] -// -// cdb-command: dx -r2 arbitrary_discr1,d -// cdb-check: arbitrary_discr1,d : Abc [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 1234 [Type: unsigned int] -// -// cdb-command: dx -r2 arbitrary_discr2,d -// cdb-check: arbitrary_discr2,d : Def [Type: enum2$] -// cdb-check: [+0x[...]] __0 : 5678 [Type: unsigned int] -// -// cdb-command: dx c_style_u128_a -// cdb-check: c_style_u128_a : A [Type: enum2$] -// -// cdb-command: dx c_style_u128_b -// cdb-check: c_style_u128_b : B [Type: enum2$] -// -// cdb-command: dx c_style_u128_c -// cdb-check: c_style_u128_c : C [Type: enum2$] -// -// cdb-command: dx c_style_u128_d -// cdb-check: c_style_u128_d : D [Type: enum2$] -// -// cdb-command: dx c_style_i128_a -// cdb-check: c_style_i128_a : A [Type: enum2$] -// -// cdb-command: dx c_style_i128_b -// cdb-check: c_style_i128_b : B [Type: enum2$] -// -// cdb-command: dx c_style_i128_c -// cdb-check: c_style_i128_c : C [Type: enum2$] -// -// cdb-command: dx c_style_i128_d -// cdb-check: c_style_i128_d : D [Type: enum2$] +//@ cdb-check: [+0x000] __0 [...] [Type: core::num::nonzero::NonZero] + +//@ cdb-command: dx niche128_none +//@ cdb-check: niche128_none : None [Type: enum2$ > >] + +//@ cdb-command: dx wrapping_niche128_untagged +//@ cdb-check: wrapping_niche128_untagged : X [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] + +//@ cdb-command: dx wrapping_niche128_none1 +//@ cdb-check: wrapping_niche128_none1 : Y [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] + +//@ cdb-command: dx wrapping_niche128_none2 +//@ cdb-check: wrapping_niche128_none2 : Z [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 [Type: msvc_pretty_enums::Wrapping128] + +//@ cdb-command: dx direct_tag_128_a,d +//@ cdb-check: direct_tag_128_a,d : A [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 42 [Type: unsigned int] + +//@ cdb-command: dx direct_tag_128_b,d +//@ cdb-check: direct_tag_128_b,d : B [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 137 [Type: unsigned int] + +//@ cdb-command: dx niche_w_fields_1_some,d +//@ cdb-check: niche_w_fields_1_some,d : A [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 0x[...] : 77 [Type: unsigned char *] +//@ cdb-check: [+0x[...]] __1 : 7 [Type: unsigned int] + +//@ cdb-command: dx niche_w_fields_1_none,d +//@ cdb-check: niche_w_fields_1_none,d : B [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 99 [Type: unsigned int] + +//@ cdb-command: dx niche_w_fields_2_some,d +//@ cdb-check: niche_w_fields_2_some,d : A [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 800 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [+0x[...]] __1 : 900 [Type: unsigned __int64] + +//@ cdb-command: dx niche_w_fields_2_none,d +//@ cdb-check: niche_w_fields_2_none,d : B [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 1000 [Type: unsigned __int64] + +//@ cdb-command: dx niche_w_fields_3_some,d +//@ cdb-check: niche_w_fields_3_some,d : A [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 137 [Type: unsigned char] +//@ cdb-check: [+0x[...]] __1 : true [Type: bool] + +//@ cdb-command: dx niche_w_fields_3_niche1,d +//@ cdb-check: niche_w_fields_3_niche1,d : B [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 12 [Type: unsigned char] + +//@ cdb-command: dx niche_w_fields_3_niche2,d +//@ cdb-check: niche_w_fields_3_niche2,d : C [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : false [Type: bool] + +//@ cdb-command: dx niche_w_fields_3_niche3,d +//@ cdb-check: niche_w_fields_3_niche3,d : D [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 34 [Type: unsigned char] + +//@ cdb-command: dx niche_w_fields_3_niche4,d +//@ cdb-check: niche_w_fields_3_niche4,d : E [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 56 [Type: unsigned char] + +//@ cdb-command: dx niche_w_fields_3_niche5,d +//@ cdb-check: niche_w_fields_3_niche5,d : F [Type: enum2$] + +//@ cdb-command: dx -r3 niche_w_fields_std_result_ok,d +//@ cdb-check: niche_w_fields_std_result_ok,d : Ok [Type: enum2$,alloc::alloc::Global>,u64> >] +//@ cdb-check: [+0x[...]] __0 [Type: alloc::boxed::Box,alloc::alloc::Global>] +//@ cdb-check: [+0x[...]] data_ptr : [...] +//@ cdb-check: [+0x[...]] length : 3 [...] + +//@ cdb-command: dx -r3 niche_w_fields_std_result_err,d +//@ cdb-check: niche_w_fields_std_result_err,d : Err [Type: enum2$,alloc::alloc::Global>,u64> >] +//@ cdb-check: [+0x[...]] __0 : 789 [Type: unsigned __int64] + +//@ cdb-command: dx -r2 arbitrary_discr1,d +//@ cdb-check: arbitrary_discr1,d : Abc [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 1234 [Type: unsigned int] + +//@ cdb-command: dx -r2 arbitrary_discr2,d +//@ cdb-check: arbitrary_discr2,d : Def [Type: enum2$] +//@ cdb-check: [+0x[...]] __0 : 5678 [Type: unsigned int] + +//@ cdb-command: dx c_style_u128_a +//@ cdb-check: c_style_u128_a : A [Type: enum2$] + +//@ cdb-command: dx c_style_u128_b +//@ cdb-check: c_style_u128_b : B [Type: enum2$] + +//@ cdb-command: dx c_style_u128_c +//@ cdb-check: c_style_u128_c : C [Type: enum2$] + +//@ cdb-command: dx c_style_u128_d +//@ cdb-check: c_style_u128_d : D [Type: enum2$] + +//@ cdb-command: dx c_style_i128_a +//@ cdb-check: c_style_i128_a : A [Type: enum2$] + +//@ cdb-command: dx c_style_i128_b +//@ cdb-check: c_style_i128_b : B [Type: enum2$] + +//@ cdb-command: dx c_style_i128_c +//@ cdb-check: c_style_i128_c : C [Type: enum2$] + +//@ cdb-command: dx c_style_i128_d +//@ cdb-check: c_style_i128_d : D [Type: enum2$] #![feature(rustc_attrs)] use std::num::NonZero; diff --git a/tests/debuginfo/msvc-scalarpair-params.rs b/tests/debuginfo/msvc-scalarpair-params.rs index 436a5e07035ef..857852cbcf293 100644 --- a/tests/debuginfo/msvc-scalarpair-params.rs +++ b/tests/debuginfo/msvc-scalarpair-params.rs @@ -1,57 +1,57 @@ //@ only-cdb //@ compile-flags: -g -// cdb-command: g - -// cdb-command: dx r1 -// cdb-check:r1 : (0xa..0xc) [Type: core::ops::range::Range] -// cdb-command: dx r2 -// cdb-check:r2 : (0x14..0x1e) [Type: core::ops::range::Range] - -// cdb-command: g - -// cdb-command: dx r1 -// cdb-check:r1 : (0x9..0x64) [Type: core::ops::range::Range] -// cdb-command: dx r2 -// cdb-check:r2 : (0xc..0x5a) [Type: core::ops::range::Range] - -// cdb-command: g - -// cdb-command: dx o1 -// cdb-check:o1 : Some [Type: enum2$ >] -// cdb-check: [+0x004] __0 : 0x4d2 [Type: [...]] -// cdb-command: dx o2 -// cdb-check:o2 : Some [Type: enum2$ >] -// cdb-check: [+0x008] __0 : 0x162e [Type: unsigned __int64] - -// cdb-command: g - -// cdb-command: dx t1 -// cdb-check:t1 : (0xa, 0x14) [Type: tuple$] -// cdb-check: [0] : 0xa [Type: unsigned int] -// cdb-check: [1] : 0x14 [Type: unsigned int] -// cdb-command: dx t2 -// cdb-check:t2 : (0x1e, 0x28) [Type: tuple$] -// cdb-check: [0] : 0x1e [Type: unsigned __int64] -// cdb-check: [1] : 0x28 [Type: unsigned __int64] - -// cdb-command: g - -// cdb-command: dx s -// cdb-check:s : "this is a static str" [Type: ref$] -// cdb-check: [len] : 0x14 [Type: unsigned [...]] -// cdb-check: [chars] - -// cdb-command: g - -// cdb-command: dx s -// cdb-check:s : { len=0x5 } [Type: ref$ >] -// cdb-check: [len] : 0x5 [Type: unsigned [...]] -// cdb-check: [0] : 0x1 [Type: unsigned char] -// cdb-check: [1] : 0x2 [Type: unsigned char] -// cdb-check: [2] : 0x3 [Type: unsigned char] -// cdb-check: [3] : 0x4 [Type: unsigned char] -// cdb-check: [4] : 0x5 [Type: unsigned char] +//@ cdb-command: g + +//@ cdb-command: dx r1 +//@ cdb-check:r1 : (0xa..0xc) [Type: core::ops::range::Range] +//@ cdb-command: dx r2 +//@ cdb-check:r2 : (0x14..0x1e) [Type: core::ops::range::Range] + +//@ cdb-command: g + +//@ cdb-command: dx r1 +//@ cdb-check:r1 : (0x9..0x64) [Type: core::ops::range::Range] +//@ cdb-command: dx r2 +//@ cdb-check:r2 : (0xc..0x5a) [Type: core::ops::range::Range] + +//@ cdb-command: g + +//@ cdb-command: dx o1 +//@ cdb-check:o1 : Some [Type: enum2$ >] +//@ cdb-check: [+0x004] __0 : 0x4d2 [Type: [...]] +//@ cdb-command: dx o2 +//@ cdb-check:o2 : Some [Type: enum2$ >] +//@ cdb-check: [+0x008] __0 : 0x162e [Type: unsigned __int64] + +//@ cdb-command: g + +//@ cdb-command: dx t1 +//@ cdb-check:t1 : (0xa, 0x14) [Type: tuple$] +//@ cdb-check: [0] : 0xa [Type: unsigned int] +//@ cdb-check: [1] : 0x14 [Type: unsigned int] +//@ cdb-command: dx t2 +//@ cdb-check:t2 : (0x1e, 0x28) [Type: tuple$] +//@ cdb-check: [0] : 0x1e [Type: unsigned __int64] +//@ cdb-check: [1] : 0x28 [Type: unsigned __int64] + +//@ cdb-command: g + +//@ cdb-command: dx s +//@ cdb-check:s : "this is a static str" [Type: ref$] +//@ cdb-check: [len] : 0x14 [Type: unsigned [...]] +//@ cdb-check: [chars] + +//@ cdb-command: g + +//@ cdb-command: dx s +//@ cdb-check:s : { len=0x5 } [Type: ref$ >] +//@ cdb-check: [len] : 0x5 [Type: unsigned [...]] +//@ cdb-check: [0] : 0x1 [Type: unsigned char] +//@ cdb-check: [1] : 0x2 [Type: unsigned char] +//@ cdb-check: [2] : 0x3 [Type: unsigned char] +//@ cdb-check: [3] : 0x4 [Type: unsigned char] +//@ cdb-check: [4] : 0x5 [Type: unsigned char] use std::ops::Range; diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs index e3fa68d776598..35a64928585f4 100644 --- a/tests/debuginfo/multi-cgu.rs +++ b/tests/debuginfo/multi-cgu.rs @@ -7,28 +7,28 @@ // === GDB TESTS =============================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print xxx -// gdb-check:$1 = 12345 -// gdb-command:continue +//@ gdb-command:print xxx +//@ gdb-check:$1 = 12345 +//@ gdb-command:continue -// gdb-command:print yyy -// gdb-check:$2 = 67890 -// gdb-command:continue +//@ gdb-command:print yyy +//@ gdb-check:$2 = 67890 +//@ gdb-command:continue // === LLDB TESTS ============================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v xxx -// lldb-check:[...] 12345 -// lldb-command:continue +//@ lldb-command:v xxx +//@ lldb-check:[...] 12345 +//@ lldb-command:continue -// lldb-command:v yyy -// lldb-check:[...] 67890 -// lldb-command:continue +//@ lldb-command:v yyy +//@ lldb-check:[...] 67890 +//@ lldb-command:continue mod a { diff --git a/tests/debuginfo/multiline-calls.rs b/tests/debuginfo/multiline-calls.rs index 724ad29729fd2..04b7bd5580825 100644 --- a/tests/debuginfo/multiline-calls.rs +++ b/tests/debuginfo/multiline-calls.rs @@ -3,17 +3,17 @@ // === GDB TESTS =================================================================================== -// gdb-command: run -// gdb-check:[...]#break[...] -// gdb-command: up -// gdb-check:[...]zzz[...] +//@ gdb-command: run +//@ gdb-check:[...]#break[...] +//@ gdb-command: up +//@ gdb-check:[...]zzz[...] // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-check:[...]#break[...] -// lldb-command: up -// lldb-check:[...]zzz[...] +//@ lldb-command:run +//@ lldb-check:[...]#break[...] +//@ lldb-command: up +//@ lldb-check:[...]zzz[...] struct Foo; diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs index 9df1fe1b9ca18..143f0013744cd 100644 --- a/tests/debuginfo/multiple-functions-equal-var-names.rs +++ b/tests/debuginfo/multiple-functions-equal-var-names.rs @@ -4,34 +4,34 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print abc -// gdb-check:$1 = 10101 -// gdb-command:continue +//@ gdb-command:print abc +//@ gdb-check:$1 = 10101 +//@ gdb-command:continue -// gdb-command:print abc -// gdb-check:$2 = 20202 -// gdb-command:continue +//@ gdb-command:print abc +//@ gdb-check:$2 = 20202 +//@ gdb-command:continue -// gdb-command:print abc -// gdb-check:$3 = 30303 +//@ gdb-command:print abc +//@ gdb-check:$3 = 30303 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v abc -// lldb-check:[...] 10101 -// lldb-command:continue +//@ lldb-command:v abc +//@ lldb-check:[...] 10101 +//@ lldb-command:continue -// lldb-command:v abc -// lldb-check:[...] 20202 -// lldb-command:continue +//@ lldb-command:v abc +//@ lldb-check:[...] 20202 +//@ lldb-command:continue -// lldb-command:v abc -// lldb-check:[...] 30303 +//@ lldb-command:v abc +//@ lldb-check:[...] 30303 #![allow(unused_variables)] diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs index a5fe01f9dd2c1..28a68663e2650 100644 --- a/tests/debuginfo/multiple-functions.rs +++ b/tests/debuginfo/multiple-functions.rs @@ -4,34 +4,34 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print a -// gdb-check:$1 = 10101 -// gdb-command:continue +//@ gdb-command:print a +//@ gdb-check:$1 = 10101 +//@ gdb-command:continue -// gdb-command:print b -// gdb-check:$2 = 20202 -// gdb-command:continue +//@ gdb-command:print b +//@ gdb-check:$2 = 20202 +//@ gdb-command:continue -// gdb-command:print c -// gdb-check:$3 = 30303 +//@ gdb-command:print c +//@ gdb-check:$3 = 30303 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v a -// lldb-check:[...] 10101 -// lldb-command:continue +//@ lldb-command:v a +//@ lldb-check:[...] 10101 +//@ lldb-command:continue -// lldb-command:v b -// lldb-check:[...] 20202 -// lldb-command:continue +//@ lldb-command:v b +//@ lldb-check:[...] 20202 +//@ lldb-command:continue -// lldb-command:v c -// lldb-check:[...] 30303 +//@ lldb-command:v c +//@ lldb-check:[...] 30303 #![allow(unused_variables)] diff --git a/tests/debuginfo/mutable-locs.rs b/tests/debuginfo/mutable-locs.rs index 5ba4adeca20e8..8e6f9fa130b33 100644 --- a/tests/debuginfo/mutable-locs.rs +++ b/tests/debuginfo/mutable-locs.rs @@ -6,67 +6,67 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command:dx static_c,d -// cdb-check:static_c,d : 10 [Type: core::cell::Cell] -// cdb-check: [] [Type: core::cell::Cell] +//@ cdb-command:dx static_c,d +//@ cdb-check:static_c,d : 10 [Type: core::cell::Cell] +//@ cdb-check: [] [Type: core::cell::Cell] -// cdb-command: dx static_c.value,d -// cdb-check:static_c.value,d : 10 [Type: core::cell::UnsafeCell] -// cdb-check: [] [Type: core::cell::UnsafeCell] +//@ cdb-command: dx static_c.value,d +//@ cdb-check:static_c.value,d : 10 [Type: core::cell::UnsafeCell] +//@ cdb-check: [] [Type: core::cell::UnsafeCell] -// cdb-command: dx dynamic_c,d -// cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] -// cdb-check: [] [Type: core::cell::RefCell] -// cdb-check: [Borrow state] : Unborrowed +//@ cdb-command: dx dynamic_c,d +//@ cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] +//@ cdb-check: [] [Type: core::cell::RefCell] +//@ cdb-check: [Borrow state] : Unborrowed -// cdb-command: dx dynamic_c.value,d -// cdb-check:dynamic_c.value,d : 15 [Type: core::cell::UnsafeCell] -// cdb-check: [] [Type: core::cell::UnsafeCell] +//@ cdb-command: dx dynamic_c.value,d +//@ cdb-check:dynamic_c.value,d : 15 [Type: core::cell::UnsafeCell] +//@ cdb-check: [] [Type: core::cell::UnsafeCell] -// cdb-command: dx b,d -// cdb-check:b,d : 42 [Type: core::cell::RefMut] -// cdb-check: [] [Type: core::cell::RefMut] -// cdb-check: 42 [Type: int] +//@ cdb-command: dx b,d +//@ cdb-check:b,d : 42 [Type: core::cell::RefMut] +//@ cdb-check: [] [Type: core::cell::RefMut] +//@ cdb-check: 42 [Type: int] -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx dynamic_c,d -// cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] -// cdb-check: [] [Type: core::cell::RefCell] -// cdb-check: [Borrow state] : Immutably borrowed +//@ cdb-command: dx dynamic_c,d +//@ cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] +//@ cdb-check: [] [Type: core::cell::RefCell] +//@ cdb-check: [Borrow state] : Immutably borrowed -// cdb-command: dx r_borrow,d -// cdb-check:r_borrow,d : 15 [Type: core::cell::Ref] -// cdb-check: [] [Type: core::cell::Ref] -// cdb-check: 15 [Type: int] +//@ cdb-command: dx r_borrow,d +//@ cdb-check:r_borrow,d : 15 [Type: core::cell::Ref] +//@ cdb-check: [] [Type: core::cell::Ref] +//@ cdb-check: 15 [Type: int] -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx dynamic_c,d -// cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] -// cdb-check: [] [Type: core::cell::RefCell] -// cdb-check: [Borrow state] : Unborrowed +//@ cdb-command: dx dynamic_c,d +//@ cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] +//@ cdb-check: [] [Type: core::cell::RefCell] +//@ cdb-check: [Borrow state] : Unborrowed -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx dynamic_c,d -// cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] -// cdb-check: [] [Type: core::cell::RefCell] -// cdb-check: [Borrow state] : Mutably borrowed +//@ cdb-command: dx dynamic_c,d +//@ cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] +//@ cdb-check: [] [Type: core::cell::RefCell] +//@ cdb-check: [Borrow state] : Mutably borrowed -// cdb-command: dx r_borrow_mut,d -// cdb-check:r_borrow_mut,d : 15 [Type: core::cell::RefMut] -// cdb-check: [] [Type: core::cell::RefMut] -// cdb-check: 15 [Type: int] +//@ cdb-command: dx r_borrow_mut,d +//@ cdb-check:r_borrow_mut,d : 15 [Type: core::cell::RefMut] +//@ cdb-check: [] [Type: core::cell::RefMut] +//@ cdb-check: 15 [Type: int] -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx dynamic_c,d -// cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] -// cdb-check: [] [Type: core::cell::RefCell] -// cdb-check: [Borrow state] : Unborrowed +//@ cdb-command: dx dynamic_c,d +//@ cdb-check:dynamic_c,d : 15 [Type: core::cell::RefCell] +//@ cdb-check: [] [Type: core::cell::RefCell] +//@ cdb-check: [Borrow state] : Unborrowed #![allow(unused_variables)] diff --git a/tests/debuginfo/mutex.rs b/tests/debuginfo/mutex.rs index c47e3ac6dce3f..829ad4a29ad2c 100644 --- a/tests/debuginfo/mutex.rs +++ b/tests/debuginfo/mutex.rs @@ -6,23 +6,23 @@ // === CDB TESTS ================================================================================== // -// cdb-command:g +//@ cdb-command:g // -// cdb-command:dx m,d -// cdb-check:m,d [Type: std::sync::poison::mutex::Mutex] -// cdb-check: [...] inner [Type: std::sys::sync::mutex::futex::Mutex] -// cdb-check: [...] poison [Type: std::sync::poison::Flag] -// cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell] +//@ cdb-command:dx m,d +//@ cdb-check:m,d [Type: std::sync::poison::mutex::Mutex] +//@ cdb-check: [...] inner [Type: std::sys::sync::mutex::futex::Mutex] +//@ cdb-check: [...] poison [Type: std::sync::poison::Flag] +//@ cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell] // -// cdb-command:dx m.data,d -// cdb-check:m.data,d : 0 [Type: core::cell::UnsafeCell] -// cdb-check: [] [Type: core::cell::UnsafeCell] +//@ cdb-command:dx m.data,d +//@ cdb-check:m.data,d : 0 [Type: core::cell::UnsafeCell] +//@ cdb-check: [] [Type: core::cell::UnsafeCell] // -// cdb-command:dx _lock,d -// cdb-check:_lock,d : Ok [Type: enum2$,enum2$ > > > >] -// cdb-check: [...] __0 [Type: std::sync::poison::mutex::MutexGuard] +//@ cdb-command:dx _lock,d +//@ cdb-check:_lock,d : Ok [Type: enum2$,enum2$ > > > >] +//@ cdb-check: [...] __0 [Type: std::sync::poison::mutex::MutexGuard] use std::sync::Mutex; diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs index 9a3393a71e833..45526f1390abb 100644 --- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs @@ -4,84 +4,84 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:print y -// gdb-check:$2 = true -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$3 = 10 -// gdb-command:print y -// gdb-check:$4 = true -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$5 = 10.5 -// gdb-command:print y -// gdb-check:$6 = 20 -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$7 = true -// gdb-command:print y -// gdb-check:$8 = 2220 -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$9 = 203203.5 -// gdb-command:print y -// gdb-check:$10 = 2220 -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$11 = 10.5 -// gdb-command:print y -// gdb-check:$12 = 20 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:print y +//@ gdb-check:$2 = true +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$3 = 10 +//@ gdb-command:print y +//@ gdb-check:$4 = true +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$5 = 10.5 +//@ gdb-command:print y +//@ gdb-check:$6 = 20 +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$7 = true +//@ gdb-command:print y +//@ gdb-check:$8 = 2220 +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$9 = 203203.5 +//@ gdb-command:print y +//@ gdb-check:$10 = 2220 +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$11 = 10.5 +//@ gdb-command:print y +//@ gdb-check:$12 = 20 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] true -// lldb-command:v y -// lldb-check:[...] 2220 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 203203.5 -// lldb-command:v y -// lldb-check:[...] 2220 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] true +//@ lldb-command:v y +//@ lldb-check:[...] 2220 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 203203.5 +//@ lldb-command:v y +//@ lldb-check:[...] 2220 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue fn main() { let x = false; diff --git a/tests/debuginfo/no_mangle-info.rs b/tests/debuginfo/no_mangle-info.rs index d1daef669cee3..eff4b72418edf 100644 --- a/tests/debuginfo/no_mangle-info.rs +++ b/tests/debuginfo/no_mangle-info.rs @@ -3,28 +3,28 @@ //@ ignore-backends: gcc // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:p TEST -// gdb-check:$1 = 3735928559 -// gdb-command:p no_mangle_info::namespace::OTHER_TEST -// gdb-check:$2 = 42 +//@ gdb-command:run +//@ gdb-command:p TEST +//@ gdb-check:$1 = 3735928559 +//@ gdb-command:p no_mangle_info::namespace::OTHER_TEST +//@ gdb-check:$2 = 42 // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v TEST -// lldb-check:(unsigned long) TEST = 3735928559 -// lldb-command:v OTHER_TEST -// lldb-check:(unsigned long) no_mangle_info::namespace::OTHER_TEST::[...] = 42 +//@ lldb-command:run +//@ lldb-command:v TEST +//@ lldb-check:(unsigned long) TEST = 3735928559 +//@ lldb-command:v OTHER_TEST +//@ lldb-check:(unsigned long) no_mangle_info::namespace::OTHER_TEST::[...] = 42 // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g // Note: LLDB and GDB allow referring to items that are in the same namespace of the symbol // we currently have a breakpoint on in an unqualified way. CDB does not, and thus we need to // refer to it in a fully qualified way. -// cdb-command: dx a!no_mangle_info::TEST -// cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64] -// cdb-command: dx a!no_mangle_info::namespace::OTHER_TEST -// cdb-check: a!no_mangle_info::namespace::OTHER_TEST : 0x2a [Type: unsigned __int64] +//@ cdb-command: dx a!no_mangle_info::TEST +//@ cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64] +//@ cdb-command: dx a!no_mangle_info::namespace::OTHER_TEST +//@ cdb-check: a!no_mangle_info::namespace::OTHER_TEST : 0x2a [Type: unsigned __int64] #[no_mangle] pub static TEST: u64 = 0xdeadbeef; diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 9f7ef5c537d22..2154e3c1f387f 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -15,234 +15,234 @@ // `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`. // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx nz_i8 -// cdb-check:nz_i8 : 11 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_i8 +//@ cdb-check:nz_i8 : 11 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_i16 -// cdb-check:nz_i16 : 22 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_i16 +//@ cdb-check:nz_i16 : 22 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_i32 -// cdb-check:nz_i32 : 33 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_i32 +//@ cdb-check:nz_i32 : 33 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_i64 -// cdb-check:nz_i64 : 44 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_i64 +//@ cdb-check:nz_i64 : 44 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] // 128-bit integers don't seem to work in CDB -// cdb-command: dx nz_i128 -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_i128 +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_isize -// cdb-check:nz_isize : 66 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_isize +//@ cdb-check:nz_isize : 66 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_u8 -// cdb-check:nz_u8 : 0x4d [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_u8 +//@ cdb-check:nz_u8 : 0x4d [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_u16 -// cdb-check:nz_u16 : 0x58 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_u16 +//@ cdb-check:nz_u16 : 0x58 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_u32 -// cdb-check:nz_u32 : 0x63 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_u32 +//@ cdb-check:nz_u32 : 0x63 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_u64 -// cdb-check:nz_u64 : 0x64 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_u64 +//@ cdb-check:nz_u64 : 0x64 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_u128 -// cdb-check:nz_u128 : 111 [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_u128 +//@ cdb-check:nz_u128 : 111 [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx nz_usize -// cdb-check:nz_usize : 0x7a [Type: core::num::nonzero::NonZero] -// cdb-check: [] [Type: core::num::nonzero::NonZero] +//@ cdb-command: dx nz_usize +//@ cdb-check:nz_usize : 0x7a [Type: core::num::nonzero::NonZero] +//@ cdb-check: [] [Type: core::num::nonzero::NonZero] -// cdb-command: dx w_i8 -// cdb-check:w_i8 : 10 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 10 [Type: char] +//@ cdb-command: dx w_i8 +//@ cdb-check:w_i8 : 10 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 10 [Type: char] -// cdb-command: dx w_i16 -// cdb-check:w_i16 : 20 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 20 [Type: short] +//@ cdb-command: dx w_i16 +//@ cdb-check:w_i16 : 20 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 20 [Type: short] -// cdb-command: dx w_i32 -// cdb-check:w_i32 : 30 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 30 [Type: int] +//@ cdb-command: dx w_i32 +//@ cdb-check:w_i32 : 30 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 30 [Type: int] -// cdb-command: dx w_i64 -// cdb-check:w_i64 : 40 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 40 [Type: __int64] +//@ cdb-command: dx w_i64 +//@ cdb-check:w_i64 : 40 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 40 [Type: __int64] -// cdb-command: dx w_i128 -// cdb-check:w_i128 : 50 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 50 [Type: i128] +//@ cdb-command: dx w_i128 +//@ cdb-check:w_i128 : 50 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 50 [Type: i128] -// cdb-command: dx w_isize -// cdb-check:w_isize : 60 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 60 [Type: __int64] +//@ cdb-command: dx w_isize +//@ cdb-check:w_isize : 60 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 60 [Type: __int64] -// cdb-command: dx w_u8 -// cdb-check:w_u8 : 0x46 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 0x46 [Type: unsigned char] +//@ cdb-command: dx w_u8 +//@ cdb-check:w_u8 : 0x46 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 0x46 [Type: unsigned char] -// cdb-command: dx w_u16 -// cdb-check:w_u16 : 0x50 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 0x50 [Type: unsigned short] +//@ cdb-command: dx w_u16 +//@ cdb-check:w_u16 : 0x50 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 0x50 [Type: unsigned short] -// cdb-command: dx w_u32 -// cdb-check:w_u32 : 0x5a [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 0x5a [Type: unsigned int] +//@ cdb-command: dx w_u32 +//@ cdb-check:w_u32 : 0x5a [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 0x5a [Type: unsigned int] -// cdb-command: dx w_u64 -// cdb-check:w_u64 : 0x64 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 0x64 [Type: unsigned __int64] +//@ cdb-command: dx w_u64 +//@ cdb-check:w_u64 : 0x64 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 0x64 [Type: unsigned __int64] -// cdb-command: dx w_u128 -// cdb-check:w_u128 : 110 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 110 [Type: u128] +//@ cdb-command: dx w_u128 +//@ cdb-check:w_u128 : 110 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 110 [Type: u128] -// cdb-command: dx w_usize -// cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping] -// cdb-check: [+0x000] __0 : 0x78 [Type: unsigned __int64] +//@ cdb-command: dx w_usize +//@ cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping] +//@ cdb-check: [+0x000] __0 : 0x78 [Type: unsigned __int64] -// cdb-command: dx a_bool_t -// cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool] -// cdb-check: [+0x000] v : 0x1 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_bool_t +//@ cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool] +//@ cdb-check: [+0x000] v : 0x1 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_bool_f -// cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool] -// cdb-check: [+0x000] v : 0x0 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_bool_f +//@ cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool] +//@ cdb-check: [+0x000] v : 0x0 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_i8 -// cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8] -// cdb-check: [+0x000] v : 2 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_i8 +//@ cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8] +//@ cdb-check: [+0x000] v : 2 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_i16 -// cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16] -// cdb-check: [+0x000] v : 4 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_i16 +//@ cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16] +//@ cdb-check: [+0x000] v : 4 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_i32 -// cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32] -// cdb-check: [+0x000] v : 8 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_i32 +//@ cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32] +//@ cdb-check: [+0x000] v : 8 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_i64 -// cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64] -// cdb-check: [+0x000] v : 16 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_i64 +//@ cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64] +//@ cdb-check: [+0x000] v : 16 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_isize -// cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize] -// cdb-check: [+0x000] v : 32 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_isize +//@ cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize] +//@ cdb-check: [+0x000] v : 32 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_u8 -// cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8] -// cdb-check: [+0x000] v : 0x40 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_u8 +//@ cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8] +//@ cdb-check: [+0x000] v : 0x40 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_u16 -// cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16] -// cdb-check: [+0x000] v : 0x80 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_u16 +//@ cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16] +//@ cdb-check: [+0x000] v : 0x80 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_u32 -// cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32] -// cdb-check: [+0x000] v : 0x100 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_u32 +//@ cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32] +//@ cdb-check: [+0x000] v : 0x100 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_u64 -// cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64] -// cdb-check: [+0x000] v : 0x200 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_u64 +//@ cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64] +//@ cdb-check: [+0x000] v : 0x200 [Type: core::cell::UnsafeCell] -// cdb-command: dx a_usize -// cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [+0x000] v : 0x400 [Type: core::cell::UnsafeCell] +//@ cdb-command: dx a_usize +//@ cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [+0x000] v : 0x400 [Type: core::cell::UnsafeCell] // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print/d nz_i8 -// gdb-check:[...]$1 = 11 +//@ gdb-command:print/d nz_i8 +//@ gdb-check:[...]$1 = 11 -// gdb-command:print nz_i16 -// gdb-check:[...]$2 = 22 +//@ gdb-command:print nz_i16 +//@ gdb-check:[...]$2 = 22 -// gdb-command:print nz_i32 -// gdb-check:[...]$3 = 33 +//@ gdb-command:print nz_i32 +//@ gdb-check:[...]$3 = 33 -// gdb-command:print nz_i64 -// gdb-check:[...]$4 = 44 +//@ gdb-command:print nz_i64 +//@ gdb-check:[...]$4 = 44 -// gdb-command:print nz_i128 -// gdb-check:[...]$5 = 55 +//@ gdb-command:print nz_i128 +//@ gdb-check:[...]$5 = 55 -// gdb-command:print nz_isize -// gdb-check:[...]$6 = 66 +//@ gdb-command:print nz_isize +//@ gdb-check:[...]$6 = 66 -// gdb-command:print/d nz_u8 -// gdb-check:[...]$7 = 77 +//@ gdb-command:print/d nz_u8 +//@ gdb-check:[...]$7 = 77 -// gdb-command:print nz_u16 -// gdb-check:[...]$8 = 88 +//@ gdb-command:print nz_u16 +//@ gdb-check:[...]$8 = 88 -// gdb-command:print nz_u32 -// gdb-check:[...]$9 = 99 +//@ gdb-command:print nz_u32 +//@ gdb-check:[...]$9 = 99 -// gdb-command:print nz_u64 -// gdb-check:[...]$10 = 100 +//@ gdb-command:print nz_u64 +//@ gdb-check:[...]$10 = 100 -// gdb-command:print nz_u128 -// gdb-check:[...]$11 = 111 +//@ gdb-command:print nz_u128 +//@ gdb-check:[...]$11 = 111 -// gdb-command:print nz_usize -// gdb-check:[...]$12 = 122 +//@ gdb-command:print nz_usize +//@ gdb-check:[...]$12 = 122 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v/d nz_i8 -// lldb-check:[...] 11 { __0 = { 0 = 11 } } +//@ lldb-command:v/d nz_i8 +//@ lldb-check:[...] 11 { __0 = { 0 = 11 } } -// lldb-command:v nz_i16 -// lldb-check:[...] 22 { __0 = { 0 = 22 } } +//@ lldb-command:v nz_i16 +//@ lldb-check:[...] 22 { __0 = { 0 = 22 } } -// lldb-command:v nz_i32 -// lldb-check:[...] 33 { __0 = { 0 = 33 } } +//@ lldb-command:v nz_i32 +//@ lldb-check:[...] 33 { __0 = { 0 = 33 } } -// lldb-command:v nz_i64 -// lldb-check:[...] 44 { __0 = { 0 = 44 } } +//@ lldb-command:v nz_i64 +//@ lldb-check:[...] 44 { __0 = { 0 = 44 } } -// lldb-command:v nz_i128 -// lldb-check:[...] 55 { __0 = { 0 = 55 } } +//@ lldb-command:v nz_i128 +//@ lldb-check:[...] 55 { __0 = { 0 = 55 } } -// lldb-command:v nz_isize -// lldb-check:[...] 66 { __0 = { 0 = 66 } } +//@ lldb-command:v nz_isize +//@ lldb-check:[...] 66 { __0 = { 0 = 66 } } -// lldb-command:v/d nz_u8 -// lldb-check:[...] 77 { __0 = { 0 = 77 } } +//@ lldb-command:v/d nz_u8 +//@ lldb-check:[...] 77 { __0 = { 0 = 77 } } -// lldb-command:v nz_u16 -// lldb-check:[...] 88 { __0 = { 0 = 88 } } +//@ lldb-command:v nz_u16 +//@ lldb-check:[...] 88 { __0 = { 0 = 88 } } -// lldb-command:v nz_u32 -// lldb-check:[...] 99 { __0 = { 0 = 99 } } +//@ lldb-command:v nz_u32 +//@ lldb-check:[...] 99 { __0 = { 0 = 99 } } -// lldb-command:v nz_u64 -// lldb-check:[...] 100 { __0 = { 0 = 100 } } +//@ lldb-command:v nz_u64 +//@ lldb-check:[...] 100 { __0 = { 0 = 100 } } -// lldb-command:v nz_u128 -// lldb-check:[...] 111 { __0 = { 0 = 111 } } +//@ lldb-command:v nz_u128 +//@ lldb-check:[...] 111 { __0 = { 0 = 111 } } -// lldb-command:v nz_usize -// lldb-check:[...] 122 { __0 = { 0 = 122 } } +//@ lldb-command:v nz_usize +//@ lldb-check:[...] 122 { __0 = { 0 = 122 } } use std::num::*; use std::sync::atomic::*; diff --git a/tests/debuginfo/opt/dead_refs.rs b/tests/debuginfo/opt/dead_refs.rs index 61e741573346e..61c39f4fb7780 100644 --- a/tests/debuginfo/opt/dead_refs.rs +++ b/tests/debuginfo/opt/dead_refs.rs @@ -7,27 +7,27 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print *ref_v0 -// gdb-check:$1 = 0 +//@ gdb-command:run +//@ gdb-command:print *ref_v0 +//@ gdb-check:$1 = 0 -// gdb-command:print *ref_v1 -// gdb-check:$2 = 1 +//@ gdb-command:print *ref_v1 +//@ gdb-check:$2 = 1 -// gdb-command:print *ref_v2 -// gdb-check:$3 = 2 +//@ gdb-command:print *ref_v2 +//@ gdb-check:$3 = 2 // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v *ref_v0 -// lldb-check:[...] 0 +//@ lldb-command:run +//@ lldb-command:v *ref_v0 +//@ lldb-check:[...] 0 -// lldb-command:v *ref_v1 -// lldb-check:[...] 1 +//@ lldb-command:v *ref_v1 +//@ lldb-check:[...] 1 -// lldb-command:v *ref_v2 -// lldb-check:[...] 2 +//@ lldb-command:v *ref_v2 +//@ lldb-check:[...] 2 #![allow(unused_variables)] diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs index 5a55b143fbbd5..1a81dc7ad6e63 100644 --- a/tests/debuginfo/option-like-enum.rs +++ b/tests/debuginfo/option-like-enum.rs @@ -6,68 +6,68 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print some -// gdb-check:$1 = core::option::Option<&u32>::Some(0x[...]) +//@ gdb-command:print some +//@ gdb-check:$1 = core::option::Option<&u32>::Some(0x[...]) -// gdb-command:print none -// gdb-check:$2 = core::option::Option<&u32>::None +//@ gdb-command:print none +//@ gdb-check:$2 = core::option::Option<&u32>::None -// gdb-command:print full -// gdb-check:$3 = option_like_enum::MoreFields::Full(454545, 0x[...], 9988) +//@ gdb-command:print full +//@ gdb-check:$3 = option_like_enum::MoreFields::Full(454545, 0x[...], 9988) -// gdb-command:print empty -// gdb-check:$4 = option_like_enum::MoreFields::Empty +//@ gdb-command:print empty +//@ gdb-check:$4 = option_like_enum::MoreFields::Empty -// gdb-command:print droid -// gdb-check:$5 = option_like_enum::NamedFields::Droid{id: 675675, range: 10000001, internals: 0x[...]} +//@ gdb-command:print droid +//@ gdb-check:$5 = option_like_enum::NamedFields::Droid{id: 675675, range: 10000001, internals: 0x[...]} -// gdb-command:print void_droid -// gdb-check:$6 = option_like_enum::NamedFields::Void +//@ gdb-command:print void_droid +//@ gdb-check:$6 = option_like_enum::NamedFields::Void -// gdb-command:print nested_non_zero_yep -// gdb-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_yep +//@ gdb-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 -// gdb-check:$8 = option_like_enum::NestedNonZero::Nope +//@ gdb-command:print nested_non_zero_nope +//@ gdb-check:$8 = option_like_enum::NestedNonZero::Nope -// gdb-command:continue +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v some -// lldb-check:[...] Some(&0x[...]) +//@ lldb-command:v some +//@ lldb-check:[...] Some(&0x[...]) -// lldb-command:v none -// lldb-check:[...] None +//@ lldb-command:v none +//@ lldb-check:[...] None -// lldb-command:v full -// lldb-check:[...] Full(454545, &0x[...], 9988) +//@ lldb-command:v full +//@ lldb-check:[...] Full(454545, &0x[...], 9988) -// lldb-command:v empty -// lldb-check:[...] Empty +//@ lldb-command:v empty +//@ lldb-check:[...] Empty -// lldb-command:v droid -// lldb-check:[...] Droid { id: 675675, range: 10000001, internals: &0x[...] } +//@ lldb-command:v droid +//@ lldb-check:[...] Droid { id: 675675, range: 10000001, internals: &0x[...] } -// lldb-command:v void_droid -// lldb-check:[...] Void +//@ lldb-command:v void_droid +//@ lldb-check:[...] Void -// lldb-command:v some_str -// lldb-check:[...] Some("abc") +//@ lldb-command:v some_str +//@ lldb-check:[...] Some("abc") -// lldb-command:v none_str -// lldb-check:[...] None +//@ lldb-command:v none_str +//@ lldb-check:[...] None -// lldb-command:v nested_non_zero_yep -// lldb-check:[...] Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] }) +//@ lldb-command:v nested_non_zero_yep +//@ lldb-check:[...] Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] }) -// lldb-command:v nested_non_zero_nope -// lldb-check:[...] Nope +//@ lldb-command:v nested_non_zero_nope +//@ lldb-check:[...] Nope // If a struct has exactly two variants, one of them is empty, and the other one diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs index 2150ec53501c9..ec656f7ae6126 100644 --- a/tests/debuginfo/packed-struct-with-destructor.rs +++ b/tests/debuginfo/packed-struct-with-destructor.rs @@ -4,61 +4,61 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print packed -// gdb-check:$1 = packed_struct_with_destructor::Packed {x: 123, y: 234, z: 345} +//@ gdb-command:print packed +//@ gdb-check:$1 = packed_struct_with_destructor::Packed {x: 123, y: 234, z: 345} -// gdb-command:print packedInPacked -// gdb-check:$2 = packed_struct_with_destructor::PackedInPacked {a: 1111, b: packed_struct_with_destructor::Packed {x: 2222, y: 3333, z: 4444}, c: 5555, d: packed_struct_with_destructor::Packed {x: 6666, y: 7777, z: 8888}} +//@ gdb-command:print packedInPacked +//@ gdb-check:$2 = packed_struct_with_destructor::PackedInPacked {a: 1111, b: packed_struct_with_destructor::Packed {x: 2222, y: 3333, z: 4444}, c: 5555, d: packed_struct_with_destructor::Packed {x: 6666, y: 7777, z: 8888}} -// gdb-command:print packedInUnpacked -// gdb-check:$3 = packed_struct_with_destructor::PackedInUnpacked {a: -1111, b: packed_struct_with_destructor::Packed {x: -2222, y: -3333, z: -4444}, c: -5555, d: packed_struct_with_destructor::Packed {x: -6666, y: -7777, z: -8888}} +//@ gdb-command:print packedInUnpacked +//@ gdb-check:$3 = packed_struct_with_destructor::PackedInUnpacked {a: -1111, b: packed_struct_with_destructor::Packed {x: -2222, y: -3333, z: -4444}, c: -5555, d: packed_struct_with_destructor::Packed {x: -6666, y: -7777, z: -8888}} -// gdb-command:print unpackedInPacked -// gdb-check:$4 = packed_struct_with_destructor::UnpackedInPacked {a: 987, b: packed_struct_with_destructor::Unpacked {x: 876, y: 765, z: 654}, c: packed_struct_with_destructor::Unpacked {x: 543, y: 432, z: 321}, d: 210} +//@ gdb-command:print unpackedInPacked +//@ gdb-check:$4 = packed_struct_with_destructor::UnpackedInPacked {a: 987, b: packed_struct_with_destructor::Unpacked {x: 876, y: 765, z: 654}, c: packed_struct_with_destructor::Unpacked {x: 543, y: 432, z: 321}, d: 210} -// gdb-command:print packedInPackedWithDrop -// gdb-check:$5 = packed_struct_with_destructor::PackedInPackedWithDrop {a: 11, b: packed_struct_with_destructor::Packed {x: 22, y: 33, z: 44}, c: 55, d: packed_struct_with_destructor::Packed {x: 66, y: 77, z: 88}} +//@ gdb-command:print packedInPackedWithDrop +//@ gdb-check:$5 = packed_struct_with_destructor::PackedInPackedWithDrop {a: 11, b: packed_struct_with_destructor::Packed {x: 22, y: 33, z: 44}, c: 55, d: packed_struct_with_destructor::Packed {x: 66, y: 77, z: 88}} -// gdb-command:print packedInUnpackedWithDrop -// gdb-check:$6 = packed_struct_with_destructor::PackedInUnpackedWithDrop {a: -11, b: packed_struct_with_destructor::Packed {x: -22, y: -33, z: -44}, c: -55, d: packed_struct_with_destructor::Packed {x: -66, y: -77, z: -88}} +//@ gdb-command:print packedInUnpackedWithDrop +//@ gdb-check:$6 = packed_struct_with_destructor::PackedInUnpackedWithDrop {a: -11, b: packed_struct_with_destructor::Packed {x: -22, y: -33, z: -44}, c: -55, d: packed_struct_with_destructor::Packed {x: -66, y: -77, z: -88}} -// gdb-command:print unpackedInPackedWithDrop -// gdb-check:$7 = packed_struct_with_destructor::UnpackedInPackedWithDrop {a: 98, b: packed_struct_with_destructor::Unpacked {x: 87, y: 76, z: 65}, c: packed_struct_with_destructor::Unpacked {x: 54, y: 43, z: 32}, d: 21} +//@ gdb-command:print unpackedInPackedWithDrop +//@ gdb-check:$7 = packed_struct_with_destructor::UnpackedInPackedWithDrop {a: 98, b: packed_struct_with_destructor::Unpacked {x: 87, y: 76, z: 65}, c: packed_struct_with_destructor::Unpacked {x: 54, y: 43, z: 32}, d: 21} -// gdb-command:print deeplyNested -// gdb-check:$8 = packed_struct_with_destructor::DeeplyNested {a: packed_struct_with_destructor::PackedInPacked {a: 1, b: packed_struct_with_destructor::Packed {x: 2, y: 3, z: 4}, c: 5, d: packed_struct_with_destructor::Packed {x: 6, y: 7, z: 8}}, b: packed_struct_with_destructor::UnpackedInPackedWithDrop {a: 9, b: packed_struct_with_destructor::Unpacked {x: 10, y: 11, z: 12}, c: packed_struct_with_destructor::Unpacked {x: 13, y: 14, z: 15}, d: 16}, c: packed_struct_with_destructor::PackedInUnpacked {a: 17, b: packed_struct_with_destructor::Packed {x: 18, y: 19, z: 20}, c: 21, d: packed_struct_with_destructor::Packed {x: 22, y: 23, z: 24}}, d: packed_struct_with_destructor::PackedInUnpackedWithDrop {a: 25, b: packed_struct_with_destructor::Packed {x: 26, y: 27, z: 28}, c: 29, d: packed_struct_with_destructor::Packed {x: 30, y: 31, z: 32}}, e: packed_struct_with_destructor::UnpackedInPacked {a: 33, b: packed_struct_with_destructor::Unpacked {x: 34, y: 35, z: 36}, c: packed_struct_with_destructor::Unpacked {x: 37, y: 38, z: 39}, d: 40}, f: packed_struct_with_destructor::PackedInPackedWithDrop {a: 41, b: packed_struct_with_destructor::Packed {x: 42, y: 43, z: 44}, c: 45, d: packed_struct_with_destructor::Packed {x: 46, y: 47, z: 48}}} +//@ gdb-command:print deeplyNested +//@ gdb-check:$8 = packed_struct_with_destructor::DeeplyNested {a: packed_struct_with_destructor::PackedInPacked {a: 1, b: packed_struct_with_destructor::Packed {x: 2, y: 3, z: 4}, c: 5, d: packed_struct_with_destructor::Packed {x: 6, y: 7, z: 8}}, b: packed_struct_with_destructor::UnpackedInPackedWithDrop {a: 9, b: packed_struct_with_destructor::Unpacked {x: 10, y: 11, z: 12}, c: packed_struct_with_destructor::Unpacked {x: 13, y: 14, z: 15}, d: 16}, c: packed_struct_with_destructor::PackedInUnpacked {a: 17, b: packed_struct_with_destructor::Packed {x: 18, y: 19, z: 20}, c: 21, d: packed_struct_with_destructor::Packed {x: 22, y: 23, z: 24}}, d: packed_struct_with_destructor::PackedInUnpackedWithDrop {a: 25, b: packed_struct_with_destructor::Packed {x: 26, y: 27, z: 28}, c: 29, d: packed_struct_with_destructor::Packed {x: 30, y: 31, z: 32}}, e: packed_struct_with_destructor::UnpackedInPacked {a: 33, b: packed_struct_with_destructor::Unpacked {x: 34, y: 35, z: 36}, c: packed_struct_with_destructor::Unpacked {x: 37, y: 38, z: 39}, d: 40}, f: packed_struct_with_destructor::PackedInPackedWithDrop {a: 41, b: packed_struct_with_destructor::Packed {x: 42, y: 43, z: 44}, c: 45, d: packed_struct_with_destructor::Packed {x: 46, y: 47, z: 48}}} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v packed -// lldb-check:[...] { x = 123 y = 234 z = 345 } +//@ lldb-command:v packed +//@ lldb-check:[...] { x = 123 y = 234 z = 345 } -// lldb-command:v packedInPacked -// lldb-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } +//@ lldb-command:v packedInPacked +//@ lldb-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } -// lldb-command:v packedInUnpacked -// lldb-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } +//@ lldb-command:v packedInUnpacked +//@ lldb-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } -// lldb-command:v unpackedInPacked -// lldb-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } +//@ lldb-command:v unpackedInPacked +//@ lldb-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } -// lldb-command:v packedInPackedWithDrop -// lldb-check:[...] { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } +//@ lldb-command:v packedInPackedWithDrop +//@ lldb-check:[...] { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } -// lldb-command:v packedInUnpackedWithDrop -// lldb-check:[...] { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } +//@ lldb-command:v packedInUnpackedWithDrop +//@ lldb-check:[...] { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } -// lldb-command:v unpackedInPackedWithDrop -// lldb-check:[...] { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } +//@ lldb-command:v unpackedInPackedWithDrop +//@ lldb-check:[...] { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } -// lldb-command:v deeplyNested -// lldb-check:[...] { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } +//@ lldb-command:v deeplyNested +//@ lldb-check:[...] { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } #![allow(unused_variables)] diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index 427289c847747..38f846502af44 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -4,48 +4,48 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print packed -// gdb-check:$1 = packed_struct::Packed {x: 123, y: 234, z: 345} +//@ gdb-command:print packed +//@ gdb-check:$1 = packed_struct::Packed {x: 123, y: 234, z: 345} -// gdb-command:print packedInPacked -// gdb-check:$2 = packed_struct::PackedInPacked {a: 1111, b: packed_struct::Packed {x: 2222, y: 3333, z: 4444}, c: 5555, d: packed_struct::Packed {x: 6666, y: 7777, z: 8888}} +//@ gdb-command:print packedInPacked +//@ gdb-check:$2 = packed_struct::PackedInPacked {a: 1111, b: packed_struct::Packed {x: 2222, y: 3333, z: 4444}, c: 5555, d: packed_struct::Packed {x: 6666, y: 7777, z: 8888}} -// gdb-command:print packedInUnpacked -// gdb-check:$3 = packed_struct::PackedInUnpacked {a: -1111, b: packed_struct::Packed {x: -2222, y: -3333, z: -4444}, c: -5555, d: packed_struct::Packed {x: -6666, y: -7777, z: -8888}} +//@ gdb-command:print packedInUnpacked +//@ gdb-check:$3 = packed_struct::PackedInUnpacked {a: -1111, b: packed_struct::Packed {x: -2222, y: -3333, z: -4444}, c: -5555, d: packed_struct::Packed {x: -6666, y: -7777, z: -8888}} -// gdb-command:print unpackedInPacked -// gdb-check:$4 = packed_struct::UnpackedInPacked {a: 987, b: packed_struct::Unpacked {x: 876, y: 765, z: 654, w: 543}, c: packed_struct::Unpacked {x: 432, y: 321, z: 210, w: 109}, d: -98} +//@ gdb-command:print unpackedInPacked +//@ gdb-check:$4 = packed_struct::UnpackedInPacked {a: 987, b: packed_struct::Unpacked {x: 876, y: 765, z: 654, w: 543}, c: packed_struct::Unpacked {x: 432, y: 321, z: 210, w: 109}, d: -98} -// gdb-command:print sizeof(packed) -// gdb-check:$5 = 14 +//@ gdb-command:print sizeof(packed) +//@ gdb-check:$5 = 14 -// gdb-command:print sizeof(packedInPacked) -// gdb-check:$6 = 40 +//@ gdb-command:print sizeof(packedInPacked) +//@ gdb-check:$6 = 40 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v packed -// lldb-check:[...] { x = 123 y = 234 z = 345 } +//@ lldb-command:v packed +//@ lldb-check:[...] { x = 123 y = 234 z = 345 } -// lldb-command:v packedInPacked -// lldb-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } +//@ lldb-command:v packedInPacked +//@ lldb-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } -// lldb-command:v packedInUnpacked -// lldb-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } +//@ lldb-command:v packedInUnpacked +//@ lldb-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } -// lldb-command:v unpackedInPacked -// lldb-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } +//@ lldb-command:v unpackedInPacked +//@ lldb-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } -// lldb-command:expr sizeof(packed) -// lldb-check:[...] 14 +//@ lldb-command:expr sizeof(packed) +//@ lldb-check:[...] 14 -// lldb-command:expr sizeof(packedInPacked) -// lldb-check:[...] 40 +//@ lldb-command:expr sizeof(packedInPacked) +//@ lldb-check:[...] 40 #![allow(unused_variables)] diff --git a/tests/debuginfo/path.rs b/tests/debuginfo/path.rs index 42bbacc3a91a4..27b518fd89751 100644 --- a/tests/debuginfo/path.rs +++ b/tests/debuginfo/path.rs @@ -4,16 +4,16 @@ // === LLDB TESTS ================================================================================= -// lldb-command:run - -// lldb-command:print pathbuf -// lldb-check:[...] "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } } -// lldb-command:po pathbuf -// lldb-check:"/some/path" -// lldb-command:print path -// lldb-check:[...] "/some/path" { data_ptr = [...] length = 10 } -// lldb-command:po path -// lldb-check:"/some/path" +//@ lldb-command:run + +//@ lldb-command:print pathbuf +//@ lldb-check:[...] "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } } +//@ lldb-command:po pathbuf +//@ lldb-check:"/some/path" +//@ lldb-command:print path +//@ lldb-check:[...] "/some/path" { data_ptr = [...] length = 10 } +//@ lldb-command:po path +//@ lldb-check:"/some/path" use std::path::Path; diff --git a/tests/debuginfo/pretty-huge-vec.rs b/tests/debuginfo/pretty-huge-vec.rs index c73491bf28066..2cea3f224c4a1 100644 --- a/tests/debuginfo/pretty-huge-vec.rs +++ b/tests/debuginfo/pretty-huge-vec.rs @@ -6,13 +6,13 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print vec -// gdb-check:$1 = Vec(size=1000000000) = {[...]...} +//@ gdb-command: print vec +//@ gdb-check:$1 = Vec(size=1000000000) = {[...]...} -// gdb-command: print slice -// gdb-check:$2 = &[u8](size=1000000000) = {[...]...} +//@ gdb-command: print slice +//@ gdb-check:$2 = &[u8](size=1000000000) = {[...]...} #![allow(unused_variables)] diff --git a/tests/debuginfo/pretty-slices.rs b/tests/debuginfo/pretty-slices.rs index fd347a4eb933d..e8813e00ae637 100644 --- a/tests/debuginfo/pretty-slices.rs +++ b/tests/debuginfo/pretty-slices.rs @@ -3,33 +3,33 @@ //@ compile-flags:-g //@ ignore-backends: gcc -// gdb-command: run +//@ gdb-command: run -// gdb-command: print slice -// gdb-check: $1 = &[i32](size=3) = {0, 1, 2} +//@ gdb-command: print slice +//@ gdb-check: $1 = &[i32](size=3) = {0, 1, 2} -// gdb-command: print mut_slice -// gdb-check: $2 = &mut [i32](size=4) = {2, 3, 5, 7} +//@ gdb-command: print mut_slice +//@ gdb-check: $2 = &mut [i32](size=4) = {2, 3, 5, 7} -// gdb-command: print str_slice -// gdb-check: $3 = "string slice" +//@ gdb-command: print str_slice +//@ gdb-check: $3 = "string slice" -// gdb-command: print mut_str_slice -// gdb-check: $4 = "mutable string slice" +//@ gdb-command: print mut_str_slice +//@ gdb-check: $4 = "mutable string slice" -// lldb-command:run +//@ lldb-command:run -// lldb-command:v slice -// lldb-check:(&[i32]) slice = size=3 { [0] = 0 [1] = 1 [2] = 2 } +//@ lldb-command:v slice +//@ lldb-check:(&[i32]) slice = size=3 { [0] = 0 [1] = 1 [2] = 2 } -// lldb-command:v mut_slice -// lldb-check:(&mut [i32]) mut_slice = size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } +//@ lldb-command:v mut_slice +//@ lldb-check:(&mut [i32]) mut_slice = size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } -// lldb-command:v str_slice -// lldb-check:(&str) str_slice = "string slice" { [0] = 's' [1] = 't' [2] = 'r' [3] = 'i' [4] = 'n' [5] = 'g' [6] = ' ' [7] = 's' [8] = 'l' [9] = 'i' [10] = 'c' [11] = 'e' } +//@ lldb-command:v str_slice +//@ lldb-check:(&str) str_slice = "string slice" { [0] = 's' [1] = 't' [2] = 'r' [3] = 'i' [4] = 'n' [5] = 'g' [6] = ' ' [7] = 's' [8] = 'l' [9] = 'i' [10] = 'c' [11] = 'e' } -// lldb-command:v mut_str_slice -// lldb-check:(&mut str) mut_str_slice = "mutable string slice" { [0] = 'm' [1] = 'u' [2] = 't' [3] = 'a' [4] = 'b' [5] = 'l' [6] = 'e' [7] = ' ' [8] = 's' [9] = 't' [10] = 'r' [11] = 'i' [12] = 'n' [13] = 'g' [14] = ' ' [15] = 's' [16] = 'l' [17] = 'i' [18] = 'c' [19] = 'e' } +//@ lldb-command:v mut_str_slice +//@ lldb-check:(&mut str) mut_str_slice = "mutable string slice" { [0] = 'm' [1] = 'u' [2] = 't' [3] = 'a' [4] = 'b' [5] = 'l' [6] = 'e' [7] = ' ' [8] = 's' [9] = 't' [10] = 'r' [11] = 'i' [12] = 'n' [13] = 'g' [14] = ' ' [15] = 's' [16] = 'l' [17] = 'i' [18] = 'c' [19] = 'e' } fn b() {} diff --git a/tests/debuginfo/pretty-std-collections-hash.rs b/tests/debuginfo/pretty-std-collections-hash.rs index 2504a60cbcd81..efedb21784af2 100644 --- a/tests/debuginfo/pretty-std-collections-hash.rs +++ b/tests/debuginfo/pretty-std-collections-hash.rs @@ -7,77 +7,77 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx hash_set,d -// cdb-check:hash_set,d [...] : { len=15 } [Type: [...]::HashSet] -// cdb-check: [len] : 15 [Type: [...]] -// cdb-check: [capacity] : [...] -// cdb-check: [[...]] [...] : 0 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 1 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 2 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 3 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 4 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 5 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 6 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 7 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 8 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 9 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 10 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 11 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 12 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 13 [Type: u64] -// cdb-command: dx hash_set,d -// cdb-check: [[...]] [...] : 14 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check:hash_set,d [...] : { len=15 } [Type: [...]::HashSet] +//@ cdb-check: [len] : 15 [Type: [...]] +//@ cdb-check: [capacity] : [...] +//@ cdb-check: [[...]] [...] : 0 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 1 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 2 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 3 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 4 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 5 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 6 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 7 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 8 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 9 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 10 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 11 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 12 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 13 [Type: u64] +//@ cdb-command: dx hash_set,d +//@ cdb-check: [[...]] [...] : 14 [Type: u64] -// cdb-command: dx hash_map,d -// cdb-check:hash_map,d [...] : { len=15 } [Type: [...]::HashMap] -// cdb-check: [len] : 15 [Type: [...]] -// cdb-check: [capacity] : [...] -// cdb-check: ["0x0"] : 0 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x1"] : 1 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x2"] : 2 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x3"] : 3 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x4"] : 4 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x5"] : 5 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x6"] : 6 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x7"] : 7 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x8"] : 8 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0x9"] : 9 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0xa"] : 10 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0xb"] : 11 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0xc"] : 12 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0xd"] : 13 [Type: unsigned __int64] -// cdb-command: dx hash_map,d -// cdb-check: ["0xe"] : 14 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check:hash_map,d [...] : { len=15 } [Type: [...]::HashMap] +//@ cdb-check: [len] : 15 [Type: [...]] +//@ cdb-check: [capacity] : [...] +//@ cdb-check: ["0x0"] : 0 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x1"] : 1 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x2"] : 2 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x3"] : 3 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x4"] : 4 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x5"] : 5 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x6"] : 6 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x7"] : 7 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x8"] : 8 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0x9"] : 9 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0xa"] : 10 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0xb"] : 11 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0xc"] : 12 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0xd"] : 13 [Type: unsigned __int64] +//@ cdb-command: dx hash_map,d +//@ cdb-check: ["0xe"] : 14 [Type: unsigned __int64] -// cdb-command: dx x +//@ cdb-command: dx x #![allow(unused_variables)] use std::collections::HashSet; diff --git a/tests/debuginfo/pretty-std-collections.rs b/tests/debuginfo/pretty-std-collections.rs index 568ca0fd23039..4da54f36cc91d 100644 --- a/tests/debuginfo/pretty-std-collections.rs +++ b/tests/debuginfo/pretty-std-collections.rs @@ -5,64 +5,64 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print btree_set -// gdb-check:$1 = BTreeSet(size=15) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} +//@ gdb-command: print btree_set +//@ gdb-check:$1 = BTreeSet(size=15) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} -// gdb-command: print empty_btree_set -// gdb-check:$2 = BTreeSet(size=0) +//@ gdb-command: print empty_btree_set +//@ gdb-check:$2 = BTreeSet(size=0) -// gdb-command: print btree_map -// gdb-check:$3 = BTreeMap(size=15) = {[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9, [10] = 10, [11] = 11, [12] = 12, [13] = 13, [14] = 14} +//@ gdb-command: print btree_map +//@ gdb-check:$3 = BTreeMap(size=15) = {[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9, [10] = 10, [11] = 11, [12] = 12, [13] = 13, [14] = 14} -// gdb-command: print empty_btree_map -// gdb-check:$4 = BTreeMap(size=0) +//@ gdb-command: print empty_btree_map +//@ gdb-check:$4 = BTreeMap(size=0) -// gdb-command: print option_btree_map -// gdb-check:$5 = BTreeMap(size=2) = {[false] = [...], [true] = [...]} +//@ gdb-command: print option_btree_map +//@ gdb-check:$5 = BTreeMap(size=2) = {[false] = [...], [true] = [...]} // (abbreviated because both values vary wildly over gdb versions and/or linux distributions) -// gdb-command: print nasty_btree_map -// gdb-check:$6 = BTreeMap(size=15) = {[0] = pretty_std_collections::MyLeafNode (0), [...]} +//@ gdb-command: print nasty_btree_map +//@ gdb-check:$6 = BTreeMap(size=15) = {[0] = pretty_std_collections::MyLeafNode (0), [...]} // (abbreviated because it's boring but we need enough elements to include internal nodes) -// gdb-command: print zst_key_btree_map -// gdb-check:$7 = BTreeMap(size=1) = {[()] = 1} +//@ gdb-command: print zst_key_btree_map +//@ gdb-check:$7 = BTreeMap(size=1) = {[()] = 1} -// gdb-command: print zst_val_btree_map -// gdb-check:$8 = BTreeMap(size=1) = {[1] = ()} +//@ gdb-command: print zst_val_btree_map +//@ gdb-check:$8 = BTreeMap(size=1) = {[1] = ()} -// gdb-command: print zst_key_val_btree_map -// gdb-check:$9 = BTreeMap(size=1) = {[()] = ()} +//@ gdb-command: print zst_key_val_btree_map +//@ gdb-check:$9 = BTreeMap(size=1) = {[()] = ()} -// gdb-command: print vec_deque -// gdb-check:$10 = VecDeque(size=3) = {5, 3, 7} +//@ gdb-command: print vec_deque +//@ gdb-check:$10 = VecDeque(size=3) = {5, 3, 7} -// gdb-command: print vec_deque2 -// gdb-check:$11 = VecDeque(size=7) = {2, 3, 4, 5, 6, 7, 8} +//@ gdb-command: print vec_deque2 +//@ gdb-check:$11 = VecDeque(size=7) = {2, 3, 4, 5, 6, 7, 8} -// gdb-command: print hash_map -// gdb-check:$12 = HashMap(size=4) = {[1] = 10, [2] = 20, [3] = 30, [4] = 40} +//@ gdb-command: print hash_map +//@ gdb-check:$12 = HashMap(size=4) = {[1] = 10, [2] = 20, [3] = 30, [4] = 40} -// gdb-command: print hash_set -// gdb-check:$13 = HashSet(size=4) = {1, 2, 3, 4} +//@ gdb-command: print hash_set +//@ gdb-check:$13 = HashSet(size=4) = {1, 2, 3, 4} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v vec_deque -// lldb-check:[...] size=3 { [0] = 5 [1] = 3 [2] = 7 } +//@ lldb-command:v vec_deque +//@ lldb-check:[...] size=3 { [0] = 5 [1] = 3 [2] = 7 } -// lldb-command:v vec_deque2 -// lldb-check:[...] size=7 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } +//@ lldb-command:v vec_deque2 +//@ lldb-check:[...] size=7 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } -// lldb-command:v hash_map -// lldb-check:[...] size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } +//@ lldb-command:v hash_map +//@ lldb-check:[...] size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } -// lldb-command:v hash_set -// lldb-check:[...] size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } +//@ lldb-command:v hash_set +//@ lldb-check:[...] size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } #![allow(unused_variables)] use std::collections::BTreeMap; diff --git a/tests/debuginfo/pretty-std.rs b/tests/debuginfo/pretty-std.rs index 2620557eaf991..d4cb2f6625f4b 100644 --- a/tests/debuginfo/pretty-std.rs +++ b/tests/debuginfo/pretty-std.rs @@ -8,140 +8,140 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print slice -// gdb-check:$1 = &[i32](size=4) = {0, 1, 2, 3} +//@ gdb-command: print slice +//@ gdb-check:$1 = &[i32](size=4) = {0, 1, 2, 3} -// gdb-command: print vec -// gdb-check:$2 = Vec(size=4) = {4, 5, 6, 7} +//@ gdb-command: print vec +//@ gdb-check:$2 = Vec(size=4) = {4, 5, 6, 7} -// gdb-command: print str_slice -// gdb-check:$3 = "IAMA string slice!" +//@ gdb-command: print str_slice +//@ gdb-check:$3 = "IAMA string slice!" -// gdb-command: print string -// gdb-check:$4 = "IAMA string!" +//@ gdb-command: print string +//@ gdb-check:$4 = "IAMA string!" -// gdb-command: print some -// gdb-check:$5 = core::option::Option::Some(8) +//@ gdb-command: print some +//@ gdb-check:$5 = core::option::Option::Some(8) -// gdb-command: print none -// gdb-check:$6 = core::option::Option::None +//@ gdb-command: print none +//@ gdb-check:$6 = core::option::Option::None -// gdb-command: print os_string -// gdb-check:$7 = "IAMA OS string 😃" +//@ gdb-command: print os_string +//@ gdb-check:$7 = "IAMA OS string 😃" -// gdb-command: print some_string -// gdb-check:$8 = core::option::Option::Some("IAMA optional string!") +//@ gdb-command: print some_string +//@ gdb-check:$8 = core::option::Option::Some("IAMA optional string!") -// gdb-command: set print elements 5 -// gdb-command: print some_string -// gdb-check:$9 = core::option::Option::Some("IAMA "...) +//@ gdb-command: set print elements 5 +//@ gdb-command: print some_string +//@ gdb-check:$9 = core::option::Option::Some("IAMA "...) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v slice -// lldb-check:[...] slice = size=4 { [0] = 0 [1] = 1 [2] = 2 [3] = 3 } +//@ lldb-command:v slice +//@ lldb-check:[...] slice = size=4 { [0] = 0 [1] = 1 [2] = 2 [3] = 3 } -// lldb-command:v vec -// lldb-check:[...] vec = size=4 { [0] = 4 [1] = 5 [2] = 6 [3] = 7 } +//@ lldb-command:v vec +//@ lldb-check:[...] vec = size=4 { [0] = 4 [1] = 5 [2] = 6 [3] = 7 } -// lldb-command:v str_slice -// lldb-check:[...] str_slice = "IAMA string slice!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = ' ' [12] = 's' [13] = 'l' [14] = 'i' [15] = 'c' [16] = 'e' [17] = '!' } +//@ lldb-command:v str_slice +//@ lldb-check:[...] str_slice = "IAMA string slice!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = ' ' [12] = 's' [13] = 'l' [14] = 'i' [15] = 'c' [16] = 'e' [17] = '!' } -// lldb-command:v string -// lldb-check:[...] string = "IAMA string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = '!' } +//@ lldb-command:v string +//@ lldb-check:[...] string = "IAMA string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = '!' } -// lldb-command:v some -// lldb-check:[...] some = Some(8) +//@ lldb-command:v some +//@ lldb-check:[...] some = Some(8) -// lldb-command:v none -// lldb-check:[...] none = None +//@ lldb-command:v none +//@ lldb-check:[...] none = None -// lldb-command:v os_string -// lldb-check:[...] os_string = "IAMA OS string 😃" { inner = { inner = size=19 { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'O' [6] = 'S' [7] = ' ' [8] = 's' [9] = 't' [10] = 'r' [11] = 'i' [12] = 'n' [13] = 'g' [14] = ' ' [15] = '\xf0' [16] = '\x9f' [17] = '\x98' [18] = '\x83' } } } +//@ lldb-command:v os_string +//@ lldb-check:[...] os_string = "IAMA OS string 😃" { inner = { inner = size=19 { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'O' [6] = 'S' [7] = ' ' [8] = 's' [9] = 't' [10] = 'r' [11] = 'i' [12] = 'n' [13] = 'g' [14] = ' ' [15] = '\xf0' [16] = '\x9f' [17] = '\x98' [18] = '\x83' } } } // === CDB TESTS ================================================================================== -// cdb-command: g - -// cdb-command: dx slice,d -// cdb-check:slice,d : { len=4 } [Type: ref$ >] -// cdb-check: [len] : 4 [Type: [...]] -// cdb-check: [0] : 0 [Type: int] -// cdb-check: [1] : 1 [Type: int] -// cdb-check: [2] : 2 [Type: int] -// cdb-check: [3] : 3 [Type: int] - -// cdb-command: dx vec,d -// cdb-check:vec,d [...] : { len=4 } [Type: [...]::Vec] -// cdb-check: [len] : 4 [Type: [...]] -// cdb-check: [capacity] : [...] [Type: [...]] -// cdb-check: [0] : 4 [Type: u64] -// cdb-check: [1] : 5 [Type: u64] -// cdb-check: [2] : 6 [Type: u64] -// cdb-check: [3] : 7 [Type: u64] - -// cdb-command: dx str_slice -// cdb-check:str_slice : "IAMA string slice!" [Type: ref$] - -// cdb-command: dx string -// cdb-check:string : "IAMA string!" [Type: [...]::String] -// cdb-check: [] [Type: [...]::String] -// cdb-check: [len] : 0xc [Type: [...]] -// cdb-check: [capacity] : 0xc [Type: [...]] - -// cdb-command: dx -r2 string -// cdb-check: [0] : 73 'I' [Type: char] -// cdb-check: [1] : 65 'A' [Type: char] -// cdb-check: [2] : 77 'M' [Type: char] -// cdb-check: [3] : 65 'A' [Type: char] -// cdb-check: [4] : 32 ' ' [Type: char] -// cdb-check: [5] : 115 's' [Type: char] -// cdb-check: [6] : 116 't' [Type: char] -// cdb-check: [7] : 114 'r' [Type: char] -// cdb-check: [8] : 105 'i' [Type: char] -// cdb-check: [9] : 110 'n' [Type: char] -// cdb-check: [10] : 103 'g' [Type: char] -// cdb-check: [11] : 33 '!' [Type: char] - -// cdb-command: dx os_string +//@ cdb-command: g + +//@ cdb-command: dx slice,d +//@ cdb-check:slice,d : { len=4 } [Type: ref$ >] +//@ cdb-check: [len] : 4 [Type: [...]] +//@ cdb-check: [0] : 0 [Type: int] +//@ cdb-check: [1] : 1 [Type: int] +//@ cdb-check: [2] : 2 [Type: int] +//@ cdb-check: [3] : 3 [Type: int] + +//@ cdb-command: dx vec,d +//@ cdb-check:vec,d [...] : { len=4 } [Type: [...]::Vec] +//@ cdb-check: [len] : 4 [Type: [...]] +//@ cdb-check: [capacity] : [...] [Type: [...]] +//@ cdb-check: [0] : 4 [Type: u64] +//@ cdb-check: [1] : 5 [Type: u64] +//@ cdb-check: [2] : 6 [Type: u64] +//@ cdb-check: [3] : 7 [Type: u64] + +//@ cdb-command: dx str_slice +//@ cdb-check:str_slice : "IAMA string slice!" [Type: ref$] + +//@ cdb-command: dx string +//@ cdb-check:string : "IAMA string!" [Type: [...]::String] +//@ cdb-check: [] [Type: [...]::String] +//@ cdb-check: [len] : 0xc [Type: [...]] +//@ cdb-check: [capacity] : 0xc [Type: [...]] + +//@ cdb-command: dx -r2 string +//@ cdb-check: [0] : 73 'I' [Type: char] +//@ cdb-check: [1] : 65 'A' [Type: char] +//@ cdb-check: [2] : 77 'M' [Type: char] +//@ cdb-check: [3] : 65 'A' [Type: char] +//@ cdb-check: [4] : 32 ' ' [Type: char] +//@ cdb-check: [5] : 115 's' [Type: char] +//@ cdb-check: [6] : 116 't' [Type: char] +//@ cdb-check: [7] : 114 'r' [Type: char] +//@ cdb-check: [8] : 105 'i' [Type: char] +//@ cdb-check: [9] : 110 'n' [Type: char] +//@ cdb-check: [10] : 103 'g' [Type: char] +//@ cdb-check: [11] : 33 '!' [Type: char] + +//@ cdb-command: dx os_string // NOTE: OSString is WTF-8 encoded which Windows debuggers don't understand. Verify the UTF-8 // portion displays correctly. -// cdb-check:os_string : "IAMA OS string [...]" [Type: std::ffi::os_str::OsString] -// cdb-check: [] [Type: std::ffi::os_str::OsString] -// cdb-check: [chars] : "IAMA OS string [...]" - -// cdb-command: dx some -// cdb-check:some : Some [Type: enum2$ >] -// cdb-check: [] [Type: enum2$ >] -// cdb-check: [+0x002] __0 : 8 [Type: short] - -// cdb-command: dx none -// cdb-check:none : None [Type: enum2$ >] -// cdb-check: [] [Type: enum2$ >] - -// cdb-command: dx some_string -// cdb-check:some_string : Some [Type: enum2$ >] -// cdb-check: [] [Type: enum2$ >] -// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String] - -// cdb-command: dx linkedlist -// cdb-check:linkedlist : { len=0x2 } [Type: alloc::collections::linked_list::LinkedList] -// cdb-check: [] [Type: alloc::collections::linked_list::LinkedList] -// cdb-check: [0x0] : 128 [Type: int] -// cdb-check: [0x1] : 42 [Type: int] - -// cdb-command: dx vecdeque -// cdb-check:vecdeque : { len=0x2 } [Type: alloc::collections::vec_deque::VecDeque] -// cdb-check: [] [Type: alloc::collections::vec_deque::VecDeque] -// cdb-check: [len] : 0x2 [Type: unsigned [...]] -// cdb-check: [capacity] : 0x8 [Type: unsigned [...]] -// cdb-check: [0x0] : 90 [Type: i32] -// cdb-check: [0x1] : 20 [Type: i32] +//@ cdb-check:os_string : "IAMA OS string [...]" [Type: std::ffi::os_str::OsString] +//@ cdb-check: [] [Type: std::ffi::os_str::OsString] +//@ cdb-check: [chars] : "IAMA OS string [...]" + +//@ cdb-command: dx some +//@ cdb-check:some : Some [Type: enum2$ >] +//@ cdb-check: [] [Type: enum2$ >] +//@ cdb-check: [+0x002] __0 : 8 [Type: short] + +//@ cdb-command: dx none +//@ cdb-check:none : None [Type: enum2$ >] +//@ cdb-check: [] [Type: enum2$ >] + +//@ cdb-command: dx some_string +//@ cdb-check:some_string : Some [Type: enum2$ >] +//@ cdb-check: [] [Type: enum2$ >] +//@ cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String] + +//@ cdb-command: dx linkedlist +//@ cdb-check:linkedlist : { len=0x2 } [Type: alloc::collections::linked_list::LinkedList] +//@ cdb-check: [] [Type: alloc::collections::linked_list::LinkedList] +//@ cdb-check: [0x0] : 128 [Type: int] +//@ cdb-check: [0x1] : 42 [Type: int] + +//@ cdb-command: dx vecdeque +//@ cdb-check:vecdeque : { len=0x2 } [Type: alloc::collections::vec_deque::VecDeque] +//@ cdb-check: [] [Type: alloc::collections::vec_deque::VecDeque] +//@ cdb-check: [len] : 0x2 [Type: unsigned [...]] +//@ cdb-check: [capacity] : 0x8 [Type: unsigned [...]] +//@ cdb-check: [0x0] : 90 [Type: i32] +//@ cdb-check: [0x1] : 20 [Type: i32] #![allow(unused_variables)] use std::collections::{LinkedList, VecDeque}; diff --git a/tests/debuginfo/pretty-uninitialized-vec.rs b/tests/debuginfo/pretty-uninitialized-vec.rs index e5a2df5c9345d..f3e02fa06f9f0 100644 --- a/tests/debuginfo/pretty-uninitialized-vec.rs +++ b/tests/debuginfo/pretty-uninitialized-vec.rs @@ -5,10 +5,10 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print vec -// gdb-check:$1 = Vec(size=[...])[...] +//@ gdb-command: print vec +//@ gdb-check:$1 = Vec(size=[...])[...] #![allow(unused_variables)] diff --git a/tests/debuginfo/range-types.rs b/tests/debuginfo/range-types.rs index 068a55a576725..f54773f7987f3 100644 --- a/tests/debuginfo/range-types.rs +++ b/tests/debuginfo/range-types.rs @@ -9,33 +9,33 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx r1,d -// cdb-check:r1,d : (3..5) [Type: core::ops::range::Range] -// cdb-check: [+0x000] start : 3 [Type: int] -// cdb-check: [+0x004] end : 5 [Type: int] +//@ cdb-command: dx r1,d +//@ cdb-check:r1,d : (3..5) [Type: core::ops::range::Range] +//@ cdb-check: [+0x000] start : 3 [Type: int] +//@ cdb-check: [+0x004] end : 5 [Type: int] -// cdb-command: dx r2,d -// cdb-check:r2,d : (2..) [Type: core::ops::range::RangeFrom] -// cdb-check: [+0x000] start : 2 [Type: int] +//@ cdb-command: dx r2,d +//@ cdb-check:r2,d : (2..) [Type: core::ops::range::RangeFrom] +//@ cdb-check: [+0x000] start : 2 [Type: int] -// cdb-command: dx r3,d -// cdb-check:r3,d : (1..=4) [Type: core::ops::range::RangeInclusive] -// cdb-check: [+0x000] start : 1 [Type: int] -// cdb-check: [+0x004] end : 4 [Type: int] -// cdb-check: [+0x008] exhausted : false [Type: bool] +//@ cdb-command: dx r3,d +//@ cdb-check:r3,d : (1..=4) [Type: core::ops::range::RangeInclusive] +//@ cdb-check: [+0x000] start : 1 [Type: int] +//@ cdb-check: [+0x004] end : 4 [Type: int] +//@ cdb-check: [+0x008] exhausted : false [Type: bool] -// cdb-command: dx r4,d -// cdb-check:r4,d : (..10) [Type: core::ops::range::RangeTo] -// cdb-check: [+0x000] end : 10 [Type: int] +//@ cdb-command: dx r4,d +//@ cdb-check:r4,d : (..10) [Type: core::ops::range::RangeTo] +//@ cdb-check: [+0x000] end : 10 [Type: int] -// cdb-command: dx r5,d -// cdb-check:r5,d : (..=3) [Type: core::ops::range::RangeToInclusive] -// cdb-check: [+0x000] end : 3 [Type: int] +//@ cdb-command: dx r5,d +//@ cdb-check:r5,d : (..=3) [Type: core::ops::range::RangeToInclusive] +//@ cdb-check: [+0x000] end : 3 [Type: int] -// cdb-command: dx r6,d -// cdb-check:r6,d [Type: core::ops::range::RangeFull] +//@ cdb-command: dx r6,d +//@ cdb-check:r6,d [Type: core::ops::range::RangeFull] #[allow(unused_variables)] diff --git a/tests/debuginfo/rc_arc.rs b/tests/debuginfo/rc_arc.rs index c439ff7484fe3..a2eeeaad6aa8b 100644 --- a/tests/debuginfo/rc_arc.rs +++ b/tests/debuginfo/rc_arc.rs @@ -6,101 +6,101 @@ // === GDB TESTS ================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print rc -// gdb-check:[...]$1 = Rc(strong=11, weak=1) = {value = 111, strong = 11, weak = 1} -// gdb-command:print arc -// gdb-check:[...]$2 = Arc(strong=21, weak=1) = {value = 222, strong = 21, weak = 1} +//@ gdb-command:print rc +//@ gdb-check:[...]$1 = Rc(strong=11, weak=1) = {value = 111, strong = 11, weak = 1} +//@ gdb-command:print arc +//@ gdb-check:[...]$2 = Arc(strong=21, weak=1) = {value = 222, strong = 21, weak = 1} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v rc -// lldb-check:[...] strong=11, weak=1 { value = 111 } -// lldb-command:v arc -// lldb-check:[...] strong=21, weak=1 { data = 222 } +//@ lldb-command:v rc +//@ lldb-check:[...] strong=11, weak=1 { value = 111 } +//@ lldb-command:v arc +//@ lldb-check:[...] strong=21, weak=1 { data = 222 } // === CDB TESTS ================================================================================== -// cdb-command:g - -// cdb-command:dx rc,d -// cdb-check:rc,d : 111 [Type: alloc::rc::Rc] -// cdb-check: [Reference count] : 11 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] - -// cdb-command:dx weak_rc,d -// cdb-check:weak_rc,d : 111 [Type: alloc::rc::Weak] -// cdb-check: [Reference count] : 11 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] - -// cdb-command:dx arc,d -// cdb-check:arc,d : 222 [Type: alloc::sync::Arc] -// cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] - -// cdb-command:dx weak_arc,d -// cdb-check:weak_arc,d : 222 [Type: alloc::sync::Weak] -// cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] - -// cdb-command:dx dyn_rc,d -// cdb-check:dyn_rc,d [Type: alloc::rc::Rc,alloc::alloc::Global>] -// cdb-check: [Reference count] : 31 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] - -// cdb-command:dx dyn_rc_weak,d -// cdb-check:dyn_rc_weak,d [Type: alloc::rc::Weak,alloc::alloc::Global>] -// cdb-check: [Reference count] : 31 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] - -// cdb-command:dx slice_rc,d -// cdb-check:slice_rc,d : { len=3 } [Type: alloc::rc::Rc,alloc::alloc::Global>] -// cdb-check: [Length] : 3 [Type: [...]] -// cdb-check: [Reference count] : 41 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] -// cdb-check: [0] : 1 [Type: u32] -// cdb-check: [1] : 2 [Type: u32] -// cdb-check: [2] : 3 [Type: u32] - -// cdb-command:dx slice_rc_weak,d -// cdb-check:slice_rc_weak,d : { len=3 } [Type: alloc::rc::Weak,alloc::alloc::Global>] -// cdb-check: [Length] : 3 [Type: [...]] -// cdb-check: [Reference count] : 41 [Type: core::cell::Cell] -// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] -// cdb-check: [0] : 1 [Type: u32] -// cdb-check: [1] : 2 [Type: u32] -// cdb-check: [2] : 3 [Type: u32] - -// cdb-command:dx dyn_arc,d -// cdb-check:dyn_arc,d [Type: alloc::sync::Arc,alloc::alloc::Global>] -// cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] - -// cdb-command:dx dyn_arc_weak,d -// cdb-check:dyn_arc_weak,d [Type: alloc::sync::Weak,alloc::alloc::Global>] -// cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] - -// cdb-command:dx slice_arc,d -// cdb-check:slice_arc,d : { len=3 } [Type: alloc::sync::Arc,alloc::alloc::Global>] -// cdb-check: [Length] : 3 [Type: [...]] -// cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [0] : 4 [Type: u32] -// cdb-check: [1] : 5 [Type: u32] -// cdb-check: [2] : 6 [Type: u32] - -// cdb-command:dx slice_arc_weak,d -// cdb-check:slice_arc_weak,d : { len=3 } [Type: alloc::sync::Weak,alloc::alloc::Global>] -// cdb-check: [Length] : 3 [Type: [...]] -// cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [0] : 4 [Type: u32] -// cdb-check: [1] : 5 [Type: u32] -// cdb-check: [2] : 6 [Type: u32] +//@ cdb-command:g + +//@ cdb-command:dx rc,d +//@ cdb-check:rc,d : 111 [Type: alloc::rc::Rc] +//@ cdb-check: [Reference count] : 11 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] + +//@ cdb-command:dx weak_rc,d +//@ cdb-check:weak_rc,d : 111 [Type: alloc::rc::Weak] +//@ cdb-check: [Reference count] : 11 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] + +//@ cdb-command:dx arc,d +//@ cdb-check:arc,d : 222 [Type: alloc::sync::Arc] +//@ cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] + +//@ cdb-command:dx weak_arc,d +//@ cdb-check:weak_arc,d : 222 [Type: alloc::sync::Weak] +//@ cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] + +//@ cdb-command:dx dyn_rc,d +//@ cdb-check:dyn_rc,d [Type: alloc::rc::Rc,alloc::alloc::Global>] +//@ cdb-check: [Reference count] : 31 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] + +//@ cdb-command:dx dyn_rc_weak,d +//@ cdb-check:dyn_rc_weak,d [Type: alloc::rc::Weak,alloc::alloc::Global>] +//@ cdb-check: [Reference count] : 31 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] + +//@ cdb-command:dx slice_rc,d +//@ cdb-check:slice_rc,d : { len=3 } [Type: alloc::rc::Rc,alloc::alloc::Global>] +//@ cdb-check: [Length] : 3 [Type: [...]] +//@ cdb-check: [Reference count] : 41 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] +//@ cdb-check: [0] : 1 [Type: u32] +//@ cdb-check: [1] : 2 [Type: u32] +//@ cdb-check: [2] : 3 [Type: u32] + +//@ cdb-command:dx slice_rc_weak,d +//@ cdb-check:slice_rc_weak,d : { len=3 } [Type: alloc::rc::Weak,alloc::alloc::Global>] +//@ cdb-check: [Length] : 3 [Type: [...]] +//@ cdb-check: [Reference count] : 41 [Type: core::cell::Cell] +//@ cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell] +//@ cdb-check: [0] : 1 [Type: u32] +//@ cdb-check: [1] : 2 [Type: u32] +//@ cdb-check: [2] : 3 [Type: u32] + +//@ cdb-command:dx dyn_arc,d +//@ cdb-check:dyn_arc,d [Type: alloc::sync::Arc,alloc::alloc::Global>] +//@ cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] + +//@ cdb-command:dx dyn_arc_weak,d +//@ cdb-check:dyn_arc_weak,d [Type: alloc::sync::Weak,alloc::alloc::Global>] +//@ cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] + +//@ cdb-command:dx slice_arc,d +//@ cdb-check:slice_arc,d : { len=3 } [Type: alloc::sync::Arc,alloc::alloc::Global>] +//@ cdb-check: [Length] : 3 [Type: [...]] +//@ cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [0] : 4 [Type: u32] +//@ cdb-check: [1] : 5 [Type: u32] +//@ cdb-check: [2] : 6 [Type: u32] + +//@ cdb-command:dx slice_arc_weak,d +//@ cdb-check:slice_arc_weak,d : { len=3 } [Type: alloc::sync::Weak,alloc::alloc::Global>] +//@ cdb-check: [Length] : 3 [Type: [...]] +//@ cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize] +//@ cdb-check: [0] : 4 [Type: u32] +//@ cdb-check: [1] : 5 [Type: u32] +//@ cdb-check: [2] : 6 [Type: u32] use std::fmt::Debug; use std::rc::Rc; diff --git a/tests/debuginfo/recursive-enum.rs b/tests/debuginfo/recursive-enum.rs index 5fb339f54f396..bb139cb8541b3 100644 --- a/tests/debuginfo/recursive-enum.rs +++ b/tests/debuginfo/recursive-enum.rs @@ -2,7 +2,7 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers -// gdb-command:run +//@ gdb-command:run // Test whether compiling a recursive enum definition crashes debug info generation. The test case // is taken from issue #11083 and #135093. diff --git a/tests/debuginfo/recursive-struct.rs b/tests/debuginfo/recursive-struct.rs index 723ab06a8b26b..a01c6c0ceca57 100644 --- a/tests/debuginfo/recursive-struct.rs +++ b/tests/debuginfo/recursive-struct.rs @@ -4,60 +4,60 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run +//@ gdb-command:run -// gdb-command:print stack_unique.value -// gdb-check:$1 = 0 -// gdb-command:print stack_unique.next.val.value -// gdb-check:$2 = 1 +//@ gdb-command:print stack_unique.value +//@ gdb-check:$1 = 0 +//@ gdb-command:print stack_unique.next.val.value +//@ gdb-check:$2 = 1 -// gdb-command:print unique_unique.value -// gdb-check:$3 = 2 -// gdb-command:print unique_unique.next.val.value -// gdb-check:$4 = 3 +//@ gdb-command:print unique_unique.value +//@ gdb-check:$3 = 2 +//@ gdb-command:print unique_unique.next.val.value +//@ gdb-check:$4 = 3 -// gdb-command:print vec_unique[0].value -// gdb-check:$5 = 6.5 -// gdb-command:print vec_unique[0].next.val.value -// gdb-check:$6 = 7.5 +//@ gdb-command:print vec_unique[0].value +//@ gdb-check:$5 = 6.5 +//@ gdb-command:print vec_unique[0].next.val.value +//@ gdb-check:$6 = 7.5 -// gdb-command:print borrowed_unique.value -// gdb-check:$7 = 8.5 -// gdb-command:print borrowed_unique.next.val.value -// gdb-check:$8 = 9.5 +//@ gdb-command:print borrowed_unique.value +//@ gdb-check:$7 = 8.5 +//@ gdb-command:print borrowed_unique.next.val.value +//@ gdb-check:$8 = 9.5 // LONG CYCLE -// gdb-command:print long_cycle1.value -// gdb-check:$9 = 20 -// gdb-command:print long_cycle1.next.value -// gdb-check:$10 = 21 -// gdb-command:print long_cycle1.next.next.value -// gdb-check:$11 = 22 -// gdb-command:print long_cycle1.next.next.next.value -// gdb-check:$12 = 23 - -// gdb-command:print long_cycle2.value -// gdb-check:$13 = 24 -// gdb-command:print long_cycle2.next.value -// gdb-check:$14 = 25 -// gdb-command:print long_cycle2.next.next.value -// gdb-check:$15 = 26 - -// gdb-command:print long_cycle3.value -// gdb-check:$16 = 27 -// gdb-command:print long_cycle3.next.value -// gdb-check:$17 = 28 - -// gdb-command:print long_cycle4.value -// gdb-check:$18 = 29.5 - -// gdb-command:print long_cycle_w_anon_types.value -// gdb-check:$19 = 30 - -// gdb-command:print long_cycle_w_anon_types.next.val.value -// gdb-check:$20 = 31 - -// gdb-command:continue +//@ gdb-command:print long_cycle1.value +//@ gdb-check:$9 = 20 +//@ gdb-command:print long_cycle1.next.value +//@ gdb-check:$10 = 21 +//@ gdb-command:print long_cycle1.next.next.value +//@ gdb-check:$11 = 22 +//@ gdb-command:print long_cycle1.next.next.next.value +//@ gdb-check:$12 = 23 + +//@ gdb-command:print long_cycle2.value +//@ gdb-check:$13 = 24 +//@ gdb-command:print long_cycle2.next.value +//@ gdb-check:$14 = 25 +//@ gdb-command:print long_cycle2.next.next.value +//@ gdb-check:$15 = 26 + +//@ gdb-command:print long_cycle3.value +//@ gdb-check:$16 = 27 +//@ gdb-command:print long_cycle3.next.value +//@ gdb-check:$17 = 28 + +//@ gdb-command:print long_cycle4.value +//@ gdb-check:$18 = 29.5 + +//@ gdb-command:print long_cycle_w_anon_types.value +//@ gdb-check:$19 = 30 + +//@ gdb-command:print long_cycle_w_anon_types.next.val.value +//@ gdb-check:$20 = 31 + +//@ gdb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs index 75acbc131a8ce..14e5d798195ba 100644 --- a/tests/debuginfo/reference-debuginfo.rs +++ b/tests/debuginfo/reference-debuginfo.rs @@ -8,104 +8,104 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print *bool_ref -// gdb-check:$1 = true +//@ gdb-command:run +//@ gdb-command:print *bool_ref +//@ gdb-check:$1 = true -// gdb-command:print *int_ref -// gdb-check:$2 = -1 +//@ gdb-command:print *int_ref +//@ gdb-check:$2 = -1 -// gdb-command:print/d *char_ref -// gdb-check:$3 = 97 +//@ gdb-command:print/d *char_ref +//@ gdb-check:$3 = 97 -// gdb-command:print *i8_ref -// gdb-check:$4 = 68 +//@ gdb-command:print *i8_ref +//@ gdb-check:$4 = 68 -// gdb-command:print *i16_ref -// gdb-check:$5 = -16 +//@ gdb-command:print *i16_ref +//@ gdb-check:$5 = -16 -// gdb-command:print *i32_ref -// gdb-check:$6 = -32 +//@ gdb-command:print *i32_ref +//@ gdb-check:$6 = -32 -// gdb-command:print *i64_ref -// gdb-check:$7 = -64 +//@ gdb-command:print *i64_ref +//@ gdb-check:$7 = -64 -// gdb-command:print *uint_ref -// gdb-check:$8 = 1 +//@ gdb-command:print *uint_ref +//@ gdb-check:$8 = 1 -// gdb-command:print *u8_ref -// gdb-check:$9 = 100 +//@ gdb-command:print *u8_ref +//@ gdb-check:$9 = 100 -// gdb-command:print *u16_ref -// gdb-check:$10 = 16 +//@ gdb-command:print *u16_ref +//@ gdb-check:$10 = 16 -// gdb-command:print *u32_ref -// gdb-check:$11 = 32 +//@ gdb-command:print *u32_ref +//@ gdb-check:$11 = 32 -// gdb-command:print *u64_ref -// gdb-check:$12 = 64 +//@ gdb-command:print *u64_ref +//@ gdb-check:$12 = 64 -// gdb-command:print *f16_ref -// gdb-check:$13 = 1.5 +//@ gdb-command:print *f16_ref +//@ gdb-check:$13 = 1.5 -// gdb-command:print *f32_ref -// gdb-check:$14 = 2.5 +//@ gdb-command:print *f32_ref +//@ gdb-check:$14 = 2.5 -// gdb-command:print *f64_ref -// gdb-check:$15 = 3.5 +//@ gdb-command:print *f64_ref +//@ gdb-check:$15 = 3.5 -// gdb-command:print *f64_double_ref -// gdb-check:$16 = 3.5 +//@ gdb-command:print *f64_double_ref +//@ gdb-check:$16 = 3.5 // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v *bool_ref -// lldb-check:[...] true +//@ lldb-command:run +//@ lldb-command:v *bool_ref +//@ lldb-check:[...] true -// lldb-command:v *int_ref -// lldb-check:[...] -1 +//@ lldb-command:v *int_ref +//@ lldb-check:[...] -1 -// lldb-command:v *i8_ref -// lldb-check:[...] 'D' +//@ lldb-command:v *i8_ref +//@ lldb-check:[...] 'D' -// lldb-command:v *i16_ref -// lldb-check:[...] -16 +//@ lldb-command:v *i16_ref +//@ lldb-check:[...] -16 -// lldb-command:v *i32_ref -// lldb-check:[...] -32 +//@ lldb-command:v *i32_ref +//@ lldb-check:[...] -32 -// lldb-command:v *i64_ref -// lldb-check:[...] -64 +//@ lldb-command:v *i64_ref +//@ lldb-check:[...] -64 -// lldb-command:v *uint_ref -// lldb-check:[...] 1 +//@ lldb-command:v *uint_ref +//@ lldb-check:[...] 1 -// lldb-command:v *u8_ref -// lldb-check:[...] 'd' +//@ lldb-command:v *u8_ref +//@ lldb-check:[...] 'd' -// lldb-command:v *u16_ref -// lldb-check:[...] 16 +//@ lldb-command:v *u16_ref +//@ lldb-check:[...] 16 -// lldb-command:v *u32_ref -// lldb-check:[...] 32 +//@ lldb-command:v *u32_ref +//@ lldb-check:[...] 32 -// lldb-command:v *u64_ref -// lldb-check:[...] 64 +//@ lldb-command:v *u64_ref +//@ lldb-check:[...] 64 -// lldb-command:v *f16_ref -// lldb-check:[...] 1.5 +//@ lldb-command:v *f16_ref +//@ lldb-check:[...] 1.5 -// lldb-command:v *f32_ref -// lldb-check:[...] 2.5 +//@ lldb-command:v *f32_ref +//@ lldb-check:[...] 2.5 -// lldb-command:v *f64_ref -// lldb-check:[...] 3.5 +//@ lldb-command:v *f64_ref +//@ lldb-check:[...] 3.5 -// lldb-command:v *f64_double_ref -// lldb-check:[...] 3.5 +//@ lldb-command:v *f64_double_ref +//@ lldb-check:[...] 3.5 #![allow(unused_variables)] #![feature(f16)] diff --git a/tests/debuginfo/regression-bad-location-list-67992.rs b/tests/debuginfo/regression-bad-location-list-67992.rs index a5617a23c9311..da5393f9f09a1 100644 --- a/tests/debuginfo/regression-bad-location-list-67992.rs +++ b/tests/debuginfo/regression-bad-location-list-67992.rs @@ -3,16 +3,16 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print a -// gdb-check:$1 = regression_bad_location_list_67992::Foo {x: [0 ]} +//@ gdb-command:print a +//@ gdb-check:$1 = regression_bad_location_list_67992::Foo {x: [0 ]} // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v a -// lldb-check:(regression_bad_location_list_67992::Foo) [...] +//@ lldb-command:run +//@ lldb-command:v a +//@ lldb-check:(regression_bad_location_list_67992::Foo) [...] const ARRAY_SIZE: usize = 1024; diff --git a/tests/debuginfo/result-types.rs b/tests/debuginfo/result-types.rs index 8b91d0ba27efd..4fd80f19add7c 100644 --- a/tests/debuginfo/result-types.rs +++ b/tests/debuginfo/result-types.rs @@ -4,15 +4,15 @@ // === CDB TESTS ================================================================================== -// cdb-command: g +//@ cdb-command: g -// cdb-command: dx x,d -// cdb-check:x,d : Ok [Type: enum2$ > >] -// cdb-check: [...] __0 : -3 [Type: int] +//@ cdb-command: dx x,d +//@ cdb-check:x,d : Ok [Type: enum2$ > >] +//@ cdb-check: [...] __0 : -3 [Type: int] -// cdb-command: dx y -// cdb-check:y : Err [Type: enum2$ > >] -// cdb-check: [...] __0 : "Some error message" [Type: ref$] +//@ cdb-command: dx y +//@ cdb-check:y : Err [Type: enum2$ > >] +//@ cdb-check: [...] __0 : "Some error message" [Type: ref$] fn main() { let x: Result = Ok(-3); diff --git a/tests/debuginfo/rwlock-read.rs b/tests/debuginfo/rwlock-read.rs index 825cdbe55104f..be29ffcc65fa0 100644 --- a/tests/debuginfo/rwlock-read.rs +++ b/tests/debuginfo/rwlock-read.rs @@ -6,17 +6,17 @@ // === CDB TESTS ================================================================================== // -// cdb-command:g +//@ cdb-command:g // -// cdb-command:dx l -// cdb-check:l [Type: std::sync::poison::rwlock::RwLock] -// cdb-check: [...] poison [Type: std::sync::poison::Flag] -// cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell] +//@ cdb-command:dx l +//@ cdb-check:l [Type: std::sync::poison::rwlock::RwLock] +//@ cdb-check: [...] poison [Type: std::sync::poison::Flag] +//@ cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell] // -// cdb-command:dx r -// cdb-check:r [Type: std::sync::poison::rwlock::RwLockReadGuard] -// cdb-check: [...] data : NonNull([...]: 0) [Type: core::ptr::non_null::NonNull] -// cdb-check: [...] inner_lock : [...] [Type: std::sys::sync::rwlock::futex::RwLock *] +//@ cdb-command:dx r +//@ cdb-check:r [Type: std::sync::poison::rwlock::RwLockReadGuard] +//@ cdb-check: [...] data : NonNull([...]: 0) [Type: core::ptr::non_null::NonNull] +//@ cdb-check: [...] inner_lock : [...] [Type: std::sys::sync::rwlock::futex::RwLock *] #[allow(unused_variables)] diff --git a/tests/debuginfo/rwlock-write.rs b/tests/debuginfo/rwlock-write.rs index aaca048b8a7c8..9ca03f19c6ffd 100644 --- a/tests/debuginfo/rwlock-write.rs +++ b/tests/debuginfo/rwlock-write.rs @@ -6,12 +6,12 @@ // === CDB TESTS ================================================================================== // -// cdb-command:g +//@ cdb-command:g // -// cdb-command:dx w -// cdb-check:w [Type: std::sync::poison::rwlock::RwLockWriteGuard] -// cdb-check: [...] lock : [...] [Type: std::sync::poison::rwlock::RwLock *] -// cdb-check: [...] poison [Type: std::sync::poison::Guard] +//@ cdb-command:dx w +//@ cdb-check:w [Type: std::sync::poison::rwlock::RwLockWriteGuard] +//@ cdb-check: [...] lock : [...] [Type: std::sync::poison::rwlock::RwLock *] +//@ cdb-check: [...] poison [Type: std::sync::poison::Guard] #[allow(unused_variables)] diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs index 6e08ef4cd83a1..41e4ffc389b97 100644 --- a/tests/debuginfo/self-in-default-method.rs +++ b/tests/debuginfo/self-in-default-method.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = self_in_default_method::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = -2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = self_in_default_method::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = -2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = self_in_default_method::Struct {x: 100} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = self_in_default_method::Struct {x: 100} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = self_in_default_method::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = self_in_default_method::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = self_in_default_method::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = self_in_default_method::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = self_in_default_method::Struct {x: 200} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = self_in_default_method::Struct {x: 200} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] -2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 100 } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 100 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { x = 200 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 200 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs index a06731a54bd22..401d65291d35d 100644 --- a/tests/debuginfo/self-in-generic-default-method.rs +++ b/tests/debuginfo/self-in-generic-default-method.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STACK BY REF -// gdb-command:print *self -// gdb-check:$1 = self_in_generic_default_method::Struct {x: 987} -// gdb-command:print arg1 -// gdb-check:$2 = -1 -// gdb-command:print arg2 -// gdb-check:$3 = 2 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$1 = self_in_generic_default_method::Struct {x: 987} +//@ gdb-command:print arg1 +//@ gdb-check:$2 = -1 +//@ gdb-command:print arg2 +//@ gdb-check:$3 = 2 +//@ gdb-command:continue // STACK BY VAL -// gdb-command:print self -// gdb-check:$4 = self_in_generic_default_method::Struct {x: 987} -// gdb-command:print arg1 -// gdb-check:$5 = -3 -// gdb-command:print arg2 -// gdb-check:$6 = -4 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$4 = self_in_generic_default_method::Struct {x: 987} +//@ gdb-command:print arg1 +//@ gdb-check:$5 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$6 = -4 +//@ gdb-command:continue // OWNED BY REF -// gdb-command:print *self -// gdb-check:$7 = self_in_generic_default_method::Struct {x: 879} -// gdb-command:print arg1 -// gdb-check:$8 = -5 -// gdb-command:print arg2 -// gdb-check:$9 = -6 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$7 = self_in_generic_default_method::Struct {x: 879} +//@ gdb-command:print arg1 +//@ gdb-check:$8 = -5 +//@ gdb-command:print arg2 +//@ gdb-check:$9 = -6 +//@ gdb-command:continue // OWNED BY VAL -// gdb-command:print self -// gdb-check:$10 = self_in_generic_default_method::Struct {x: 879} -// gdb-command:print arg1 -// gdb-check:$11 = -7 -// gdb-command:print arg2 -// gdb-check:$12 = -8 -// gdb-command:continue +//@ gdb-command:print self +//@ gdb-check:$10 = self_in_generic_default_method::Struct {x: 879} +//@ gdb-command:print arg1 +//@ gdb-check:$11 = -7 +//@ gdb-command:print arg2 +//@ gdb-check:$12 = -8 +//@ gdb-command:continue // OWNED MOVED -// gdb-command:print *self -// gdb-check:$13 = self_in_generic_default_method::Struct {x: 879} -// gdb-command:print arg1 -// gdb-check:$14 = -9 -// gdb-command:print arg2 -// gdb-check:$15 = -10.5 -// gdb-command:continue +//@ gdb-command:print *self +//@ gdb-check:$13 = self_in_generic_default_method::Struct {x: 879} +//@ gdb-command:print arg1 +//@ gdb-check:$14 = -9 +//@ gdb-command:print arg2 +//@ gdb-check:$15 = -10.5 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STACK BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 987 } -// lldb-command:v arg1 -// lldb-check:[...] -1 -// lldb-command:v arg2 -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 987 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] 2 +//@ lldb-command:continue // STACK BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 987 } -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] -4 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 987 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -4 +//@ lldb-command:continue // OWNED BY REF -// lldb-command:v *self -// lldb-check:[...] { x = 879 } -// lldb-command:v arg1 -// lldb-check:[...] -5 -// lldb-command:v arg2 -// lldb-check:[...] -6 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 879 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -5 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -6 +//@ lldb-command:continue // OWNED BY VAL -// lldb-command:v self -// lldb-check:[...] { x = 879 } -// lldb-command:v arg1 -// lldb-check:[...] -7 -// lldb-command:v arg2 -// lldb-check:[...] -8 -// lldb-command:continue +//@ lldb-command:v self +//@ lldb-check:[...] { x = 879 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -7 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -8 +//@ lldb-command:continue // OWNED MOVED -// lldb-command:v *self -// lldb-check:[...] { x = 879 } -// lldb-command:v arg1 -// lldb-check:[...] -9 -// lldb-command:v arg2 -// lldb-check:[...] -10.5 -// lldb-command:continue +//@ lldb-command:v *self +//@ lldb-check:[...] { x = 879 } +//@ lldb-command:v arg1 +//@ lldb-check:[...] -9 +//@ lldb-command:v arg2 +//@ lldb-check:[...] -10.5 +//@ lldb-command:continue #[derive(Copy, Clone)] struct Struct { diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs index 7a7e54545b883..eff59a2dfd180 100644 --- a/tests/debuginfo/shadowed-argument.rs +++ b/tests/debuginfo/shadowed-argument.rs @@ -4,48 +4,48 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:print y -// gdb-check:$2 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:print y +//@ gdb-check:$2 = true +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 10 -// gdb-command:print y -// gdb-check:$4 = true -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 10 +//@ gdb-command:print y +//@ gdb-check:$4 = true +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = 10.5 -// gdb-command:print y -// gdb-check:$6 = 20 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = 10.5 +//@ gdb-command:print y +//@ gdb-check:$6 = 20 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue fn a_function(x: bool, y: bool) { diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs index c55f22df0037c..0d15d5e97f703 100644 --- a/tests/debuginfo/shadowed-variable.rs +++ b/tests/debuginfo/shadowed-variable.rs @@ -4,71 +4,71 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:print y -// gdb-check:$2 = true -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$3 = 10 -// gdb-command:print y -// gdb-check:$4 = true -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$5 = 10.5 -// gdb-command:print y -// gdb-check:$6 = 20 -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$7 = 10.5 -// gdb-command:print y -// gdb-check:$8 = 20 -// gdb-command:continue - -// gdb-command:print x -// gdb-check:$9 = 11.5 -// gdb-command:print y -// gdb-check:$10 = 20 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:print y +//@ gdb-check:$2 = true +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$3 = 10 +//@ gdb-command:print y +//@ gdb-check:$4 = true +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$5 = 10.5 +//@ gdb-command:print y +//@ gdb-check:$6 = 20 +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$7 = 10.5 +//@ gdb-command:print y +//@ gdb-check:$8 = 20 +//@ gdb-command:continue + +//@ gdb-command:print x +//@ gdb-check:$9 = 11.5 +//@ gdb-command:print y +//@ gdb-check:$10 = 20 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:v y -// lldb-check:[...] true -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue - -// lldb-command:v x -// lldb-check:[...] 11.5 -// lldb-command:v y -// lldb-check:[...] 20 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:v y +//@ lldb-check:[...] true +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue + +//@ lldb-command:v x +//@ lldb-check:[...] 11.5 +//@ lldb-command:v y +//@ lldb-check:[...] 20 +//@ lldb-command:continue fn main() { let x = false; diff --git a/tests/debuginfo/should-fail.rs b/tests/debuginfo/should-fail.rs index bc9b83fc2427d..8a1a74a4130f4 100644 --- a/tests/debuginfo/should-fail.rs +++ b/tests/debuginfo/should-fail.rs @@ -5,24 +5,24 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print x -// gdb-check:$1 = 5 +//@ gdb-command: print x +//@ gdb-check:$1 = 5 // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] 5 +//@ lldb-command:v x +//@ lldb-check:[...] 5 // === CDB TESTS ================================================================================== -// cdb-command:g +//@ cdb-command:g -// cdb-command:dx x -// cdb-check:string [...] : 5 [Type: [...]] +//@ cdb-command:dx x +//@ cdb-check:string [...] : 5 [Type: [...]] fn main() { let x = 1; diff --git a/tests/debuginfo/simd.rs b/tests/debuginfo/simd.rs index 888a78117b54f..7bfb2fad32779 100644 --- a/tests/debuginfo/simd.rs +++ b/tests/debuginfo/simd.rs @@ -9,32 +9,32 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run +//@ gdb-command:run -// gdb-command:print vi8x16 -// gdb-check:$1 = simd::i8x16 ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) -// gdb-command:print vi16x8 -// gdb-check:$2 = simd::i16x8 ([16, 17, 18, 19, 20, 21, 22, 23]) -// gdb-command:print vi32x4 -// gdb-check:$3 = simd::i32x4 ([24, 25, 26, 27]) -// gdb-command:print vi64x2 -// gdb-check:$4 = simd::i64x2 ([28, 29]) +//@ gdb-command:print vi8x16 +//@ gdb-check:$1 = simd::i8x16 ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) +//@ gdb-command:print vi16x8 +//@ gdb-check:$2 = simd::i16x8 ([16, 17, 18, 19, 20, 21, 22, 23]) +//@ gdb-command:print vi32x4 +//@ gdb-check:$3 = simd::i32x4 ([24, 25, 26, 27]) +//@ gdb-command:print vi64x2 +//@ gdb-check:$4 = simd::i64x2 ([28, 29]) -// gdb-command:print vu8x16 -// gdb-check:$5 = simd::u8x16 ([30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]) -// gdb-command:print vu16x8 -// gdb-check:$6 = simd::u16x8 ([46, 47, 48, 49, 50, 51, 52, 53]) -// gdb-command:print vu32x4 -// gdb-check:$7 = simd::u32x4 ([54, 55, 56, 57]) -// gdb-command:print vu64x2 -// gdb-check:$8 = simd::u64x2 ([58, 59]) +//@ gdb-command:print vu8x16 +//@ gdb-check:$5 = simd::u8x16 ([30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]) +//@ gdb-command:print vu16x8 +//@ gdb-check:$6 = simd::u16x8 ([46, 47, 48, 49, 50, 51, 52, 53]) +//@ gdb-command:print vu32x4 +//@ gdb-check:$7 = simd::u32x4 ([54, 55, 56, 57]) +//@ gdb-command:print vu64x2 +//@ gdb-check:$8 = simd::u64x2 ([58, 59]) -// gdb-command:print vf32x4 -// gdb-check:$9 = simd::f32x4 ([60.5, 61.5, 62.5, 63.5]) -// gdb-command:print vf64x2 -// gdb-check:$10 = simd::f64x2 ([64.5, 65.5]) +//@ gdb-command:print vf32x4 +//@ gdb-check:$9 = simd::f32x4 ([60.5, 61.5, 62.5, 63.5]) +//@ gdb-command:print vf64x2 +//@ gdb-check:$10 = simd::f64x2 ([64.5, 65.5]) -// gdb-command:continue +//@ gdb-command:continue #![allow(unused_variables)] #![feature(repr_simd)] diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs index 194da9169d9a5..1d1b6f882ae11 100644 --- a/tests/debuginfo/simple-lexical-scope.rs +++ b/tests/debuginfo/simple-lexical-scope.rs @@ -4,68 +4,68 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print x -// gdb-check:$1 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$1 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$2 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$2 = false +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$3 = 10 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$3 = 10 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$4 = 10 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$4 = 10 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$5 = 10.5 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$5 = 10.5 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$6 = 10 -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$6 = 10 +//@ gdb-command:continue -// gdb-command:print x -// gdb-check:$7 = false -// gdb-command:continue +//@ gdb-command:print x +//@ gdb-check:$7 = false +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 10.5 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 10.5 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] 10 -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] 10 +//@ lldb-command:continue -// lldb-command:v x -// lldb-check:[...] false -// lldb-command:continue +//@ lldb-command:v x +//@ lldb-check:[...] false +//@ lldb-command:continue fn main() { diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs index 665bb2fdb5799..a67dc13a5d433 100644 --- a/tests/debuginfo/simple-struct.rs +++ b/tests/debuginfo/simple-struct.rs @@ -4,85 +4,85 @@ // === GDB TESTS =================================================================================== -// gdb-command:print simple_struct::NO_PADDING_16 -// gdb-check:$1 = simple_struct::NoPadding16 {x: 1000, y: -1001} +//@ gdb-command:print simple_struct::NO_PADDING_16 +//@ gdb-check:$1 = simple_struct::NoPadding16 {x: 1000, y: -1001} -// gdb-command:print simple_struct::NO_PADDING_32 -// gdb-check:$2 = simple_struct::NoPadding32 {x: 1, y: 2, z: 3} +//@ gdb-command:print simple_struct::NO_PADDING_32 +//@ gdb-check:$2 = simple_struct::NoPadding32 {x: 1, y: 2, z: 3} -// gdb-command:print simple_struct::NO_PADDING_64 -// gdb-check:$3 = simple_struct::NoPadding64 {x: 4, y: 5, z: 6} +//@ gdb-command:print simple_struct::NO_PADDING_64 +//@ gdb-check:$3 = simple_struct::NoPadding64 {x: 4, y: 5, z: 6} -// gdb-command:print simple_struct::NO_PADDING_163264 -// gdb-check:$4 = simple_struct::NoPadding163264 {a: 7, b: 8, c: 9, d: 10} +//@ gdb-command:print simple_struct::NO_PADDING_163264 +//@ gdb-check:$4 = simple_struct::NoPadding163264 {a: 7, b: 8, c: 9, d: 10} -// gdb-command:print simple_struct::INTERNAL_PADDING -// gdb-check:$5 = simple_struct::InternalPadding {x: 11, y: 12} +//@ gdb-command:print simple_struct::INTERNAL_PADDING +//@ gdb-check:$5 = simple_struct::InternalPadding {x: 11, y: 12} -// gdb-command:print simple_struct::PADDING_AT_END -// gdb-check:$6 = simple_struct::PaddingAtEnd {x: 13, y: 14} +//@ gdb-command:print simple_struct::PADDING_AT_END +//@ gdb-check:$6 = simple_struct::PaddingAtEnd {x: 13, y: 14} -// gdb-command:run +//@ gdb-command:run -// gdb-command:print no_padding16 -// gdb-check:$7 = simple_struct::NoPadding16 {x: 10000, y: -10001} +//@ gdb-command:print no_padding16 +//@ gdb-check:$7 = simple_struct::NoPadding16 {x: 10000, y: -10001} -// gdb-command:print no_padding32 -// gdb-check:$8 = simple_struct::NoPadding32 {x: -10002, y: -10003.5, z: 10004} +//@ gdb-command:print no_padding32 +//@ gdb-check:$8 = simple_struct::NoPadding32 {x: -10002, y: -10003.5, z: 10004} -// gdb-command:print no_padding64 -// gdb-check:$9 = simple_struct::NoPadding64 {x: -10005.5, y: 10006, z: 10007} +//@ gdb-command:print no_padding64 +//@ gdb-check:$9 = simple_struct::NoPadding64 {x: -10005.5, y: 10006, z: 10007} -// gdb-command:print no_padding163264 -// gdb-check:$10 = simple_struct::NoPadding163264 {a: -10008, b: 10009, c: 10010, d: 10011} +//@ gdb-command:print no_padding163264 +//@ gdb-check:$10 = simple_struct::NoPadding163264 {a: -10008, b: 10009, c: 10010, d: 10011} -// gdb-command:print internal_padding -// gdb-check:$11 = simple_struct::InternalPadding {x: 10012, y: -10013} +//@ gdb-command:print internal_padding +//@ gdb-check:$11 = simple_struct::InternalPadding {x: 10012, y: -10013} -// gdb-command:print padding_at_end -// gdb-check:$12 = simple_struct::PaddingAtEnd {x: -10014, y: 10015} +//@ gdb-command:print padding_at_end +//@ gdb-check:$12 = simple_struct::PaddingAtEnd {x: -10014, y: 10015} -// gdb-command:print simple_struct::NO_PADDING_16 -// gdb-check:$13 = simple_struct::NoPadding16 {x: 100, y: -101} +//@ gdb-command:print simple_struct::NO_PADDING_16 +//@ gdb-check:$13 = simple_struct::NoPadding16 {x: 100, y: -101} -// gdb-command:print simple_struct::NO_PADDING_32 -// gdb-check:$14 = simple_struct::NoPadding32 {x: -15, y: -16, z: 17} +//@ gdb-command:print simple_struct::NO_PADDING_32 +//@ gdb-check:$14 = simple_struct::NoPadding32 {x: -15, y: -16, z: 17} -// gdb-command:print simple_struct::NO_PADDING_64 -// gdb-check:$15 = simple_struct::NoPadding64 {x: -18, y: 19, z: 20} +//@ gdb-command:print simple_struct::NO_PADDING_64 +//@ gdb-check:$15 = simple_struct::NoPadding64 {x: -18, y: 19, z: 20} -// gdb-command:print simple_struct::NO_PADDING_163264 -// gdb-check:$16 = simple_struct::NoPadding163264 {a: -21, b: 22, c: 23, d: 24} +//@ gdb-command:print simple_struct::NO_PADDING_163264 +//@ gdb-check:$16 = simple_struct::NoPadding163264 {a: -21, b: 22, c: 23, d: 24} -// gdb-command:print simple_struct::INTERNAL_PADDING -// gdb-check:$17 = simple_struct::InternalPadding {x: 25, y: -26} +//@ gdb-command:print simple_struct::INTERNAL_PADDING +//@ gdb-check:$17 = simple_struct::InternalPadding {x: 25, y: -26} -// gdb-command:print simple_struct::PADDING_AT_END -// gdb-check:$18 = simple_struct::PaddingAtEnd {x: -27, y: 28} +//@ gdb-command:print simple_struct::PADDING_AT_END +//@ gdb-check:$18 = simple_struct::PaddingAtEnd {x: -27, y: 28} -// gdb-command:continue +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v no_padding16 -// lldb-check:[...] { x = 10000 y = -10001 } +//@ lldb-command:v no_padding16 +//@ lldb-check:[...] { x = 10000 y = -10001 } -// lldb-command:v no_padding32 -// lldb-check:[...] { x = -10002 y = -10003.5 z = 10004 } +//@ lldb-command:v no_padding32 +//@ lldb-check:[...] { x = -10002 y = -10003.5 z = 10004 } -// lldb-command:v no_padding64 -// lldb-check:[...] { x = -10005.5 y = 10006 z = 10007 } +//@ lldb-command:v no_padding64 +//@ lldb-check:[...] { x = -10005.5 y = 10006 z = 10007 } -// lldb-command:v no_padding163264 -// lldb-check:[...] { a = -10008 b = 10009 c = 10010 d = 10011 } +//@ lldb-command:v no_padding163264 +//@ lldb-check:[...] { a = -10008 b = 10009 c = 10010 d = 10011 } -// lldb-command:v internal_padding -// lldb-check:[...] { x = 10012 y = -10013 } +//@ lldb-command:v internal_padding +//@ lldb-check:[...] { x = 10012 y = -10013 } -// lldb-command:v padding_at_end -// lldb-check:[...] { x = -10014 y = 10015 } +//@ lldb-command:v padding_at_end +//@ lldb-check:[...] { x = -10014 y = 10015 } #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs index c1509a8a9b4c6..a82070900aafc 100644 --- a/tests/debuginfo/simple-tuple.rs +++ b/tests/debuginfo/simple-tuple.rs @@ -4,121 +4,121 @@ // === GDB TESTS =================================================================================== -// gdb-command:print simple_tuple::NO_PADDING_8 -// gdb-check:$1 = (-50, 50) -// gdb-command:print simple_tuple::NO_PADDING_16 -// gdb-check:$2 = (-1, 2, 3) -// gdb-command:print simple_tuple::NO_PADDING_32 -// gdb-check:$3 = (4, 5, 6) -// gdb-command:print simple_tuple::NO_PADDING_64 -// gdb-check:$4 = (7, 8, 9) - -// gdb-command:print simple_tuple::INTERNAL_PADDING_1 -// gdb-check:$5 = (10, 11) -// gdb-command:print simple_tuple::INTERNAL_PADDING_2 -// gdb-check:$6 = (12, 13, 14, 15) - -// gdb-command:print simple_tuple::PADDING_AT_END -// gdb-check:$7 = (16, 17) - -// gdb-command:run - -// gdb-command:print noPadding8 -// gdb-check:$8 = (-100, 100) -// gdb-command:print noPadding16 -// gdb-check:$9 = (0, 1, 2) -// gdb-command:print noPadding32 -// gdb-check:$10 = (3, 4.5, 5) -// gdb-command:print noPadding64 -// gdb-check:$11 = (6, 7.5, 8) - -// gdb-command:print internalPadding1 -// gdb-check:$12 = (9, 10) -// gdb-command:print internalPadding2 -// gdb-check:$13 = (11, 12, 13, 14) - -// gdb-command:print paddingAtEnd -// gdb-check:$14 = (15, 16) - -// gdb-command:print simple_tuple::NO_PADDING_8 -// gdb-check:$15 = (-127, 127) -// gdb-command:print simple_tuple::NO_PADDING_16 -// gdb-check:$16 = (-10, 10, 9) -// gdb-command:print simple_tuple::NO_PADDING_32 -// gdb-check:$17 = (14, 15, 16) -// gdb-command:print simple_tuple::NO_PADDING_64 -// gdb-check:$18 = (17, 18, 19) - -// gdb-command:print simple_tuple::INTERNAL_PADDING_1 -// gdb-check:$19 = (110, 111) -// gdb-command:print simple_tuple::INTERNAL_PADDING_2 -// gdb-check:$20 = (112, 113, 114, 115) - -// gdb-command:print simple_tuple::PADDING_AT_END -// gdb-check:$21 = (116, 117) +//@ gdb-command:print simple_tuple::NO_PADDING_8 +//@ gdb-check:$1 = (-50, 50) +//@ gdb-command:print simple_tuple::NO_PADDING_16 +//@ gdb-check:$2 = (-1, 2, 3) +//@ gdb-command:print simple_tuple::NO_PADDING_32 +//@ gdb-check:$3 = (4, 5, 6) +//@ gdb-command:print simple_tuple::NO_PADDING_64 +//@ gdb-check:$4 = (7, 8, 9) + +//@ gdb-command:print simple_tuple::INTERNAL_PADDING_1 +//@ gdb-check:$5 = (10, 11) +//@ gdb-command:print simple_tuple::INTERNAL_PADDING_2 +//@ gdb-check:$6 = (12, 13, 14, 15) + +//@ gdb-command:print simple_tuple::PADDING_AT_END +//@ gdb-check:$7 = (16, 17) + +//@ gdb-command:run + +//@ gdb-command:print noPadding8 +//@ gdb-check:$8 = (-100, 100) +//@ gdb-command:print noPadding16 +//@ gdb-check:$9 = (0, 1, 2) +//@ gdb-command:print noPadding32 +//@ gdb-check:$10 = (3, 4.5, 5) +//@ gdb-command:print noPadding64 +//@ gdb-check:$11 = (6, 7.5, 8) + +//@ gdb-command:print internalPadding1 +//@ gdb-check:$12 = (9, 10) +//@ gdb-command:print internalPadding2 +//@ gdb-check:$13 = (11, 12, 13, 14) + +//@ gdb-command:print paddingAtEnd +//@ gdb-check:$14 = (15, 16) + +//@ gdb-command:print simple_tuple::NO_PADDING_8 +//@ gdb-check:$15 = (-127, 127) +//@ gdb-command:print simple_tuple::NO_PADDING_16 +//@ gdb-check:$16 = (-10, 10, 9) +//@ gdb-command:print simple_tuple::NO_PADDING_32 +//@ gdb-check:$17 = (14, 15, 16) +//@ gdb-command:print simple_tuple::NO_PADDING_64 +//@ gdb-check:$18 = (17, 18, 19) + +//@ gdb-command:print simple_tuple::INTERNAL_PADDING_1 +//@ gdb-check:$19 = (110, 111) +//@ gdb-command:print simple_tuple::INTERNAL_PADDING_2 +//@ gdb-check:$20 = (112, 113, 114, 115) + +//@ gdb-command:print simple_tuple::PADDING_AT_END +//@ gdb-check:$21 = (116, 117) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v/d noPadding8 -// lldb-check:[...] { 0 = -100 1 = 100 } -// lldb-command:v noPadding16 -// lldb-check:[...] { 0 = 0 1 = 1 2 = 2 } -// lldb-command:v noPadding32 -// lldb-check:[...] { 0 = 3 1 = 4.5 2 = 5 } -// lldb-command:v noPadding64 -// lldb-check:[...] { 0 = 6 1 = 7.5 2 = 8 } +//@ lldb-command:v/d noPadding8 +//@ lldb-check:[...] { 0 = -100 1 = 100 } +//@ lldb-command:v noPadding16 +//@ lldb-check:[...] { 0 = 0 1 = 1 2 = 2 } +//@ lldb-command:v noPadding32 +//@ lldb-check:[...] { 0 = 3 1 = 4.5 2 = 5 } +//@ lldb-command:v noPadding64 +//@ lldb-check:[...] { 0 = 6 1 = 7.5 2 = 8 } -// lldb-command:v internalPadding1 -// lldb-check:[...] { 0 = 9 1 = 10 } -// lldb-command:v internalPadding2 -// lldb-check:[...] { 0 = 11 1 = 12 2 = 13 3 = 14 } +//@ lldb-command:v internalPadding1 +//@ lldb-check:[...] { 0 = 9 1 = 10 } +//@ lldb-command:v internalPadding2 +//@ lldb-check:[...] { 0 = 11 1 = 12 2 = 13 3 = 14 } -// lldb-command:v paddingAtEnd -// lldb-check:[...] { 0 = 15 1 = 16 } +//@ lldb-command:v paddingAtEnd +//@ lldb-check:[...] { 0 = 15 1 = 16 } // === CDB TESTS ================================================================================== -// cdb-command: g - -// cdb-command:dx noPadding8,d -// cdb-check:noPadding8,d [...]: (-100, 100) [Type: tuple$] -// cdb-check:[...][0] : -100 [Type: [...]] -// cdb-check:[...][1] : 100 [Type: [...]] -// cdb-command:dx noPadding16,d -// cdb-check:noPadding16,d [...]: (0, 1, 2) [Type: tuple$] -// cdb-check:[...][0] : 0 [Type: [...]] -// cdb-check:[...][1] : 1 [Type: [...]] -// cdb-check:[...][2] : 2 [Type: [...]] -// cdb-command:dx noPadding32,d -// cdb-check:noPadding32,d [...]: (3, 4.5[...], 5) [Type: tuple$] -// cdb-check:[...][0] : 3 [Type: [...]] -// cdb-check:[...][1] : 4.5[...] [Type: [...]] -// cdb-check:[...][2] : 5 [Type: [...]] -// cdb-command:dx noPadding64,d -// cdb-check:noPadding64,d [...]: (6, 7.5[...], 8) [Type: tuple$] -// cdb-check:[...][0] : 6 [Type: [...]] -// cdb-check:[...][1] : 7.500000 [Type: [...]] -// cdb-check:[...][2] : 8 [Type: [...]] - -// cdb-command:dx internalPadding1,d -// cdb-check:internalPadding1,d [...]: (9, 10) [Type: tuple$] -// cdb-check:[...][0] : 9 [Type: short] -// cdb-check:[...][1] : 10 [Type: int] -// cdb-command:dx internalPadding2,d -// cdb-check:internalPadding2,d [...]: (11, 12, 13, 14) [Type: tuple$] -// cdb-check:[...][0] : 11 [Type: [...]] -// cdb-check:[...][1] : 12 [Type: [...]] -// cdb-check:[...][2] : 13 [Type: [...]] -// cdb-check:[...][3] : 14 [Type: [...]] - -// cdb-command:dx paddingAtEnd,d -// cdb-check:paddingAtEnd,d [...]: (15, 16) [Type: tuple$] -// cdb-check:[...][0] : 15 [Type: [...]] -// cdb-check:[...][1] : 16 [Type: [...]] +//@ cdb-command: g + +//@ cdb-command:dx noPadding8,d +//@ cdb-check:noPadding8,d [...]: (-100, 100) [Type: tuple$] +//@ cdb-check:[...][0] : -100 [Type: [...]] +//@ cdb-check:[...][1] : 100 [Type: [...]] +//@ cdb-command:dx noPadding16,d +//@ cdb-check:noPadding16,d [...]: (0, 1, 2) [Type: tuple$] +//@ cdb-check:[...][0] : 0 [Type: [...]] +//@ cdb-check:[...][1] : 1 [Type: [...]] +//@ cdb-check:[...][2] : 2 [Type: [...]] +//@ cdb-command:dx noPadding32,d +//@ cdb-check:noPadding32,d [...]: (3, 4.5[...], 5) [Type: tuple$] +//@ cdb-check:[...][0] : 3 [Type: [...]] +//@ cdb-check:[...][1] : 4.5[...] [Type: [...]] +//@ cdb-check:[...][2] : 5 [Type: [...]] +//@ cdb-command:dx noPadding64,d +//@ cdb-check:noPadding64,d [...]: (6, 7.5[...], 8) [Type: tuple$] +//@ cdb-check:[...][0] : 6 [Type: [...]] +//@ cdb-check:[...][1] : 7.500000 [Type: [...]] +//@ cdb-check:[...][2] : 8 [Type: [...]] + +//@ cdb-command:dx internalPadding1,d +//@ cdb-check:internalPadding1,d [...]: (9, 10) [Type: tuple$] +//@ cdb-check:[...][0] : 9 [Type: short] +//@ cdb-check:[...][1] : 10 [Type: int] +//@ cdb-command:dx internalPadding2,d +//@ cdb-check:internalPadding2,d [...]: (11, 12, 13, 14) [Type: tuple$] +//@ cdb-check:[...][0] : 11 [Type: [...]] +//@ cdb-check:[...][1] : 12 [Type: [...]] +//@ cdb-check:[...][2] : 13 [Type: [...]] +//@ cdb-check:[...][3] : 14 [Type: [...]] + +//@ cdb-command:dx paddingAtEnd,d +//@ cdb-check:paddingAtEnd,d [...]: (15, 16) [Type: tuple$] +//@ cdb-check:[...][0] : 15 [Type: [...]] +//@ cdb-check:[...][1] : 16 [Type: [...]] #![allow(unused_variables)] diff --git a/tests/debuginfo/skip_second_statement.rs b/tests/debuginfo/skip_second_statement.rs index 452b6db3882d9..d0eadd9aa0fbf 100644 --- a/tests/debuginfo/skip_second_statement.rs +++ b/tests/debuginfo/skip_second_statement.rs @@ -8,85 +8,85 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_rem2_call3[...] -// gdb-command:step 2 -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_after_rem[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add1_hdr[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_add2_hdr[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call2[...] -// gdb-command:next 2 -// gdb-command:frame -// gdb-check:[...]#loc_add2_call3[...] -// gdb-command:step 2 -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call2[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call2[...] -// gdb-command:next 2 -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call3[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call3[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_rem2_call3[...] +//@ gdb-command:step 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_after_rem[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add1_hdr[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_add2_hdr[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call2[...] +//@ gdb-command:next 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add2_call3[...] +//@ gdb-command:step 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call2[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call2[...] +//@ gdb-command:next 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call3[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-command:continue #[inline(never)] fn myprintln_impl(text: &str) { diff --git a/tests/debuginfo/skip_second_statement_collapse.rs b/tests/debuginfo/skip_second_statement_collapse.rs index 52a85c5107e48..67cd2f0d93640 100644 --- a/tests/debuginfo/skip_second_statement_collapse.rs +++ b/tests/debuginfo/skip_second_statement_collapse.rs @@ -8,85 +8,85 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_rem2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_rem2_call3[...] -// gdb-command:step 2 -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_after_rem[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add_macro[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_add2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-check:[...]#loc_add_macro[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call2[...] -// gdb-command:next 2 -// gdb-command:frame -// gdb-check:[...]#loc_add2_call3[...] -// gdb-command:step 2 -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call2[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call3[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder1_call1[...] -// gdb-command:next -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call2[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call2[...] -// gdb-command:next 2 -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call3[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call3[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call3_println[...] -// gdb-command:next 3 -// gdb-command:frame -// gdb-check:[...]#loc_reorder2_call1[...] -// gdb-command:step -// gdb-command:frame -// gdb-check:[...]#loc_call1[...] -// gdb-command:next 2 -// gdb-command:continue +//@ gdb-command:run +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_rem2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_rem2_call3[...] +//@ gdb-command:step 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_after_rem[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add_macro[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-check:[...]#loc_add_macro[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call2[...] +//@ gdb-command:next 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_add2_call3[...] +//@ gdb-command:step 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call2[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call3[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder1_call1[...] +//@ gdb-command:next +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call2[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call2[...] +//@ gdb-command:next 2 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call3[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call3_println[...] +//@ gdb-command:next 3 +//@ gdb-command:frame +//@ gdb-check:[...]#loc_reorder2_call1[...] +//@ gdb-command:step +//@ gdb-command:frame +//@ gdb-check:[...]#loc_call1[...] +//@ gdb-command:next 2 +//@ gdb-command:continue #[inline(never)] fn myprintln_impl(text: &str) { diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs index 87b959f9df056..6491e3daf4c1b 100644 --- a/tests/debuginfo/static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/static-method-on-struct-and-enum.rs @@ -4,44 +4,44 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run // STRUCT -// gdb-command:print arg1 -// gdb-check:$1 = 1 -// gdb-command:print arg2 -// gdb-check:$2 = 2 -// gdb-command:continue +//@ gdb-command:print arg1 +//@ gdb-check:$1 = 1 +//@ gdb-command:print arg2 +//@ gdb-check:$2 = 2 +//@ gdb-command:continue // ENUM -// gdb-command:print arg1 -// gdb-check:$3 = -3 -// gdb-command:print arg2 -// gdb-check:$4 = 4.5 -// gdb-command:print arg3 -// gdb-check:$5 = 5 -// gdb-command:continue +//@ gdb-command:print arg1 +//@ gdb-check:$3 = -3 +//@ gdb-command:print arg2 +//@ gdb-check:$4 = 4.5 +//@ gdb-command:print arg3 +//@ gdb-check:$5 = 5 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run // STRUCT -// lldb-command:v arg1 -// lldb-check:[...] 1 -// lldb-command:v arg2 -// lldb-check:[...] 2 -// lldb-command:continue +//@ lldb-command:v arg1 +//@ lldb-check:[...] 1 +//@ lldb-command:v arg2 +//@ lldb-check:[...] 2 +//@ lldb-command:continue // ENUM -// lldb-command:v arg1 -// lldb-check:[...] -3 -// lldb-command:v arg2 -// lldb-check:[...] 4.5 -// lldb-command:v arg3 -// lldb-check:[...] 5 -// lldb-command:continue +//@ lldb-command:v arg1 +//@ lldb-check:[...] -3 +//@ lldb-command:v arg2 +//@ lldb-check:[...] 4.5 +//@ lldb-command:v arg3 +//@ lldb-check:[...] 5 +//@ lldb-command:continue struct Struct { x: isize diff --git a/tests/debuginfo/step-into-match.rs b/tests/debuginfo/step-into-match.rs index a05ed8653be2b..8c9e91c8e835d 100644 --- a/tests/debuginfo/step-into-match.rs +++ b/tests/debuginfo/step-into-match.rs @@ -8,340 +8,340 @@ // === GDB TESTS ============================================================== -// gdb-command: r +//@ gdb-command: r -// gdb-command: s -// gdb-check:[...]match x { +//@ gdb-command: s +//@ gdb-check:[...]match x { -// gdb-command: s -// gdb-check:[...] Some(42) => 1, +//@ gdb-command: s +//@ gdb-check:[...] Some(42) => 1, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_enum(Some(12)); +//@ gdb-command: s +//@ gdb-check:[...]match_enum(Some(12)); -// gdb-command: s -// gdb-check:[...]match x { +//@ gdb-command: s +//@ gdb-check:[...]match x { -// gdb-command: s -// gdb-check:[...]Some(_) => 2, +//@ gdb-command: s +//@ gdb-check:[...]Some(_) => 2, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_enum(None); +//@ gdb-command: s +//@ gdb-check:[...]match_enum(None); -// gdb-command: s -// gdb-check:[...]match x { +//@ gdb-command: s +//@ gdb-check:[...]match x { -// gdb-command: s -// gdb-check:[...]None => 3, +//@ gdb-command: s +//@ gdb-check:[...]None => 3, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_int(1); +//@ gdb-command: s +//@ gdb-check:[...]match_int(1); -// gdb-command: s -// gdb-check:[...]match y { +//@ gdb-command: s +//@ gdb-check:[...]match y { -// gdb-command: s -// gdb-check:[...]1 => 3, +//@ gdb-command: s +//@ gdb-check:[...]1 => 3, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_int(2); +//@ gdb-command: s +//@ gdb-check:[...]match_int(2); -// gdb-command: s -// gdb-check:[...]match y { +//@ gdb-command: s +//@ gdb-check:[...]match y { -// gdb-command: s -// gdb-check:[...]_ => 4, +//@ gdb-command: s +//@ gdb-check:[...]_ => 4, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_int(0); +//@ gdb-command: s +//@ gdb-check:[...]match_int(0); -// gdb-command: s -// gdb-check:[...]match y { +//@ gdb-command: s +//@ gdb-check:[...]match y { -// gdb-command: s -// gdb-check:[...]0 => 2, +//@ gdb-command: s +//@ gdb-check:[...]0 => 2, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_int(-1); +//@ gdb-command: s +//@ gdb-check:[...]match_int(-1); -// gdb-command: s -// gdb-check:[...]match y { +//@ gdb-command: s +//@ gdb-check:[...]match y { -// gdb-command: s -// gdb-check:[...]-1 => 1, +//@ gdb-command: s +//@ gdb-check:[...]-1 => 1, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_tuple(5, 12); +//@ gdb-command: s +//@ gdb-check:[...]match_tuple(5, 12); -// gdb-command: s -// gdb-check:[...]match (a, b) { +//@ gdb-command: s +//@ gdb-check:[...]match (a, b) { -// gdb-command: s -// gdb-check:[...](5, 12) => 3, +//@ gdb-command: s +//@ gdb-check:[...](5, 12) => 3, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_tuple(29, 1); +//@ gdb-command: s +//@ gdb-check:[...]match_tuple(29, 1); -// gdb-command: s -// gdb-check:[...]match (a, b) { +//@ gdb-command: s +//@ gdb-check:[...]match (a, b) { -// gdb-command: s -// gdb-check:[...](29, _) => 2, +//@ gdb-command: s +//@ gdb-check:[...](29, _) => 2, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_tuple(12, 12); +//@ gdb-command: s +//@ gdb-check:[...]match_tuple(12, 12); -// gdb-command: s -// gdb-check:[...]match (a, b) { +//@ gdb-command: s +//@ gdb-check:[...]match (a, b) { -// gdb-command: s -// gdb-check:[...](_, _) => 5, +//@ gdb-command: s +//@ gdb-check:[...](_, _) => 5, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_tuple(42, 12); +//@ gdb-command: s +//@ gdb-check:[...]match_tuple(42, 12); -// gdb-command: s -// gdb-check:[...]match (a, b) { +//@ gdb-command: s +//@ gdb-check:[...]match (a, b) { -// gdb-command: s -// gdb-check:[...](42, 12) => 1, +//@ gdb-command: s +//@ gdb-check:[...](42, 12) => 1, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]match_tuple(1, 9); +//@ gdb-command: s +//@ gdb-check:[...]match_tuple(1, 9); -// gdb-command: s -// gdb-check:[...]match (a, b) { +//@ gdb-command: s +//@ gdb-check:[...]match (a, b) { -// gdb-command: s -// gdb-check:[...](_, 9) => 4, +//@ gdb-command: s +//@ gdb-check:[...](_, 9) => 4, -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} -// gdb-command: s -// gdb-check:[...]} +//@ gdb-command: s +//@ gdb-check:[...]} // === CDB TESTS ============================================================== // Enable line-based debugging and print lines after stepping. -// cdb-command: .lines -e -// cdb-command: l+s -// cdb-command: l+t +//@ cdb-command: .lines -e +//@ cdb-command: l+s +//@ cdb-command: l+t -// cdb-command: g +//@ cdb-command: g -// cdb-command: t -// cdb-check: [...]: fn match_enum(x: Option) -> u8 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_enum(x: Option) -> u8 { -// cdb-command: t -// cdb-check: [...]: match x { +//@ cdb-command: t +//@ cdb-check: [...]: match x { -// cdb-command: t -// cdb-check: [...]: Some(42) => 1, +//@ cdb-command: t +//@ cdb-check: [...]: Some(42) => 1, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_enum(Some(12)); +//@ cdb-command: t +//@ cdb-check: [...]: match_enum(Some(12)); -// cdb-command: t -// cdb-check: [...]: fn match_enum(x: Option) -> u8 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_enum(x: Option) -> u8 { -// cdb-command: t -// cdb-check: [...]: match x { +//@ cdb-command: t +//@ cdb-check: [...]: match x { -// cdb-command: t -// cdb-check: [...]: Some(_) => 2, +//@ cdb-command: t +//@ cdb-check: [...]: Some(_) => 2, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_enum(None); +//@ cdb-command: t +//@ cdb-check: [...]: match_enum(None); -// cdb-command: t -// cdb-check: [...]: fn match_enum(x: Option) -> u8 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_enum(x: Option) -> u8 { -// cdb-command: t -// cdb-check: [...]: match x { +//@ cdb-command: t +//@ cdb-check: [...]: match x { -// cdb-command: t -// cdb-check: [...]: None => 3, +//@ cdb-command: t +//@ cdb-check: [...]: None => 3, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_int(1); +//@ cdb-command: t +//@ cdb-check: [...]: match_int(1); -// cdb-command: t -// cdb-check: [...]: fn match_int(y: i32) -> u16 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_int(y: i32) -> u16 { -// cdb-command: t -// cdb-check: [...]: match y { +//@ cdb-command: t +//@ cdb-check: [...]: match y { -// cdb-command: t -// cdb-check: [...]: 1 => 3, +//@ cdb-command: t +//@ cdb-check: [...]: 1 => 3, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_int(2); +//@ cdb-command: t +//@ cdb-check: [...]: match_int(2); -// cdb-command: t -// cdb-check: [...]: fn match_int(y: i32) -> u16 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_int(y: i32) -> u16 { -// cdb-command: t -// cdb-check: [...]: match y { +//@ cdb-command: t +//@ cdb-check: [...]: match y { -// cdb-command: t -// cdb-check: [...]: _ => 4, +//@ cdb-command: t +//@ cdb-check: [...]: _ => 4, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_int(0); +//@ cdb-command: t +//@ cdb-check: [...]: match_int(0); -// cdb-command: t -// cdb-check: [...]: fn match_int(y: i32) -> u16 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_int(y: i32) -> u16 { -// cdb-command: t -// cdb-check: [...]: match y { +//@ cdb-command: t +//@ cdb-check: [...]: match y { -// cdb-command: t -// cdb-check: [...]: 0 => 2, +//@ cdb-command: t +//@ cdb-check: [...]: 0 => 2, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_int(-1); +//@ cdb-command: t +//@ cdb-check: [...]: match_int(-1); -// cdb-command: t -// cdb-check: [...]: fn match_int(y: i32) -> u16 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_int(y: i32) -> u16 { -// cdb-command: t -// cdb-check: [...]: match y { +//@ cdb-command: t +//@ cdb-check: [...]: match y { -// cdb-command: t -// cdb-check: [...]: -1 => 1, +//@ cdb-command: t +//@ cdb-check: [...]: -1 => 1, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_tuple(5, 12); +//@ cdb-command: t +//@ cdb-check: [...]: match_tuple(5, 12); -// cdb-command: t -// cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { -// cdb-command: t -// cdb-check: [...]: match (a, b) { +//@ cdb-command: t +//@ cdb-check: [...]: match (a, b) { -// cdb-command: t -// cdb-check: [...]: (5, 12) => 3, +//@ cdb-command: t +//@ cdb-check: [...]: (5, 12) => 3, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_tuple(29, 1); +//@ cdb-command: t +//@ cdb-check: [...]: match_tuple(29, 1); -// cdb-command: t -// cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { -// cdb-command: t -// cdb-check: [...]: match (a, b) { +//@ cdb-command: t +//@ cdb-check: [...]: match (a, b) { -// cdb-command: t -// cdb-check: [...]: (29, _) => 2, +//@ cdb-command: t +//@ cdb-check: [...]: (29, _) => 2, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_tuple(12, 12); +//@ cdb-command: t +//@ cdb-check: [...]: match_tuple(12, 12); -// cdb-command: t -// cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { -// cdb-command: t -// cdb-check: [...]: match (a, b) { +//@ cdb-command: t +//@ cdb-check: [...]: match (a, b) { -// cdb-command: t -// cdb-check: [...]: (_, _) => 5, +//@ cdb-command: t +//@ cdb-check: [...]: (_, _) => 5, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_tuple(42, 12); +//@ cdb-command: t +//@ cdb-check: [...]: match_tuple(42, 12); -// cdb-command: t -// cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { -// cdb-command: t -// cdb-check: [...]: match (a, b) { +//@ cdb-command: t +//@ cdb-check: [...]: match (a, b) { -// cdb-command: t -// cdb-check: [...]: (42, 12) => 1, +//@ cdb-command: t +//@ cdb-check: [...]: (42, 12) => 1, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: match_tuple(1, 9); +//@ cdb-command: t +//@ cdb-check: [...]: match_tuple(1, 9); -// cdb-command: t -// cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { +//@ cdb-command: t +//@ cdb-check: [...]: fn match_tuple(a: u8, b: i8) -> u32 { -// cdb-command: t -// cdb-check: [...]: match (a, b) { +//@ cdb-command: t +//@ cdb-check: [...]: match (a, b) { -// cdb-command: t -// cdb-check: [...]: (_, 9) => 4, +//@ cdb-command: t +//@ cdb-check: [...]: (_, 9) => 4, -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } -// cdb-command: t -// cdb-check: [...]: } +//@ cdb-command: t +//@ cdb-check: [...]: } fn main() { match_enum(Some(42)); // #break diff --git a/tests/debuginfo/strings-and-strs.rs b/tests/debuginfo/strings-and-strs.rs index 392cf697e110b..3f8dbb2c52444 100644 --- a/tests/debuginfo/strings-and-strs.rs +++ b/tests/debuginfo/strings-and-strs.rs @@ -5,39 +5,39 @@ //@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print plain_string -// gdb-check:$1 = alloc::string::String {vec: alloc::vec::Vec {buf: alloc::raw_vec::RawVec {inner: alloc::raw_vec::RawVecInner {ptr: core::ptr::unique::Unique {pointer: core::ptr::non_null::NonNull {pointer: 0x[...]}, _marker: core::marker::PhantomData}, cap: core::num::niche_types::UsizeNoHighBit (5), alloc: alloc::alloc::Global}, _marker: core::marker::PhantomData}, len: 5}} +//@ gdb-command:print plain_string +//@ gdb-check:$1 = alloc::string::String {vec: alloc::vec::Vec {buf: alloc::raw_vec::RawVec {inner: alloc::raw_vec::RawVecInner {ptr: core::ptr::unique::Unique {pointer: core::ptr::non_null::NonNull {pointer: 0x[...]}, _marker: core::marker::PhantomData}, cap: core::num::niche_types::UsizeNoHighBit (5), alloc: alloc::alloc::Global}, _marker: core::marker::PhantomData}, len: 5}} -// gdb-command:print plain_str -// gdb-check:$2 = "Hello" +//@ gdb-command:print plain_str +//@ gdb-check:$2 = "Hello" -// gdb-command:print str_in_struct -// gdb-check:$3 = strings_and_strs::Foo {inner: "Hello"} +//@ gdb-command:print str_in_struct +//@ gdb-check:$3 = strings_and_strs::Foo {inner: "Hello"} -// gdb-command:print str_in_tuple -// gdb-check:$4 = ("Hello", "World") +//@ gdb-command:print str_in_tuple +//@ gdb-check:$4 = ("Hello", "World") -// gdb-command:print str_in_rc -// gdb-check:$5 = alloc::rc::Rc<&str, alloc::alloc::Global> {ptr: core::ptr::non_null::NonNull> {pointer: 0x[...]}, phantom: core::marker::PhantomData>, alloc: alloc::alloc::Global} +//@ gdb-command:print str_in_rc +//@ gdb-check:$5 = alloc::rc::Rc<&str, alloc::alloc::Global> {ptr: core::ptr::non_null::NonNull> {pointer: 0x[...]}, phantom: core::marker::PhantomData>, alloc: alloc::alloc::Global} // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v plain_string -// lldb-check:(alloc::string::String) plain_string = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } +//@ lldb-command:run +//@ lldb-command:v plain_string +//@ lldb-check:(alloc::string::String) plain_string = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } -// lldb-command:v plain_str -// lldb-check:(&str) plain_str = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } +//@ lldb-command:v plain_str +//@ lldb-check:(&str) plain_str = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } -// lldb-command:v str_in_struct -// lldb-check:((&str, &str)) str_in_tuple = { 0 = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } 1 = "World" { [0] = 'W' [1] = 'o' [2] = 'r' [3] = 'l' [4] = 'd' } } +//@ lldb-command:v str_in_struct +//@ lldb-check:((&str, &str)) str_in_tuple = { 0 = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } 1 = "World" { [0] = 'W' [1] = 'o' [2] = 'r' [3] = 'l' [4] = 'd' } } -// lldb-command:v str_in_tuple -// lldb-check:((&str, &str)) str_in_tuple = { 0 = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } 1 = "World" { [0] = 'W' [1] = 'o' [2] = 'r' [3] = 'l' [4] = 'd' } } +//@ lldb-command:v str_in_tuple +//@ lldb-check:((&str, &str)) str_in_tuple = { 0 = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } 1 = "World" { [0] = 'W' [1] = 'o' [2] = 'r' [3] = 'l' [4] = 'd' } } -// lldb-command:v str_in_rc -// lldb-check:(alloc::rc::Rc<&str, alloc::alloc::Global>) str_in_rc = strong=1, weak=0 { value = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } } +//@ lldb-command:v str_in_rc +//@ lldb-check:(alloc::rc::Rc<&str, alloc::alloc::Global>) str_in_rc = strong=1, weak=0 { value = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs index bd61e7cb14377..fb61a96b8ca7d 100644 --- a/tests/debuginfo/struct-in-enum.rs +++ b/tests/debuginfo/struct-in-enum.rs @@ -6,30 +6,30 @@ // === GDB TESTS =================================================================================== -// gdb-command:set print union on -// gdb-command:run +//@ gdb-command:set print union on +//@ gdb-command:run -// gdb-command:print case1 -// gdb-check:$1 = struct_in_enum::Regular::Case1(0, struct_in_enum::Struct {x: 2088533116, y: 2088533116, z: 31868}) +//@ gdb-command:print case1 +//@ gdb-check:$1 = struct_in_enum::Regular::Case1(0, struct_in_enum::Struct {x: 2088533116, y: 2088533116, z: 31868}) -// gdb-command:print case2 -// gdb-check:$2 = struct_in_enum::Regular::Case2(0, 1229782938247303441, 4369) +//@ gdb-command:print case2 +//@ gdb-check:$2 = struct_in_enum::Regular::Case2(0, 1229782938247303441, 4369) -// gdb-command:print univariant -// gdb-check:$3 = struct_in_enum::Univariant::TheOnlyCase(struct_in_enum::Struct {x: 123, y: 456, z: 789}) +//@ gdb-command:print univariant +//@ gdb-check:$3 = struct_in_enum::Univariant::TheOnlyCase(struct_in_enum::Struct {x: 123, y: 456, z: 789}) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v case1 -// lldb-check:[...] Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }) -// lldb-command:v case2 -// lldb-check:[...] Case2(0, 1229782938247303441, 4369) +//@ lldb-command:v case1 +//@ lldb-check:[...] Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }) +//@ lldb-command:v case2 +//@ lldb-check:[...] Case2(0, 1229782938247303441, 4369) -// lldb-command:v univariant -// lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) +//@ lldb-command:v univariant +//@ lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs index 4f770e7e56c89..e5fa8412af8a1 100644 --- a/tests/debuginfo/struct-in-struct.rs +++ b/tests/debuginfo/struct-in-struct.rs @@ -4,45 +4,45 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print three_simple_structs -// gdb-check:$1 = struct_in_struct::ThreeSimpleStructs {x: struct_in_struct::Simple {x: 1}, y: struct_in_struct::Simple {x: 2}, z: struct_in_struct::Simple {x: 3}} +//@ gdb-command:print three_simple_structs +//@ gdb-check:$1 = struct_in_struct::ThreeSimpleStructs {x: struct_in_struct::Simple {x: 1}, y: struct_in_struct::Simple {x: 2}, z: struct_in_struct::Simple {x: 3}} -// gdb-command:print internal_padding_parent -// gdb-check:$2 = struct_in_struct::InternalPaddingParent {x: struct_in_struct::InternalPadding {x: 4, y: 5}, y: struct_in_struct::InternalPadding {x: 6, y: 7}, z: struct_in_struct::InternalPadding {x: 8, y: 9}} +//@ gdb-command:print internal_padding_parent +//@ gdb-check:$2 = struct_in_struct::InternalPaddingParent {x: struct_in_struct::InternalPadding {x: 4, y: 5}, y: struct_in_struct::InternalPadding {x: 6, y: 7}, z: struct_in_struct::InternalPadding {x: 8, y: 9}} -// gdb-command:print padding_at_end_parent -// gdb-check:$3 = struct_in_struct::PaddingAtEndParent {x: struct_in_struct::PaddingAtEnd {x: 10, y: 11}, y: struct_in_struct::PaddingAtEnd {x: 12, y: 13}, z: struct_in_struct::PaddingAtEnd {x: 14, y: 15}} +//@ gdb-command:print padding_at_end_parent +//@ gdb-check:$3 = struct_in_struct::PaddingAtEndParent {x: struct_in_struct::PaddingAtEnd {x: 10, y: 11}, y: struct_in_struct::PaddingAtEnd {x: 12, y: 13}, z: struct_in_struct::PaddingAtEnd {x: 14, y: 15}} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v three_simple_structs -// lldb-check:[...] { x = { x = 1 } y = { x = 2 } z = { x = 3 } } +//@ lldb-command:v three_simple_structs +//@ lldb-check:[...] { x = { x = 1 } y = { x = 2 } z = { x = 3 } } -// lldb-command:v internal_padding_parent -// lldb-check:[...] { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } +//@ lldb-command:v internal_padding_parent +//@ lldb-check:[...] { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } -// lldb-command:v padding_at_end_parent -// lldb-check:[...] { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } +//@ lldb-command:v padding_at_end_parent +//@ lldb-check:[...] { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } -// lldb-command:v mixed -// lldb-check:[...] { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } +//@ lldb-command:v mixed +//@ lldb-check:[...] { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } -// lldb-command:v bag -// lldb-check:[...] { x = { x = 22 } } +//@ lldb-command:v bag +//@ lldb-check:[...] { x = { x = 22 } } -// lldb-command:v bag_in_bag -// lldb-check:[...] { x = { x = { x = 23 } } } +//@ lldb-command:v bag_in_bag +//@ lldb-check:[...] { x = { x = { x = 23 } } } -// lldb-command:v tjo -// lldb-check:[...] { x = { x = { x = { x = 24 } } } } +//@ lldb-command:v tjo +//@ lldb-check:[...] { x = { x = { x = { x = 24 } } } } -// lldb-command:v tree -// lldb-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } +//@ lldb-command:v tree +//@ lldb-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs index d56c84c4f13bc..67d2602a4046c 100644 --- a/tests/debuginfo/struct-namespace.rs +++ b/tests/debuginfo/struct-namespace.rs @@ -4,16 +4,16 @@ // Check that structs get placed in the correct namespace -// lldb-command:run -// lldb-command:v struct1 -// lldb-check:(struct_namespace::Struct1)[...] -// lldb-command:v struct2 -// lldb-check:(struct_namespace::Struct2)[...] - -// lldb-command:v mod1_struct1 -// lldb-check:(struct_namespace::mod1::Struct1)[...] -// lldb-command:v mod1_struct2 -// lldb-check:(struct_namespace::mod1::Struct2)[...] +//@ lldb-command:run +//@ lldb-command:v struct1 +//@ lldb-check:(struct_namespace::Struct1)[...] +//@ lldb-command:v struct2 +//@ lldb-check:(struct_namespace::Struct2)[...] + +//@ lldb-command:v mod1_struct1 +//@ lldb-check:(struct_namespace::mod1::Struct1)[...] +//@ lldb-command:v mod1_struct2 +//@ lldb-check:(struct_namespace::mod1::Struct2)[...] #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/debuginfo/struct-style-enum.rs b/tests/debuginfo/struct-style-enum.rs index 48ef97896ac15..88f59174b5445 100644 --- a/tests/debuginfo/struct-style-enum.rs +++ b/tests/debuginfo/struct-style-enum.rs @@ -5,37 +5,37 @@ // === GDB TESTS =================================================================================== -// gdb-command:set print union on -// gdb-command:run +//@ gdb-command:set print union on +//@ gdb-command:run -// gdb-command:print case1 -// gdb-check:$1 = struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868} +//@ gdb-command:print case1 +//@ gdb-check:$1 = struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868} -// gdb-command:print case2 -// gdb-check:$2 = struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153} +//@ gdb-command:print case2 +//@ gdb-check:$2 = struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153} -// gdb-command:print case3 -// gdb-check:$3 = struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897} +//@ gdb-command:print case3 +//@ gdb-check:$3 = struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897} -// gdb-command:print univariant -// gdb-check:$4 = struct_style_enum::Univariant::TheOnlyCase{a: -1} +//@ gdb-command:print univariant +//@ gdb-check:$4 = struct_style_enum::Univariant::TheOnlyCase{a: -1} // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v case1 -// lldb-check:(struct_style_enum::Regular) case1 = { value = { a = 0 b = 31868 c = 31868 d = 31868 e = 31868 } $discr$ = 0 } +//@ lldb-command:v case1 +//@ lldb-check:(struct_style_enum::Regular) case1 = { value = { a = 0 b = 31868 c = 31868 d = 31868 e = 31868 } $discr$ = 0 } -// lldb-command:v case2 -// lldb-check:(struct_style_enum::Regular) case2 = { value = { a = 0 b = 286331153 c = 286331153 } $discr$ = 1 } +//@ lldb-command:v case2 +//@ lldb-check:(struct_style_enum::Regular) case2 = { value = { a = 0 b = 286331153 c = 286331153 } $discr$ = 1 } -// lldb-command:v case3 -// lldb-check:(struct_style_enum::Regular) case3 = { value = { a = 0 b = 6438275382588823897 } $discr$ = 2 } +//@ lldb-command:v case3 +//@ lldb-check:(struct_style_enum::Regular) case3 = { value = { a = 0 b = 6438275382588823897 } $discr$ = 2 } -// lldb-command:v univariant -// lldb-check:(struct_style_enum::Univariant) univariant = { value = { a = -1 } } +//@ lldb-command:v univariant +//@ lldb-check:(struct_style_enum::Univariant) univariant = { value = { a = -1 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs index 2cdac43ba500a..a27ac14b369f5 100644 --- a/tests/debuginfo/struct-with-destructor.rs +++ b/tests/debuginfo/struct-with-destructor.rs @@ -4,34 +4,34 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print simple -// gdb-check:$1 = struct_with_destructor::WithDestructor {x: 10, y: 20} +//@ gdb-command:run +//@ gdb-command:print simple +//@ gdb-check:$1 = struct_with_destructor::WithDestructor {x: 10, y: 20} -// gdb-command:print noDestructor -// gdb-check:$2 = struct_with_destructor::NoDestructorGuarded {a: struct_with_destructor::NoDestructor {x: 10, y: 20}, guard: -1} +//@ gdb-command:print noDestructor +//@ gdb-check:$2 = struct_with_destructor::NoDestructorGuarded {a: struct_with_destructor::NoDestructor {x: 10, y: 20}, guard: -1} -// gdb-command:print withDestructor -// gdb-check:$3 = struct_with_destructor::WithDestructorGuarded {a: struct_with_destructor::WithDestructor {x: 10, y: 20}, guard: -1} +//@ gdb-command:print withDestructor +//@ gdb-check:$3 = struct_with_destructor::WithDestructorGuarded {a: struct_with_destructor::WithDestructor {x: 10, y: 20}, guard: -1} -// gdb-command:print nested -// gdb-check:$4 = struct_with_destructor::NestedOuter {a: struct_with_destructor::NestedInner {a: struct_with_destructor::WithDestructor {x: 7890, y: 9870}}} +//@ gdb-command:print nested +//@ gdb-check:$4 = struct_with_destructor::NestedOuter {a: struct_with_destructor::NestedInner {a: struct_with_destructor::WithDestructor {x: 7890, y: 9870}}} // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v simple -// lldb-check:[...] { x = 10 y = 20 } +//@ lldb-command:run +//@ lldb-command:v simple +//@ lldb-check:[...] { x = 10 y = 20 } -// lldb-command:v noDestructor -// lldb-check:[...] { a = { x = 10 y = 20 } guard = -1 } +//@ lldb-command:v noDestructor +//@ lldb-check:[...] { a = { x = 10 y = 20 } guard = -1 } -// lldb-command:v withDestructor -// lldb-check:[...] { a = { x = 10 y = 20 } guard = -1 } +//@ lldb-command:v withDestructor +//@ lldb-check:[...] { a = { x = 10 y = 20 } guard = -1 } -// lldb-command:v nested -// lldb-check:[...] { a = { a = { x = 7890 y = 9870 } } } +//@ lldb-command:v nested +//@ lldb-check:[...] { a = { a = { x = 7890 y = 9870 } } } #![allow(unused_variables)] diff --git a/tests/debuginfo/thread-names.rs b/tests/debuginfo/thread-names.rs index 265b9271cf306..19d27f55f80de 100644 --- a/tests/debuginfo/thread-names.rs +++ b/tests/debuginfo/thread-names.rs @@ -8,28 +8,28 @@ // === GDB TESTS ================================================================================== // -// gdb-command:run +//@ gdb-command:run // -// gdb-command:info threads -// gdb-check: 1 Thread [...] [...] "main" [...] -// gdb-check:* 2 Thread [...] [...] "my new thread" [...] +//@ gdb-command:info threads +//@ gdb-check: 1 Thread [...] [...] "main" [...] +//@ gdb-check:* 2 Thread [...] [...] "my new thread" [...] // === LLDB TESTS ================================================================================= // -// lldb-command:run +//@ lldb-command:run // -// lldb-command:thread info 1 -// lldb-check:thread #1:[...]name = 'main'[...] -// lldb-command:thread info 2 -// lldb-check:thread #2:[...]name = 'my new thread'[...] +//@ lldb-command:thread info 1 +//@ lldb-check:thread #1:[...]name = 'main'[...] +//@ lldb-command:thread info 2 +//@ lldb-check:thread #2:[...]name = 'my new thread'[...] // === CDB TESTS ================================================================================== // -// cdb-command:g +//@ cdb-command:g // -// cdb-command:~ -// cdb-check: 0 Id: [...] Suspend: 1 Teb: [...] Unfrozen "main" -// cdb-check:. [...] Id: [...] Suspend: 1 Teb: [...] Unfrozen "my new thread" +//@ cdb-command:~ +//@ cdb-check: 0 Id: [...] Suspend: 1 Teb: [...] Unfrozen "main" +//@ cdb-check:. [...] Id: [...] Suspend: 1 Teb: [...] Unfrozen "my new thread" use std::thread; diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs index 0415f586f5d90..5120da62f2ab9 100644 --- a/tests/debuginfo/thread.rs +++ b/tests/debuginfo/thread.rs @@ -6,15 +6,15 @@ // === CDB TESTS ================================================================================== // -// cdb-command:g +//@ cdb-command:g // -// cdb-command:dx join_handle,d -// cdb-check:join_handle,d [Type: std::thread::JoinHandle >] -// cdb-check: [...] __0 [Type: std::thread::JoinInner >] +//@ cdb-command:dx join_handle,d +//@ cdb-check:join_handle,d [Type: std::thread::JoinHandle >] +//@ cdb-check: [...] __0 [Type: std::thread::JoinInner >] // -// cdb-command:dx t,d -// cdb-check:t,d : [...] [Type: std::thread::Thread *] -// cdb-check:[...] inner [...][Type: core::pin::Pin >] +//@ cdb-command:dx t,d +//@ cdb-check:t,d : [...] [Type: std::thread::Thread *] +//@ cdb-check:[...] inner [...][Type: core::pin::Pin >] use std::thread; diff --git a/tests/debuginfo/trait-pointers.rs b/tests/debuginfo/trait-pointers.rs index 5cdefe94e5075..c79b212b08f5a 100644 --- a/tests/debuginfo/trait-pointers.rs +++ b/tests/debuginfo/trait-pointers.rs @@ -1,7 +1,7 @@ //@ compile-flags:-g //@ disable-gdb-pretty-printers -// gdb-command:run -// lldb-command:run +//@ gdb-command:run +//@ lldb-command:run #![allow(unused_variables)] diff --git a/tests/debuginfo/tuple-in-struct.rs b/tests/debuginfo/tuple-in-struct.rs index 3223532b16a42..4a80b56cf7cbc 100644 --- a/tests/debuginfo/tuple-in-struct.rs +++ b/tests/debuginfo/tuple-in-struct.rs @@ -2,32 +2,32 @@ //@ disable-gdb-pretty-printers //@ ignore-backends: gcc -// gdb-command:run - -// gdb-command:print no_padding1 -// gdb-check:$1 = tuple_in_struct::NoPadding1 {x: (0, 1), y: 2, z: (3, 4, 5)} -// gdb-command:print no_padding2 -// gdb-check:$2 = tuple_in_struct::NoPadding2 {x: (6, 7), y: ((8, 9), 10)} - -// gdb-command:print tuple_internal_padding -// gdb-check:$3 = tuple_in_struct::TupleInternalPadding {x: (11, 12), y: (13, 14)} -// gdb-command:print struct_internal_padding -// gdb-check:$4 = tuple_in_struct::StructInternalPadding {x: (15, 16), y: (17, 18)} -// gdb-command:print both_internally_padded -// gdb-check:$5 = tuple_in_struct::BothInternallyPadded {x: (19, 20, 21), y: (22, 23)} - -// gdb-command:print single_tuple -// gdb-check:$6 = tuple_in_struct::SingleTuple {x: (24, 25, 26)} - -// gdb-command:print tuple_padded_at_end -// gdb-check:$7 = tuple_in_struct::TuplePaddedAtEnd {x: (27, 28), y: (29, 30)} -// gdb-command:print struct_padded_at_end -// gdb-check:$8 = tuple_in_struct::StructPaddedAtEnd {x: (31, 32), y: (33, 34)} -// gdb-command:print both_padded_at_end -// gdb-check:$9 = tuple_in_struct::BothPaddedAtEnd {x: (35, 36, 37), y: (38, 39)} - -// gdb-command:print mixed_padding -// gdb-check:$10 = tuple_in_struct::MixedPadding {x: ((40, 41, 42), (43, 44)), y: (45, 46, 47, 48)} +//@ gdb-command:run + +//@ gdb-command:print no_padding1 +//@ gdb-check:$1 = tuple_in_struct::NoPadding1 {x: (0, 1), y: 2, z: (3, 4, 5)} +//@ gdb-command:print no_padding2 +//@ gdb-check:$2 = tuple_in_struct::NoPadding2 {x: (6, 7), y: ((8, 9), 10)} + +//@ gdb-command:print tuple_internal_padding +//@ gdb-check:$3 = tuple_in_struct::TupleInternalPadding {x: (11, 12), y: (13, 14)} +//@ gdb-command:print struct_internal_padding +//@ gdb-check:$4 = tuple_in_struct::StructInternalPadding {x: (15, 16), y: (17, 18)} +//@ gdb-command:print both_internally_padded +//@ gdb-check:$5 = tuple_in_struct::BothInternallyPadded {x: (19, 20, 21), y: (22, 23)} + +//@ gdb-command:print single_tuple +//@ gdb-check:$6 = tuple_in_struct::SingleTuple {x: (24, 25, 26)} + +//@ gdb-command:print tuple_padded_at_end +//@ gdb-check:$7 = tuple_in_struct::TuplePaddedAtEnd {x: (27, 28), y: (29, 30)} +//@ gdb-command:print struct_padded_at_end +//@ gdb-check:$8 = tuple_in_struct::StructPaddedAtEnd {x: (31, 32), y: (33, 34)} +//@ gdb-command:print both_padded_at_end +//@ gdb-check:$9 = tuple_in_struct::BothPaddedAtEnd {x: (35, 36, 37), y: (38, 39)} + +//@ gdb-command:print mixed_padding +//@ gdb-check:$10 = tuple_in_struct::MixedPadding {x: ((40, 41, 42), (43, 44)), y: (45, 46, 47, 48)} #![allow(unused_variables)] diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs index e906cbed67db7..f3ca72d7e5358 100644 --- a/tests/debuginfo/tuple-in-tuple.rs +++ b/tests/debuginfo/tuple-in-tuple.rs @@ -4,113 +4,113 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print no_padding1 -// gdb-check:$1 = ((0, 1), 2, 3) -// gdb-command:print no_padding2 -// gdb-check:$2 = (4, (5, 6), 7) -// gdb-command:print no_padding3 -// gdb-check:$3 = (8, 9, (10, 11)) +//@ gdb-command:print no_padding1 +//@ gdb-check:$1 = ((0, 1), 2, 3) +//@ gdb-command:print no_padding2 +//@ gdb-check:$2 = (4, (5, 6), 7) +//@ gdb-command:print no_padding3 +//@ gdb-check:$3 = (8, 9, (10, 11)) -// gdb-command:print internal_padding1 -// gdb-check:$4 = (12, (13, 14)) -// gdb-command:print internal_padding2 -// gdb-check:$5 = (15, (16, 17)) +//@ gdb-command:print internal_padding1 +//@ gdb-check:$4 = (12, (13, 14)) +//@ gdb-command:print internal_padding2 +//@ gdb-check:$5 = (15, (16, 17)) -// gdb-command:print padding_at_end1 -// gdb-check:$6 = (18, (19, 20)) -// gdb-command:print padding_at_end2 -// gdb-check:$7 = ((21, 22), 23) +//@ gdb-command:print padding_at_end1 +//@ gdb-check:$6 = (18, (19, 20)) +//@ gdb-command:print padding_at_end2 +//@ gdb-check:$7 = ((21, 22), 23) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v no_padding1 -// lldb-check:[...] { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } -// lldb-command:v no_padding2 -// lldb-check:[...] { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } -// lldb-command:v no_padding3 -// lldb-check:[...] { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } +//@ lldb-command:v no_padding1 +//@ lldb-check:[...] { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } +//@ lldb-command:v no_padding2 +//@ lldb-check:[...] { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } +//@ lldb-command:v no_padding3 +//@ lldb-check:[...] { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } -// lldb-command:v internal_padding1 -// lldb-check:[...] { 0 = 12 1 = { 0 = 13 1 = 14 } } -// lldb-command:v internal_padding2 -// lldb-check:[...] { 0 = 15 1 = { 0 = 16 1 = 17 } } +//@ lldb-command:v internal_padding1 +//@ lldb-check:[...] { 0 = 12 1 = { 0 = 13 1 = 14 } } +//@ lldb-command:v internal_padding2 +//@ lldb-check:[...] { 0 = 15 1 = { 0 = 16 1 = 17 } } -// lldb-command:v padding_at_end1 -// lldb-check:[...] { 0 = 18 1 = { 0 = 19 1 = 20 } } -// lldb-command:v padding_at_end2 -// lldb-check:[...] { 0 = { 0 = 21 1 = 22 } 1 = 23 } +//@ lldb-command:v padding_at_end1 +//@ lldb-check:[...] { 0 = 18 1 = { 0 = 19 1 = 20 } } +//@ lldb-command:v padding_at_end2 +//@ lldb-check:[...] { 0 = { 0 = 21 1 = 22 } 1 = 23 } // === CDB TESTS ================================================================================== -// cdb-command: g - -// cdb-command:dx no_padding1,d -// cdb-check:no_padding1,d [...]: ((0, 1), 2, 3) [Type: tuple$,u32,u32>] -// cdb-check:[...][0] : (0, 1) [Type: tuple$] -// cdb-check:[...][1] : 2 [Type: [...]] -// cdb-check:[...][2] : 3 [Type: [...]] -// cdb-command:dx no_padding1.__0,d -// cdb-check:no_padding1.__0,d [...]: (0, 1) [Type: tuple$] -// cdb-check:[...][0] : 0 [Type: [...]] -// cdb-check:[...][1] : 1 [Type: [...]] -// cdb-command:dx no_padding2,d -// cdb-check:no_padding2,d [...]: (4, (5, 6), 7) [Type: tuple$,u32>] -// cdb-check:[...][0] : 4 [Type: [...]] -// cdb-check:[...][1] : (5, 6) [Type: tuple$] -// cdb-check:[...][2] : 7 [Type: [...]] -// cdb-command:dx no_padding2.__1,d -// cdb-check:no_padding2.__1,d [...]: (5, 6) [Type: tuple$] -// cdb-check:[...][0] : 5 [Type: [...]] -// cdb-check:[...][1] : 6 [Type: [...]] -// cdb-command:dx no_padding3,d -// cdb-check:no_padding3,d [...]: (8, 9, (10, 11)) [Type: tuple$ >] -// cdb-check:[...][0] : 8 [Type: [...]] -// cdb-check:[...][1] : 9 [Type: [...]] -// cdb-check:[...][2] : (10, 11) [Type: tuple$] -// cdb-command:dx no_padding3.__2,d -// cdb-check:no_padding3.__2,d [...]: (10, 11) [Type: tuple$] -// cdb-check:[...][0] : 10 [Type: [...]] -// cdb-check:[...][1] : 11 [Type: [...]] - -// cdb-command:dx internal_padding1,d -// cdb-check:internal_padding1,d [...]: (12, (13, 14)) [Type: tuple$ >] -// cdb-check:[...][0] : 12 [Type: [...]] -// cdb-check:[...][1] : (13, 14) [Type: tuple$] -// cdb-command:dx internal_padding1.__1,d -// cdb-check:internal_padding1.__1,d [...]: (13, 14) [Type: tuple$] -// cdb-check:[...][0] : 13 [Type: [...]] -// cdb-check:[...][1] : 14 [Type: [...]] -// cdb-command:dx internal_padding2,d -// cdb-check:internal_padding2,d [...]: (15, (16, 17)) [Type: tuple$ >] -// cdb-check:[...][0] : 15 [Type: [...]] -// cdb-check:[...][1] : (16, 17) [Type: tuple$] -// cdb-command:dx internal_padding2.__1,d -// cdb-check:internal_padding2.__1,d [...]: (16, 17) [Type: tuple$] -// cdb-check:[...][0] : 16 [Type: [...]] -// cdb-check:[...][1] : 17 [Type: [...]] - -// cdb-command:dx padding_at_end1,d -// cdb-check:padding_at_end1,d [...]: (18, (19, 20)) [Type: tuple$ >] -// cdb-check:[...][0] : 18 [Type: [...]] -// cdb-check:[...][1] : (19, 20) [Type: tuple$] -// cdb-command:dx padding_at_end1.__1,d -// cdb-check:padding_at_end1.__1,d [...][Type: tuple$] -// cdb-check:[...][0] : 19 [Type: [...]] -// cdb-check:[...][1] : 20 [Type: [...]] -// cdb-command:dx padding_at_end2,d -// cdb-check:padding_at_end2,d [...]: ((21, 22), 23) [Type: tuple$,i32>] -// cdb-check:[...][0] : (21, 22) [Type: tuple$] -// cdb-check:[...][1] : 23 [Type: [...]] -// cdb-command:dx padding_at_end2.__0,d -// cdb-check:padding_at_end2.__0,d [...]: (21, 22) [Type: tuple$] -// cdb-check:[...][0] : 21 [Type: [...]] -// cdb-check:[...][1] : 22 [Type: [...]] +//@ cdb-command: g + +//@ cdb-command:dx no_padding1,d +//@ cdb-check:no_padding1,d [...]: ((0, 1), 2, 3) [Type: tuple$,u32,u32>] +//@ cdb-check:[...][0] : (0, 1) [Type: tuple$] +//@ cdb-check:[...][1] : 2 [Type: [...]] +//@ cdb-check:[...][2] : 3 [Type: [...]] +//@ cdb-command:dx no_padding1.__0,d +//@ cdb-check:no_padding1.__0,d [...]: (0, 1) [Type: tuple$] +//@ cdb-check:[...][0] : 0 [Type: [...]] +//@ cdb-check:[...][1] : 1 [Type: [...]] +//@ cdb-command:dx no_padding2,d +//@ cdb-check:no_padding2,d [...]: (4, (5, 6), 7) [Type: tuple$,u32>] +//@ cdb-check:[...][0] : 4 [Type: [...]] +//@ cdb-check:[...][1] : (5, 6) [Type: tuple$] +//@ cdb-check:[...][2] : 7 [Type: [...]] +//@ cdb-command:dx no_padding2.__1,d +//@ cdb-check:no_padding2.__1,d [...]: (5, 6) [Type: tuple$] +//@ cdb-check:[...][0] : 5 [Type: [...]] +//@ cdb-check:[...][1] : 6 [Type: [...]] +//@ cdb-command:dx no_padding3,d +//@ cdb-check:no_padding3,d [...]: (8, 9, (10, 11)) [Type: tuple$ >] +//@ cdb-check:[...][0] : 8 [Type: [...]] +//@ cdb-check:[...][1] : 9 [Type: [...]] +//@ cdb-check:[...][2] : (10, 11) [Type: tuple$] +//@ cdb-command:dx no_padding3.__2,d +//@ cdb-check:no_padding3.__2,d [...]: (10, 11) [Type: tuple$] +//@ cdb-check:[...][0] : 10 [Type: [...]] +//@ cdb-check:[...][1] : 11 [Type: [...]] + +//@ cdb-command:dx internal_padding1,d +//@ cdb-check:internal_padding1,d [...]: (12, (13, 14)) [Type: tuple$ >] +//@ cdb-check:[...][0] : 12 [Type: [...]] +//@ cdb-check:[...][1] : (13, 14) [Type: tuple$] +//@ cdb-command:dx internal_padding1.__1,d +//@ cdb-check:internal_padding1.__1,d [...]: (13, 14) [Type: tuple$] +//@ cdb-check:[...][0] : 13 [Type: [...]] +//@ cdb-check:[...][1] : 14 [Type: [...]] +//@ cdb-command:dx internal_padding2,d +//@ cdb-check:internal_padding2,d [...]: (15, (16, 17)) [Type: tuple$ >] +//@ cdb-check:[...][0] : 15 [Type: [...]] +//@ cdb-check:[...][1] : (16, 17) [Type: tuple$] +//@ cdb-command:dx internal_padding2.__1,d +//@ cdb-check:internal_padding2.__1,d [...]: (16, 17) [Type: tuple$] +//@ cdb-check:[...][0] : 16 [Type: [...]] +//@ cdb-check:[...][1] : 17 [Type: [...]] + +//@ cdb-command:dx padding_at_end1,d +//@ cdb-check:padding_at_end1,d [...]: (18, (19, 20)) [Type: tuple$ >] +//@ cdb-check:[...][0] : 18 [Type: [...]] +//@ cdb-check:[...][1] : (19, 20) [Type: tuple$] +//@ cdb-command:dx padding_at_end1.__1,d +//@ cdb-check:padding_at_end1.__1,d [...][Type: tuple$] +//@ cdb-check:[...][0] : 19 [Type: [...]] +//@ cdb-check:[...][1] : 20 [Type: [...]] +//@ cdb-command:dx padding_at_end2,d +//@ cdb-check:padding_at_end2,d [...]: ((21, 22), 23) [Type: tuple$,i32>] +//@ cdb-check:[...][0] : (21, 22) [Type: tuple$] +//@ cdb-check:[...][1] : 23 [Type: [...]] +//@ cdb-command:dx padding_at_end2.__0,d +//@ cdb-check:padding_at_end2.__0,d [...]: (21, 22) [Type: tuple$] +//@ cdb-check:[...][0] : 21 [Type: [...]] +//@ cdb-check:[...][1] : 22 [Type: [...]] #![allow(unused_variables)] diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs index 44fc862c43c93..9992732b82080 100644 --- a/tests/debuginfo/tuple-struct.rs +++ b/tests/debuginfo/tuple-struct.rs @@ -4,48 +4,48 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print no_padding16 -// gdb-check:$1 = tuple_struct::NoPadding16 (10000, -10001) +//@ gdb-command:print no_padding16 +//@ gdb-check:$1 = tuple_struct::NoPadding16 (10000, -10001) -// gdb-command:print no_padding32 -// gdb-check:$2 = tuple_struct::NoPadding32 (-10002, -10003.5, 10004) +//@ gdb-command:print no_padding32 +//@ gdb-check:$2 = tuple_struct::NoPadding32 (-10002, -10003.5, 10004) -// gdb-command:print no_padding64 -// gdb-check:$3 = tuple_struct::NoPadding64 (-10005.5, 10006, 10007) +//@ gdb-command:print no_padding64 +//@ gdb-check:$3 = tuple_struct::NoPadding64 (-10005.5, 10006, 10007) -// gdb-command:print no_padding163264 -// gdb-check:$4 = tuple_struct::NoPadding163264 (-10008, 10009, 10010, 10011) +//@ gdb-command:print no_padding163264 +//@ gdb-check:$4 = tuple_struct::NoPadding163264 (-10008, 10009, 10010, 10011) -// gdb-command:print internal_padding -// gdb-check:$5 = tuple_struct::InternalPadding (10012, -10013) +//@ gdb-command:print internal_padding +//@ gdb-check:$5 = tuple_struct::InternalPadding (10012, -10013) -// gdb-command:print padding_at_end -// gdb-check:$6 = tuple_struct::PaddingAtEnd (-10014, 10015) +//@ gdb-command:print padding_at_end +//@ gdb-check:$6 = tuple_struct::PaddingAtEnd (-10014, 10015) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v no_padding16 -// lldb-check:[...] { 0 = 10000 1 = -10001 } +//@ lldb-command:v no_padding16 +//@ lldb-check:[...] { 0 = 10000 1 = -10001 } -// lldb-command:v no_padding32 -// lldb-check:[...] { 0 = -10002 1 = -10003.5 2 = 10004 } +//@ lldb-command:v no_padding32 +//@ lldb-check:[...] { 0 = -10002 1 = -10003.5 2 = 10004 } -// lldb-command:v no_padding64 -// lldb-check:[...] { 0 = -10005.5 1 = 10006 2 = 10007 } +//@ lldb-command:v no_padding64 +//@ lldb-check:[...] { 0 = -10005.5 1 = 10006 2 = 10007 } -// lldb-command:v no_padding163264 -// lldb-check:[...] { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } +//@ lldb-command:v no_padding163264 +//@ lldb-check:[...] { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } -// lldb-command:v internal_padding -// lldb-check:[...] { 0 = 10012 1 = -10013 } +//@ lldb-command:v internal_padding +//@ lldb-check:[...] { 0 = 10012 1 = -10013 } -// lldb-command:v padding_at_end -// lldb-check:[...] { 0 = -10014 1 = 10015 } +//@ lldb-command:v padding_at_end +//@ lldb-check:[...] { 0 = -10014 1 = 10015 } // This test case mainly makes sure that no field names are generated for tuple structs (as opposed // to all fields having the name ""). Otherwise they are handled the same a normal diff --git a/tests/debuginfo/tuple-style-enum.rs b/tests/debuginfo/tuple-style-enum.rs index a452c57b30423..b03cd8c1b386e 100644 --- a/tests/debuginfo/tuple-style-enum.rs +++ b/tests/debuginfo/tuple-style-enum.rs @@ -6,37 +6,37 @@ // === GDB TESTS =================================================================================== -// gdb-command:set print union on -// gdb-command:run +//@ gdb-command:set print union on +//@ gdb-command:run -// gdb-command:print case1 -// gdb-check:$1 = tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868) +//@ gdb-command:print case1 +//@ gdb-check:$1 = tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868) -// gdb-command:print case2 -// gdb-check:$2 = tuple_style_enum::Regular::Case2(0, 286331153, 286331153) +//@ gdb-command:print case2 +//@ gdb-check:$2 = tuple_style_enum::Regular::Case2(0, 286331153, 286331153) -// gdb-command:print case3 -// gdb-check:$3 = tuple_style_enum::Regular::Case3(0, 6438275382588823897) +//@ gdb-command:print case3 +//@ gdb-check:$3 = tuple_style_enum::Regular::Case3(0, 6438275382588823897) -// gdb-command:print univariant -// gdb-check:$4 = tuple_style_enum::Univariant::TheOnlyCase(-1) +//@ gdb-command:print univariant +//@ gdb-check:$4 = tuple_style_enum::Univariant::TheOnlyCase(-1) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v case1 -// lldb-check:(tuple_style_enum::Regular) case1 = { value = { 0 = 0 1 = 31868 2 = 31868 3 = 31868 4 = 31868 } $discr$ = 0 } +//@ lldb-command:v case1 +//@ lldb-check:(tuple_style_enum::Regular) case1 = { value = { 0 = 0 1 = 31868 2 = 31868 3 = 31868 4 = 31868 } $discr$ = 0 } -// lldb-command:v case2 -// lldb-check:(tuple_style_enum::Regular) case2 = { value = { 0 = 0 1 = 286331153 2 = 286331153 } $discr$ = 1 } +//@ lldb-command:v case2 +//@ lldb-check:(tuple_style_enum::Regular) case2 = { value = { 0 = 0 1 = 286331153 2 = 286331153 } $discr$ = 1 } -// lldb-command:v case3 -// lldb-check:(tuple_style_enum::Regular) case3 = { value = { 0 = 0 1 = 6438275382588823897 } $discr$ = 2 } +//@ lldb-command:v case3 +//@ lldb-check:(tuple_style_enum::Regular) case3 = { value = { 0 = 0 1 = 6438275382588823897 } $discr$ = 2 } -// lldb-command:v univariant -// lldb-check:(tuple_style_enum::Univariant) univariant = { value = { 0 = -1 } } +//@ lldb-command:v univariant +//@ lldb-check:(tuple_style_enum::Univariant) univariant = { value = { 0 = -1 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/type-names.rs b/tests/debuginfo/type-names.rs index 341112b0b88e2..3b15e0541867e 100644 --- a/tests/debuginfo/type-names.rs +++ b/tests/debuginfo/type-names.rs @@ -11,266 +11,266 @@ // === GDB TESTS ================================================================================== -// gdb-command:run +//@ gdb-command:run // STRUCTS -// gdb-command:whatis simple_struct -// gdb-check:type = type_names::Struct1 +//@ gdb-command:whatis simple_struct +//@ gdb-check:type = type_names::Struct1 -// gdb-command:whatis generic_struct1 -// gdb-check:type = type_names::GenericStruct +//@ gdb-command:whatis generic_struct1 +//@ gdb-check:type = type_names::GenericStruct -// gdb-command:whatis generic_struct2 -// gdb-check:type = type_names::GenericStruct usize> +//@ gdb-command:whatis generic_struct2 +//@ gdb-check:type = type_names::GenericStruct usize> -// gdb-command:whatis mod_struct -// gdb-check:type = type_names::mod1::Struct2 +//@ gdb-command:whatis mod_struct +//@ gdb-check:type = type_names::mod1::Struct2 // ENUMS -// gdb-command:whatis simple_enum_1 -// gdb-check:type = type_names::Enum1 +//@ gdb-command:whatis simple_enum_1 +//@ gdb-check:type = type_names::Enum1 -// gdb-command:whatis simple_enum_2 -// gdb-check:type = type_names::Enum1 +//@ gdb-command:whatis simple_enum_2 +//@ gdb-check:type = type_names::Enum1 -// gdb-command:whatis simple_enum_3 -// gdb-check:type = type_names::mod1::Enum2 +//@ gdb-command:whatis simple_enum_3 +//@ gdb-check:type = type_names::mod1::Enum2 -// gdb-command:whatis generic_enum_1 -// gdb-check:type = type_names::mod1::mod2::Enum3 +//@ gdb-command:whatis generic_enum_1 +//@ gdb-check:type = type_names::mod1::mod2::Enum3 -// gdb-command:whatis generic_enum_2 -// gdb-check:type = type_names::mod1::mod2::Enum3 +//@ gdb-command:whatis generic_enum_2 +//@ gdb-check:type = type_names::mod1::mod2::Enum3 // TUPLES -// gdb-command:whatis tuple1 -// gdb-check:type = (u32, type_names::Struct1, type_names::mod1::mod2::Enum3) +//@ gdb-command:whatis tuple1 +//@ gdb-check:type = (u32, type_names::Struct1, type_names::mod1::mod2::Enum3) -// gdb-command:whatis tuple2 -// gdb-check:type = ((type_names::Struct1, type_names::mod1::mod2::Struct3), type_names::mod1::Enum2, char) +//@ gdb-command:whatis tuple2 +//@ gdb-check:type = ((type_names::Struct1, type_names::mod1::mod2::Struct3), type_names::mod1::Enum2, char) // BOX -// gdb-command:whatis box1 -// gdb-check:type = (alloc::boxed::Box, i32) +//@ gdb-command:whatis box1 +//@ gdb-check:type = (alloc::boxed::Box, i32) -// gdb-command:whatis box2 -// gdb-check:type = (alloc::boxed::Box, alloc::alloc::Global>, i32) +//@ gdb-command:whatis box2 +//@ gdb-check:type = (alloc::boxed::Box, alloc::alloc::Global>, i32) // REFERENCES -// gdb-command:whatis ref1 -// gdb-check:type = (&type_names::Struct1, i32) +//@ gdb-command:whatis ref1 +//@ gdb-check:type = (&type_names::Struct1, i32) -// gdb-command:whatis ref2 -// gdb-check:type = (&type_names::GenericStruct, i32) +//@ gdb-command:whatis ref2 +//@ gdb-check:type = (&type_names::GenericStruct, i32) -// gdb-command:whatis mut_ref1 -// gdb-check:type = (&mut type_names::Struct1, i32) +//@ gdb-command:whatis mut_ref1 +//@ gdb-check:type = (&mut type_names::Struct1, i32) -// gdb-command:whatis mut_ref2 -// gdb-check:type = (&mut type_names::GenericStruct, i32) +//@ gdb-command:whatis mut_ref2 +//@ gdb-check:type = (&mut type_names::GenericStruct, i32) // RAW POINTERS -// gdb-command:whatis mut_ptr1 -// gdb-check:type = (*mut type_names::Struct1, isize) +//@ gdb-command:whatis mut_ptr1 +//@ gdb-check:type = (*mut type_names::Struct1, isize) -// gdb-command:whatis mut_ptr2 -// gdb-check:type = (*mut isize, isize) +//@ gdb-command:whatis mut_ptr2 +//@ gdb-check:type = (*mut isize, isize) -// gdb-command:whatis mut_ptr3 -// gdb-check:type = (*mut type_names::mod1::mod2::Enum3, isize) +//@ gdb-command:whatis mut_ptr3 +//@ gdb-check:type = (*mut type_names::mod1::mod2::Enum3, isize) -// gdb-command:whatis const_ptr1 -// gdb-check:type = (*const type_names::Struct1, isize) +//@ gdb-command:whatis const_ptr1 +//@ gdb-check:type = (*const type_names::Struct1, isize) -// gdb-command:whatis const_ptr2 -// gdb-check:type = (*const isize, isize) +//@ gdb-command:whatis const_ptr2 +//@ gdb-check:type = (*const isize, isize) -// gdb-command:whatis const_ptr3 -// gdb-check:type = (*const type_names::mod1::mod2::Enum3, isize) +//@ gdb-command:whatis const_ptr3 +//@ gdb-check:type = (*const type_names::mod1::mod2::Enum3, isize) // VECTORS -// gdb-command:whatis fixed_size_vec1 -// gdb-check:type = ([type_names::Struct1; 3], i16) +//@ gdb-command:whatis fixed_size_vec1 +//@ gdb-check:type = ([type_names::Struct1; 3], i16) -// gdb-command:whatis fixed_size_vec2 -// gdb-check:type = ([usize; 3], i16) +//@ gdb-command:whatis fixed_size_vec2 +//@ gdb-check:type = ([usize; 3], i16) -// gdb-command:whatis slice1 -// gdb-check:type = &[usize] +//@ gdb-command:whatis slice1 +//@ gdb-check:type = &[usize] -// gdb-command:whatis slice2 -// gdb-check:type = &mut [type_names::mod1::Enum2] +//@ gdb-command:whatis slice2 +//@ gdb-check:type = &mut [type_names::mod1::Enum2] // TRAITS -// gdb-command:whatis box_trait -// gdb-check:type = alloc::boxed::Box +//@ gdb-command:whatis box_trait +//@ gdb-check:type = alloc::boxed::Box -// gdb-command:whatis ref_trait -// gdb-check:type = &dyn type_names::Trait1 +//@ gdb-command:whatis ref_trait +//@ gdb-check:type = &dyn type_names::Trait1 -// gdb-command:whatis mut_ref_trait -// gdb-check:type = &mut dyn type_names::Trait1 +//@ gdb-command:whatis mut_ref_trait +//@ gdb-check:type = &mut dyn type_names::Trait1 -// gdb-command:whatis generic_box_trait -// gdb-check:type = alloc::boxed::Box, alloc::alloc::Global> +//@ gdb-command:whatis generic_box_trait +//@ gdb-check:type = alloc::boxed::Box, alloc::alloc::Global> -// gdb-command:whatis generic_ref_trait -// gdb-check:type = &dyn type_names::Trait2 +//@ gdb-command:whatis generic_ref_trait +//@ gdb-check:type = &dyn type_names::Trait2 -// gdb-command:whatis generic_mut_ref_trait -// gdb-check:type = &mut dyn type_names::Trait2> +//@ gdb-command:whatis generic_mut_ref_trait +//@ gdb-check:type = &mut dyn type_names::Trait2> -// gdb-command:whatis no_principal_trait -// gdb-check:type = alloc::boxed::Box<(dyn core::marker::Send + core::marker::Sync), alloc::alloc::Global> +//@ gdb-command:whatis no_principal_trait +//@ gdb-check:type = alloc::boxed::Box<(dyn core::marker::Send + core::marker::Sync), alloc::alloc::Global> -// gdb-command:whatis has_associated_type_trait -// gdb-check:type = &(dyn type_names::Trait3 + core::marker::Send) +//@ gdb-command:whatis has_associated_type_trait +//@ gdb-check:type = &(dyn type_names::Trait3 + core::marker::Send) -// gdb-command:whatis has_associated_type_but_no_generics_trait -// gdb-check:type = &dyn type_names::TraitNoGenericsButWithAssocType +//@ gdb-command:whatis has_associated_type_but_no_generics_trait +//@ gdb-check:type = &dyn type_names::TraitNoGenericsButWithAssocType // BARE FUNCTIONS -// gdb-command:whatis rust_fn -// gdb-check:type = (fn(core::option::Option, core::option::Option<&type_names::mod1::Struct2>), usize) +//@ gdb-command:whatis rust_fn +//@ gdb-check:type = (fn(core::option::Option, core::option::Option<&type_names::mod1::Struct2>), usize) -// gdb-command:whatis extern_c_fn -// gdb-check:type = (extern "C" fn(isize), usize) +//@ gdb-command:whatis extern_c_fn +//@ gdb-check:type = (extern "C" fn(isize), usize) -// gdb-command:whatis unsafe_fn -// gdb-check:type = (unsafe fn(core::result::Result), usize) +//@ gdb-command:whatis unsafe_fn +//@ gdb-check:type = (unsafe fn(core::result::Result), usize) -// gdb-command:whatis rust_fn_with_return_value -// gdb-check:type = (fn(f64) -> usize, usize) +//@ gdb-command:whatis rust_fn_with_return_value +//@ gdb-check:type = (fn(f64) -> usize, usize) -// gdb-command:whatis extern_c_fn_with_return_value -// gdb-check:type = (extern "C" fn() -> type_names::Struct1, usize) +//@ gdb-command:whatis extern_c_fn_with_return_value +//@ gdb-check:type = (extern "C" fn() -> type_names::Struct1, usize) -// gdb-command:whatis unsafe_fn_with_return_value -// gdb-check:type = (unsafe fn(type_names::GenericStruct) -> type_names::mod1::Struct2, usize) +//@ gdb-command:whatis unsafe_fn_with_return_value +//@ gdb-check:type = (unsafe fn(type_names::GenericStruct) -> type_names::mod1::Struct2, usize) -// gdb-command:whatis generic_function_int -// gdb-check:type = (fn(isize) -> isize, usize) +//@ gdb-command:whatis generic_function_int +//@ gdb-check:type = (fn(isize) -> isize, usize) -// gdb-command:whatis generic_function_struct3 -// gdb-check:type = (fn(type_names::mod1::mod2::Struct3) -> type_names::mod1::mod2::Struct3, usize) +//@ gdb-command:whatis generic_function_struct3 +//@ gdb-check:type = (fn(type_names::mod1::mod2::Struct3) -> type_names::mod1::mod2::Struct3, usize) -// gdb-command:whatis variadic_function -// gdb-check:type = (unsafe extern "C" fn(*const u8, ...) -> isize, usize) +//@ gdb-command:whatis variadic_function +//@ gdb-check:type = (unsafe extern "C" fn(*const u8, ...) -> isize, usize) // CLOSURES -// gdb-command:whatis closure1 -// gdb-check:type = (type_names::main::{closure_env#0}, usize) +//@ gdb-command:whatis closure1 +//@ gdb-check:type = (type_names::main::{closure_env#0}, usize) -// gdb-command:whatis closure2 -// gdb-check:type = (type_names::main::{closure_env#1}, usize) +//@ gdb-command:whatis closure2 +//@ gdb-check:type = (type_names::main::{closure_env#1}, usize) // FOREIGN TYPES -// gdb-command:whatis foreign1 -// gdb-check:type = *mut type_names::{extern#0}::ForeignType1 +//@ gdb-command:whatis foreign1 +//@ gdb-check:type = *mut type_names::{extern#0}::ForeignType1 -// gdb-command:whatis foreign2 -// gdb-check:type = *mut type_names::mod1::{extern#0}::ForeignType2 +//@ gdb-command:whatis foreign2 +//@ gdb-check:type = *mut type_names::mod1::{extern#0}::ForeignType2 // === CDB TESTS ================================================================================== // Note: `/n` causes the wildcard matches to be sorted to avoid depending on order in PDB which // can be arbitrary. -// cdb-command: g +//@ cdb-command: g // STRUCTS // 0-sized structs appear to be optimized away in some cases, so only check the structs that do // actually appear. -// cdb-command:dv /t /n *_struct +//@ cdb-command:dv /t /n *_struct // ENUMS -// cdb-command:dv /t /n *_enum_* -// cdb-check:union enum2$ > generic_enum_1 = [...] -// cdb-check:union enum2$ > generic_enum_2 = [...] -// cdb-check:union enum2$ simple_enum_1 = [...] -// cdb-check:union enum2$ simple_enum_2 = [...] -// cdb-check:union enum2$ simple_enum_3 = [...] +//@ cdb-command:dv /t /n *_enum_* +//@ cdb-check:union enum2$ > generic_enum_1 = [...] +//@ cdb-check:union enum2$ > generic_enum_2 = [...] +//@ cdb-check:union enum2$ simple_enum_1 = [...] +//@ cdb-check:union enum2$ simple_enum_2 = [...] +//@ cdb-check:union enum2$ simple_enum_3 = [...] // TUPLES -// cdb-command:dv /t /n tuple* -// cdb-check:struct tuple$ > > tuple1 = [...] -// cdb-check:struct tuple$,enum2$,char> tuple2 = [...] +//@ cdb-command:dv /t /n tuple* +//@ cdb-check:struct tuple$ > > tuple1 = [...] +//@ cdb-check:struct tuple$,enum2$,char> tuple2 = [...] // BOX -// cdb-command:dv /t /n box* -// cdb-check:struct tuple$,i32> box1 = [...] -// cdb-check:struct tuple$ >,alloc::alloc::Global>,i32> box2 = [...] +//@ cdb-command:dv /t /n box* +//@ cdb-check:struct tuple$,i32> box1 = [...] +//@ cdb-check:struct tuple$ >,alloc::alloc::Global>,i32> box2 = [...] // REFERENCES -// cdb-command:dv /t /n *ref* -// cdb-check:struct tuple$,i32> mut_ref1 = [...] -// cdb-check:struct tuple$,f64> >,i32> mut_ref2 = [...] -// cdb-check:struct tuple$,i32> ref1 = [...] -// cdb-check:struct tuple$ >,i32> ref2 = [...] +//@ cdb-command:dv /t /n *ref* +//@ cdb-check:struct tuple$,i32> mut_ref1 = [...] +//@ cdb-check:struct tuple$,f64> >,i32> mut_ref2 = [...] +//@ cdb-check:struct tuple$,i32> ref1 = [...] +//@ cdb-check:struct tuple$ >,i32> ref2 = [...] // RAW POINTERS -// cdb-command:dv /t /n *_ptr* -// cdb-check:struct tuple$,isize> const_ptr1 = [...] -// cdb-check:struct tuple$,isize> const_ptr2 = [...] -// cdb-check:struct tuple$ > >,isize> const_ptr3 = [...] -// cdb-check:struct tuple$,isize> mut_ptr1 = [...] -// cdb-check:struct tuple$,isize> mut_ptr2 = [...] -// cdb-check:struct tuple$ > >,isize> mut_ptr3 = [...] +//@ cdb-command:dv /t /n *_ptr* +//@ cdb-check:struct tuple$,isize> const_ptr1 = [...] +//@ cdb-check:struct tuple$,isize> const_ptr2 = [...] +//@ cdb-check:struct tuple$ > >,isize> const_ptr3 = [...] +//@ cdb-check:struct tuple$,isize> mut_ptr1 = [...] +//@ cdb-check:struct tuple$,isize> mut_ptr2 = [...] +//@ cdb-check:struct tuple$ > >,isize> mut_ptr3 = [...] // VECTORS -// cdb-command:dv /t /n *vec* -// cdb-check:struct tuple$,i16> fixed_size_vec1 = [...] -// cdb-check:struct tuple$,i16> fixed_size_vec2 = [...] -// cdb-check:struct alloc::vec::Vec vec1 = [...] -// cdb-check:struct alloc::vec::Vec,alloc::alloc::Global> vec2 = [...] -// cdb-command:dv /t /n slice* -// cdb-check:struct ref$ > slice1 = [...] -// cdb-check:struct ref_mut$ > > slice2 = [...] +//@ cdb-command:dv /t /n *vec* +//@ cdb-check:struct tuple$,i16> fixed_size_vec1 = [...] +//@ cdb-check:struct tuple$,i16> fixed_size_vec2 = [...] +//@ cdb-check:struct alloc::vec::Vec vec1 = [...] +//@ cdb-check:struct alloc::vec::Vec,alloc::alloc::Global> vec2 = [...] +//@ cdb-command:dv /t /n slice* +//@ cdb-check:struct ref$ > slice1 = [...] +//@ cdb-check:struct ref_mut$ > > slice2 = [...] // TRAITS -// cdb-command:dv /t /n *_trait - -// cdb-check:struct alloc::boxed::Box,alloc::alloc::Global> box_trait = [...] -// cdb-check:struct alloc::boxed::Box >,alloc::alloc::Global> generic_box_trait = [...] -// cdb-check:struct ref_mut$ > > > generic_mut_ref_trait = [...] -// cdb-check:struct ref$ > > generic_ref_trait = [...] -// cdb-check:struct ref$ > > > has_associated_type_but_no_generics_trait = struct ref$ > > > -// cdb-check:struct ref$ >,core::marker::Send> > has_associated_type_trait = struct ref$ >,core::marker::Send> > -// cdb-check:struct ref_mut$ > mut_ref_trait = [...] -// cdb-check:struct alloc::boxed::Box,alloc::alloc::Global> no_principal_trait = [...] -// cdb-check:struct ref$ > ref_trait = [...] +//@ cdb-command:dv /t /n *_trait + +//@ cdb-check:struct alloc::boxed::Box,alloc::alloc::Global> box_trait = [...] +//@ cdb-check:struct alloc::boxed::Box >,alloc::alloc::Global> generic_box_trait = [...] +//@ cdb-check:struct ref_mut$ > > > generic_mut_ref_trait = [...] +//@ cdb-check:struct ref$ > > generic_ref_trait = [...] +//@ cdb-check:struct ref$ > > > has_associated_type_but_no_generics_trait = struct ref$ > > > +//@ cdb-check:struct ref$ >,core::marker::Send> > has_associated_type_trait = struct ref$ >,core::marker::Send> > +//@ cdb-check:struct ref_mut$ > mut_ref_trait = [...] +//@ cdb-check:struct alloc::boxed::Box,alloc::alloc::Global> no_principal_trait = [...] +//@ cdb-check:struct ref$ > ref_trait = [...] // BARE FUNCTIONS -// cdb-command:dv /t /n *_fn* -// cdb-check:struct tuple$ extern_c_fn = [...] -// cdb-check:struct tuple$ extern_c_fn_with_return_value = [...] -// cdb-check:struct tuple$ >,enum2$ > >),usize> rust_fn = [...] -// cdb-check:struct tuple$ rust_fn_with_return_value = [...] -// cdb-check:struct tuple$ >),usize> unsafe_fn = [...] -// cdb-check:struct tuple$),usize> unsafe_fn_with_return_value = [...] -// cdb-command:dv /t /n *_function* -// cdb-check:struct tuple$ generic_function_int = [...] -// cdb-check:struct tuple$ generic_function_struct3 = [...] -// cdb-check:struct tuple$, ...),usize> variadic_function = [...] -// cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn") -// cdb-check:Return Type: void -// cdb-check:Parameter Types: enum2$ >,enum2$ > > -// cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn_with_return_value") -// cdb-check:Return Type: usize -// cdb-check:Parameter Types: f64 -// cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("extern_c_fn_with_return_value") -// cdb-check:Return Type: type_names::Struct1 -// cdb-check:Parameter Types: +//@ cdb-command:dv /t /n *_fn* +//@ cdb-check:struct tuple$ extern_c_fn = [...] +//@ cdb-check:struct tuple$ extern_c_fn_with_return_value = [...] +//@ cdb-check:struct tuple$ >,enum2$ > >),usize> rust_fn = [...] +//@ cdb-check:struct tuple$ rust_fn_with_return_value = [...] +//@ cdb-check:struct tuple$ >),usize> unsafe_fn = [...] +//@ cdb-check:struct tuple$),usize> unsafe_fn_with_return_value = [...] +//@ cdb-command:dv /t /n *_function* +//@ cdb-check:struct tuple$ generic_function_int = [...] +//@ cdb-check:struct tuple$ generic_function_struct3 = [...] +//@ cdb-check:struct tuple$, ...),usize> variadic_function = [...] +//@ cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn") +//@ cdb-check:Return Type: void +//@ cdb-check:Parameter Types: enum2$ >,enum2$ > > +//@ cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn_with_return_value") +//@ cdb-check:Return Type: usize +//@ cdb-check:Parameter Types: f64 +//@ cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("extern_c_fn_with_return_value") +//@ cdb-check:Return Type: type_names::Struct1 +//@ cdb-check:Parameter Types: // CLOSURES -// cdb-command:dv /t /n closure* -// cdb-check:struct tuple$ closure1 = [...] -// cdb-check:struct tuple$ closure2 = [...] +//@ cdb-command:dv /t /n closure* +//@ cdb-check:struct tuple$ closure1 = [...] +//@ cdb-check:struct tuple$ closure2 = [...] // FOREIGN TYPES -// cdb-command:dv /t /n foreign* -// cdb-check:struct type_names::extern$0::ForeignType1 * foreign1 = [...] -// cdb-check:struct type_names::mod1::extern$0::ForeignType2 * foreign2 = [...] +//@ cdb-command:dv /t /n foreign* +//@ cdb-check:struct type_names::extern$0::ForeignType1 * foreign1 = [...] +//@ cdb-check:struct type_names::mod1::extern$0::ForeignType2 * foreign2 = [...] #![allow(unused_variables)] #![feature(extern_types)] diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs index beaf4c8fa8fe3..c3e6f48dfbde3 100644 --- a/tests/debuginfo/union-smoke.rs +++ b/tests/debuginfo/union-smoke.rs @@ -4,20 +4,20 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print u -// gdb-check:$1 = union_smoke::U {a: (2, 2), b: 514} -// gdb-command:print union_smoke::SU -// gdb-check:$2 = union_smoke::U {a: (1, 1), b: 257} +//@ gdb-command:run +//@ gdb-command:print u +//@ gdb-check:$1 = union_smoke::U {a: (2, 2), b: 514} +//@ gdb-command:print union_smoke::SU +//@ gdb-check:$2 = union_smoke::U {a: (1, 1), b: 257} // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v u -// lldb-check:[...] { a = { 0 = '\x02' 1 = '\x02' } b = 514 } +//@ lldb-command:run +//@ lldb-command:v u +//@ lldb-check:[...] { a = { 0 = '\x02' 1 = '\x02' } b = 514 } -// lldb-command:print union_smoke::SU -// lldb-check:[...] { a = { 0 = '\x01' 1 = '\x01' } b = 257 } +//@ lldb-command:print union_smoke::SU +//@ lldb-check:[...] { a = { 0 = '\x01' 1 = '\x01' } b = 257 } #![allow(unused)] diff --git a/tests/debuginfo/unique-enum.rs b/tests/debuginfo/unique-enum.rs index a9b928456e936..f1aee59ad6be7 100644 --- a/tests/debuginfo/unique-enum.rs +++ b/tests/debuginfo/unique-enum.rs @@ -6,30 +6,30 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print *the_a -// gdb-check:$1 = unique_enum::ABC::TheA{x: 0, y: 8970181431921507452} +//@ gdb-command:print *the_a +//@ gdb-check:$1 = unique_enum::ABC::TheA{x: 0, y: 8970181431921507452} -// gdb-command:print *the_b -// gdb-check:$2 = unique_enum::ABC::TheB(0, 286331153, 286331153) +//@ gdb-command:print *the_b +//@ gdb-check:$2 = unique_enum::ABC::TheB(0, 286331153, 286331153) -// gdb-command:print *univariant -// gdb-check:$3 = unique_enum::Univariant::TheOnlyCase(123234) +//@ gdb-command:print *univariant +//@ gdb-check:$3 = unique_enum::Univariant::TheOnlyCase(123234) // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v *the_a -// lldb-check:(unique_enum::ABC) *the_a = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 } +//@ lldb-command:v *the_a +//@ lldb-check:(unique_enum::ABC) *the_a = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 } -// lldb-command:v *the_b -// lldb-check:(unique_enum::ABC) *the_b = { value = { 0 = 0 1 = 286331153 2 = 286331153 } $discr$ = 1 } +//@ lldb-command:v *the_b +//@ lldb-check:(unique_enum::ABC) *the_b = { value = { 0 = 0 1 = 286331153 2 = 286331153 } $discr$ = 1 } -// lldb-command:v *univariant -// lldb-check:(unique_enum::Univariant) *univariant = { value = { 0 = 123234 } } +//@ lldb-command:v *univariant +//@ lldb-check:(unique_enum::Univariant) *univariant = { value = { 0 = 123234 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/unit-type.rs b/tests/debuginfo/unit-type.rs index ce2a39521d905..5c6b81e8b5e7f 100644 --- a/tests/debuginfo/unit-type.rs +++ b/tests/debuginfo/unit-type.rs @@ -6,48 +6,48 @@ // === GDB TESTS =================================================================================== -// gdb-command: run +//@ gdb-command: run -// gdb-command: print _ref -// gdb-check: $1 = (*mut ()) 0x[...] +//@ gdb-command: print _ref +//@ gdb-check: $1 = (*mut ()) 0x[...] -// gdb-command: print _ptr -// gdb-check: $2 = (*mut ()) 0x[...] +//@ gdb-command: print _ptr +//@ gdb-check: $2 = (*mut ()) 0x[...] -// gdb-command: print _local -// gdb-check: $3 = () +//@ gdb-command: print _local +//@ gdb-check: $3 = () -// gdb-command: print _field -// gdb-check: $4 = unit_type::_TypeContainingUnitField {_a: 123, _unit: (), _b: 456} +//@ gdb-command: print _field +//@ gdb-check: $4 = unit_type::_TypeContainingUnitField {_a: 123, _unit: (), _b: 456} // Check that we can cast "void pointers" to their actual type in the debugger -// gdb-command: print /x *(_ptr as *const u64) -// gdb-check: $5 = 0x1122334455667788 +//@ gdb-command: print /x *(_ptr as *const u64) +//@ gdb-check: $5 = 0x1122334455667788 // === CDB TESTS =================================================================================== -// cdb-command: g -// cdb-check: Breakpoint 0 hit +//@ cdb-command: g +//@ cdb-check: Breakpoint 0 hit -// cdb-command: dx _ref -// cdb-check: _ref : 0x[...] [Type: tuple$<> *] +//@ cdb-command: dx _ref +//@ cdb-check: _ref : 0x[...] [Type: tuple$<> *] -// cdb-command: dx _ptr -// cdb-check: _ptr : 0x[...] [Type: tuple$<> *] +//@ cdb-command: dx _ptr +//@ cdb-check: _ptr : 0x[...] [Type: tuple$<> *] -// cdb-command: dx _local -// cdb-check: _local [Type: tuple$<>] +//@ cdb-command: dx _local +//@ cdb-check: _local [Type: tuple$<>] -// cdb-command: dx _field,d -// cdb-check: _field,d [Type: unit_type::_TypeContainingUnitField] -// cdb-check: [+0x[...]] _a : 123 [Type: unsigned int] -// cdb-check: [+0x[...]] _unit [Type: tuple$<>] -// cdb-check: [+0x[...]] _b : 456 [Type: unsigned __int64] +//@ cdb-command: dx _field,d +//@ cdb-check: _field,d [Type: unit_type::_TypeContainingUnitField] +//@ cdb-check: [+0x[...]] _a : 123 [Type: unsigned int] +//@ cdb-check: [+0x[...]] _unit [Type: tuple$<>] +//@ cdb-check: [+0x[...]] _b : 456 [Type: unsigned __int64] // Check that we can cast "void pointers" to their actual type in the debugger -// cdb-command: dx ((__int64 *)_ptr),x -// cdb-check: ((__int64 *)_ptr),x : 0x[...] : 0x1122334455667788 [Type: __int64 *] -// cdb-check: 0x1122334455667788 [Type: __int64] +//@ cdb-command: dx ((__int64 *)_ptr),x +//@ cdb-check: ((__int64 *)_ptr),x : 0x[...] : 0x1122334455667788 [Type: __int64 *] +//@ cdb-check: 0x1122334455667788 [Type: __int64] struct _TypeContainingUnitField { _a: u32, diff --git a/tests/debuginfo/unsized.rs b/tests/debuginfo/unsized.rs index eb0fb8193bf75..ec5ab884c5b7b 100644 --- a/tests/debuginfo/unsized.rs +++ b/tests/debuginfo/unsized.rs @@ -6,42 +6,42 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print a -// gdb-check:$1 = &unsized::Foo<[u8]> {data_ptr: [...], length: 4} +//@ gdb-command:print a +//@ gdb-check:$1 = &unsized::Foo<[u8]> {data_ptr: [...], length: 4} -// gdb-command:print b -// gdb-check:$2 = &unsized::Foo> {data_ptr: [...], length: 4} +//@ gdb-command:print b +//@ gdb-check:$2 = &unsized::Foo> {data_ptr: [...], length: 4} -// gdb-command:print c -// gdb-check:$3 = &unsized::Foo {pointer: [...], vtable: [...]} +//@ gdb-command:print c +//@ gdb-check:$3 = &unsized::Foo {pointer: [...], vtable: [...]} -// gdb-command:print _box -// gdb-check:$4 = alloc::boxed::Box, alloc::alloc::Global> {pointer: [...], vtable: [...]} +//@ gdb-command:print _box +//@ gdb-check:$4 = alloc::boxed::Box, alloc::alloc::Global> {pointer: [...], vtable: [...]} // === CDB TESTS =================================================================================== -// cdb-command: g -// cdb-command:dx a -// cdb-check:a [Type: ref$ > >] -// cdb-check: [+0x000] data_ptr : 0x[...] [Type: unsized::Foo > *] -// cdb-check: [...] length : 0x4 [Type: unsigned [...]int[...] - -// cdb-command:dx b -// cdb-check:b [Type: ref$ > > >] -// cdb-check: [+0x000] data_ptr : 0x[...] [Type: unsized::Foo > > *] -// cdb-check: [...] length : 0x4 [Type: unsigned [...]int[...] - -// cdb-command:dx c -// cdb-check:c [Type: ref$ > >] -// cdb-check: [+0x000] pointer : 0x[...] [Type: unsized::Foo > *] -// cdb-check: [...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[4]] - -// cdb-command:dx _box -// cdb-check:_box [Type: alloc::boxed::Box >,alloc::alloc::Global>] -// cdb-check:[+0x000] pointer : 0x[...] [Type: unsized::Foo > *] -// cdb-check:[...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[4]] +//@ cdb-command: g +//@ cdb-command:dx a +//@ cdb-check:a [Type: ref$ > >] +//@ cdb-check: [+0x000] data_ptr : 0x[...] [Type: unsized::Foo > *] +//@ cdb-check: [...] length : 0x4 [Type: unsigned [...]int[...] + +//@ cdb-command:dx b +//@ cdb-check:b [Type: ref$ > > >] +//@ cdb-check: [+0x000] data_ptr : 0x[...] [Type: unsized::Foo > > *] +//@ cdb-check: [...] length : 0x4 [Type: unsigned [...]int[...] + +//@ cdb-command:dx c +//@ cdb-check:c [Type: ref$ > >] +//@ cdb-check: [+0x000] pointer : 0x[...] [Type: unsized::Foo > *] +//@ cdb-check: [...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[4]] + +//@ cdb-command:dx _box +//@ cdb-check:_box [Type: alloc::boxed::Box >,alloc::alloc::Global>] +//@ cdb-check:[+0x000] pointer : 0x[...] [Type: unsized::Foo > *] +//@ cdb-check:[...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[4]] struct Foo { value: T, diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs index 0343aea309d52..0fdc6dfc7220a 100644 --- a/tests/debuginfo/var-captured-in-nested-closure.rs +++ b/tests/debuginfo/var-captured-in-nested-closure.rs @@ -4,117 +4,117 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print variable -// gdb-check:$1 = 1 -// gdb-command:print constant -// gdb-check:$2 = 2 -// gdb-command:print a_struct -// gdb-check:$3 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *struct_ref -// gdb-check:$4 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *owned -// gdb-check:$5 = 6 -// gdb-command:print closure_local -// gdb-check:$6 = 8 -// gdb-command:continue - -// gdb-command:print variable -// gdb-check:$7 = 1 -// gdb-command:print constant -// gdb-check:$8 = 2 -// gdb-command:print a_struct -// gdb-check:$9 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *struct_ref -// gdb-check:$10 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *owned -// gdb-check:$11 = 6 -// gdb-command:print closure_local -// gdb-check:$12 = 8 -// gdb-command:continue +//@ gdb-command:run + +//@ gdb-command:print variable +//@ gdb-check:$1 = 1 +//@ gdb-command:print constant +//@ gdb-check:$2 = 2 +//@ gdb-command:print a_struct +//@ gdb-check:$3 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *struct_ref +//@ gdb-check:$4 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *owned +//@ gdb-check:$5 = 6 +//@ gdb-command:print closure_local +//@ gdb-check:$6 = 8 +//@ gdb-command:continue + +//@ gdb-command:print variable +//@ gdb-check:$7 = 1 +//@ gdb-command:print constant +//@ gdb-check:$8 = 2 +//@ gdb-command:print a_struct +//@ gdb-check:$9 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *struct_ref +//@ gdb-check:$10 = var_captured_in_nested_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *owned +//@ gdb-check:$11 = 6 +//@ gdb-command:print closure_local +//@ gdb-check:$12 = 8 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v variable -// lldb-check:[...] 1 -// lldb-command:v constant -// lldb-check:[...] 2 -// lldb-command:v a_struct -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *struct_ref -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *owned -// lldb-check:[...] 6 -// lldb-command:v closure_local -// lldb-check:[...] 8 -// lldb-command:continue - -// lldb-command:v variable -// lldb-check:[...] 1 -// lldb-command:v constant -// lldb-check:[...] 2 -// lldb-command:v a_struct -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *struct_ref -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *owned -// lldb-check:[...] 6 -// lldb-command:v closure_local -// lldb-check:[...] 8 -// lldb-command:continue +//@ lldb-command:run + +//@ lldb-command:v variable +//@ lldb-check:[...] 1 +//@ lldb-command:v constant +//@ lldb-check:[...] 2 +//@ lldb-command:v a_struct +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *struct_ref +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *owned +//@ lldb-check:[...] 6 +//@ lldb-command:v closure_local +//@ lldb-check:[...] 8 +//@ lldb-command:continue + +//@ lldb-command:v variable +//@ lldb-check:[...] 1 +//@ lldb-command:v constant +//@ lldb-check:[...] 2 +//@ lldb-command:v a_struct +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *struct_ref +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *owned +//@ lldb-check:[...] 6 +//@ lldb-command:v closure_local +//@ lldb-check:[...] 8 +//@ lldb-command:continue // === CDB TESTS =================================================================================== -// cdb-command: g - -// cdb-command: dx variable -// cdb-check:variable : 1 [Type: [...]] -// cdb-command: dx constant -// cdb-check:constant : 2 [Type: [...]] -// cdb-command: dx a_struct -// cdb-check:a_struct [Type: var_captured_in_nested_closure::Struct] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx struct_ref -// cdb-check:struct_ref : 0x[...] [Type: var_captured_in_nested_closure::Struct *] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx owned -// cdb-check:owned : 0x[...] : 6 [Type: [...] *] -// cdb-check: 6 [Type: [...]] -// cdb-command: dx closure_local -// cdb-check:closure_local : 8 [Type: [...]] -// cdb-command: dx nested_closure -// cdb-check:nested_closure [Type: var_captured_in_nested_closure::main::closure$0::closure_env$0] - -// cdb-command: g - -// cdb-command: dx variable -// cdb-check:variable : 1 [Type: [...]] -// cdb-command: dx constant -// cdb-check:constant : 2 [Type: [...]] -// cdb-command: dx a_struct -// cdb-check:a_struct [Type: var_captured_in_nested_closure::Struct] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx struct_ref -// cdb-check:struct_ref : 0x[...] [Type: var_captured_in_nested_closure::Struct *] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx owned -// cdb-check:owned : 0x[...] : 6 [Type: [...] *] -// cdb-check: 6 [Type: [...]] -// cdb-command: dx closure_local -// cdb-check:closure_local : 8 [Type: [...]] +//@ cdb-command: g + +//@ cdb-command: dx variable +//@ cdb-check:variable : 1 [Type: [...]] +//@ cdb-command: dx constant +//@ cdb-check:constant : 2 [Type: [...]] +//@ cdb-command: dx a_struct +//@ cdb-check:a_struct [Type: var_captured_in_nested_closure::Struct] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx struct_ref +//@ cdb-check:struct_ref : 0x[...] [Type: var_captured_in_nested_closure::Struct *] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx owned +//@ cdb-check:owned : 0x[...] : 6 [Type: [...] *] +//@ cdb-check: 6 [Type: [...]] +//@ cdb-command: dx closure_local +//@ cdb-check:closure_local : 8 [Type: [...]] +//@ cdb-command: dx nested_closure +//@ cdb-check:nested_closure [Type: var_captured_in_nested_closure::main::closure$0::closure_env$0] + +//@ cdb-command: g + +//@ cdb-command: dx variable +//@ cdb-check:variable : 1 [Type: [...]] +//@ cdb-command: dx constant +//@ cdb-check:constant : 2 [Type: [...]] +//@ cdb-command: dx a_struct +//@ cdb-check:a_struct [Type: var_captured_in_nested_closure::Struct] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx struct_ref +//@ cdb-check:struct_ref : 0x[...] [Type: var_captured_in_nested_closure::Struct *] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx owned +//@ cdb-check:owned : 0x[...] : 6 [Type: [...] *] +//@ cdb-check: 6 [Type: [...]] +//@ cdb-command: dx closure_local +//@ cdb-check:closure_local : 8 [Type: [...]] #![allow(unused_variables)] diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index ad6aa5fb9c747..a52e1be482af2 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -4,30 +4,30 @@ // === GDB TESTS =================================================================================== -// gdb-command:run +//@ gdb-command:run -// gdb-command:print constant -// gdb-check:$1 = 1 -// gdb-command:print a_struct -// gdb-check:$2 = var_captured_in_sendable_closure::Struct {a: -2, b: 3.5, c: 4} -// gdb-command:print *owned -// gdb-check:$3 = 5 -// gdb-command:continue +//@ gdb-command:print constant +//@ gdb-check:$1 = 1 +//@ gdb-command:print a_struct +//@ gdb-check:$2 = var_captured_in_sendable_closure::Struct {a: -2, b: 3.5, c: 4} +//@ gdb-command:print *owned +//@ gdb-check:$3 = 5 +//@ gdb-command:continue -// gdb-command:print constant2 -// gdb-check:$4 = 6 -// gdb-command:continue +//@ gdb-command:print constant2 +//@ gdb-check:$4 = 6 +//@ gdb-command:continue // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v constant -// lldb-check:[...] 1 -// lldb-command:v a_struct -// lldb-check:[...] { a = -2 b = 3.5 c = 4 } -// lldb-command:v *owned -// lldb-check:[...] 5 +//@ lldb-command:v constant +//@ lldb-check:[...] 1 +//@ lldb-command:v a_struct +//@ lldb-check:[...] { a = -2 b = 3.5 c = 4 } +//@ lldb-command:v *owned +//@ lldb-check:[...] 5 #![allow(unused_variables)] diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs index cc7e2eff81b47..31cf0283c37b3 100644 --- a/tests/debuginfo/var-captured-in-stack-closure.rs +++ b/tests/debuginfo/var-captured-in-stack-closure.rs @@ -4,102 +4,102 @@ // === GDB TESTS =================================================================================== -// gdb-command:run - -// gdb-command:print variable -// gdb-check:$1 = 1 -// gdb-command:print constant -// gdb-check:$2 = 2 -// gdb-command:print a_struct -// gdb-check:$3 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *struct_ref -// gdb-check:$4 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *owned -// gdb-check:$5 = 6 - -// gdb-command:continue - -// gdb-command:print variable -// gdb-check:$6 = 2 -// gdb-command:print constant -// gdb-check:$7 = 2 -// gdb-command:print a_struct -// gdb-check:$8 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *struct_ref -// gdb-check:$9 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} -// gdb-command:print *owned -// gdb-check:$10 = 6 +//@ gdb-command:run + +//@ gdb-command:print variable +//@ gdb-check:$1 = 1 +//@ gdb-command:print constant +//@ gdb-check:$2 = 2 +//@ gdb-command:print a_struct +//@ gdb-check:$3 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *struct_ref +//@ gdb-check:$4 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *owned +//@ gdb-check:$5 = 6 + +//@ gdb-command:continue + +//@ gdb-command:print variable +//@ gdb-check:$6 = 2 +//@ gdb-command:print constant +//@ gdb-check:$7 = 2 +//@ gdb-command:print a_struct +//@ gdb-check:$8 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *struct_ref +//@ gdb-check:$9 = var_captured_in_stack_closure::Struct {a: -3, b: 4.5, c: 5} +//@ gdb-command:print *owned +//@ gdb-check:$10 = 6 // === LLDB TESTS ================================================================================== -// lldb-command:run - -// lldb-command:v variable -// lldb-check:[...] 1 -// lldb-command:v constant -// lldb-check:[...] 2 -// lldb-command:v a_struct -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *struct_ref -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *owned -// lldb-check:[...] 6 - -// lldb-command:continue - -// lldb-command:v variable -// lldb-check:[...] 2 -// lldb-command:v constant -// lldb-check:[...] 2 -// lldb-command:v a_struct -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *struct_ref -// lldb-check:[...] { a = -3 b = 4.5 c = 5 } -// lldb-command:v *owned -// lldb-check:[...] 6 +//@ lldb-command:run + +//@ lldb-command:v variable +//@ lldb-check:[...] 1 +//@ lldb-command:v constant +//@ lldb-check:[...] 2 +//@ lldb-command:v a_struct +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *struct_ref +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *owned +//@ lldb-check:[...] 6 + +//@ lldb-command:continue + +//@ lldb-command:v variable +//@ lldb-check:[...] 2 +//@ lldb-command:v constant +//@ lldb-check:[...] 2 +//@ lldb-command:v a_struct +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *struct_ref +//@ lldb-check:[...] { a = -3 b = 4.5 c = 5 } +//@ lldb-command:v *owned +//@ lldb-check:[...] 6 // === CDB TESTS =================================================================================== -// cdb-command: g - -// cdb-command: dx variable -// cdb-check:variable : 1 [Type: [...]] -// cdb-command: dx constant -// cdb-check:constant : 2 [Type: [...]] -// cdb-command: dx a_struct -// cdb-check:a_struct [Type: var_captured_in_stack_closure::Struct] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx struct_ref -// cdb-check:struct_ref : 0x[...] [Type: var_captured_in_stack_closure::Struct *] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx owned -// cdb-check:owned : 0x[...] : 6 [Type: [...] *] - - -// cdb-command: g - -// cdb-command: dx variable -// cdb-check:variable : 2 [Type: [...]] -// cdb-command: dx constant -// cdb-check:constant : 2 [Type: [...]] -// cdb-command: dx a_struct -// cdb-check:a_struct [Type: var_captured_in_stack_closure::Struct] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx struct_ref -// cdb-check:struct_ref : 0x[...] [Type: var_captured_in_stack_closure::Struct *] -// cdb-check: [+0x[...]] a : -3 [Type: [...]] -// cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] -// cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] -// cdb-command: dx owned -// cdb-check:owned : 0x[...] : 6 [Type: [...] *] +//@ cdb-command: g + +//@ cdb-command: dx variable +//@ cdb-check:variable : 1 [Type: [...]] +//@ cdb-command: dx constant +//@ cdb-check:constant : 2 [Type: [...]] +//@ cdb-command: dx a_struct +//@ cdb-check:a_struct [Type: var_captured_in_stack_closure::Struct] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx struct_ref +//@ cdb-check:struct_ref : 0x[...] [Type: var_captured_in_stack_closure::Struct *] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx owned +//@ cdb-check:owned : 0x[...] : 6 [Type: [...] *] + + +//@ cdb-command: g + +//@ cdb-command: dx variable +//@ cdb-check:variable : 2 [Type: [...]] +//@ cdb-command: dx constant +//@ cdb-check:constant : 2 [Type: [...]] +//@ cdb-command: dx a_struct +//@ cdb-check:a_struct [Type: var_captured_in_stack_closure::Struct] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx struct_ref +//@ cdb-check:struct_ref : 0x[...] [Type: var_captured_in_stack_closure::Struct *] +//@ cdb-check: [+0x[...]] a : -3 [Type: [...]] +//@ cdb-check: [+0x[...]] b : 4.500000 [Type: [...]] +//@ cdb-check: [+0x[...]] c : 0x5 [Type: unsigned [...]] +//@ cdb-command: dx owned +//@ cdb-check:owned : 0x[...] : 6 [Type: [...] *] #![allow(unused_variables)] diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index 7ed6b0cb66401..bd8ea666a4c3e 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -7,70 +7,70 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print empty.length -// gdb-check:$1 = 0 - -// gdb-command:print singleton.length -// gdb-check:$2 = 1 -// gdb-command:print *(singleton.data_ptr as *const [i64; 1]) -// gdb-check:$3 = [1] - -// gdb-command:print multiple.length -// gdb-check:$4 = 4 -// gdb-command:print *(multiple.data_ptr as *const [i64; 4]) -// gdb-check:$5 = [2, 3, 4, 5] - -// gdb-command:print slice_of_slice.length -// gdb-check:$6 = 2 -// gdb-command:print *(slice_of_slice.data_ptr as *const [i64; 2]) -// gdb-check:$7 = [3, 4] - -// gdb-command:print padded_tuple.length -// gdb-check:$8 = 2 -// gdb-command:print padded_tuple.data_ptr[0] -// gdb-check:$9 = (6, 7) -// gdb-command:print padded_tuple.data_ptr[1] -// gdb-check:$10 = (8, 9) - -// gdb-command:print padded_struct.length -// gdb-check:$11 = 2 -// gdb-command:print padded_struct.data_ptr[0] -// gdb-check:$12 = vec_slices::AStruct {x: 10, y: 11, z: 12} -// gdb-command:print padded_struct.data_ptr[1] -// gdb-check:$13 = vec_slices::AStruct {x: 13, y: 14, z: 15} - -// gdb-command:print mut_slice.length -// gdb-check:$14 = 5 -// gdb-command:print *(mut_slice.data_ptr as *const [i64; 5]) -// gdb-check:$15 = [1, 2, 3, 4, 5] - -// gdb-command:print MUT_VECT_SLICE.length -// gdb-check:$16 = 2 -// gdb-command:print *(MUT_VECT_SLICE.data_ptr as *const [i64; 2]) -// gdb-check:$17 = [64, 65] +//@ gdb-command:run +//@ gdb-command:print empty.length +//@ gdb-check:$1 = 0 + +//@ gdb-command:print singleton.length +//@ gdb-check:$2 = 1 +//@ gdb-command:print *(singleton.data_ptr as *const [i64; 1]) +//@ gdb-check:$3 = [1] + +//@ gdb-command:print multiple.length +//@ gdb-check:$4 = 4 +//@ gdb-command:print *(multiple.data_ptr as *const [i64; 4]) +//@ gdb-check:$5 = [2, 3, 4, 5] + +//@ gdb-command:print slice_of_slice.length +//@ gdb-check:$6 = 2 +//@ gdb-command:print *(slice_of_slice.data_ptr as *const [i64; 2]) +//@ gdb-check:$7 = [3, 4] + +//@ gdb-command:print padded_tuple.length +//@ gdb-check:$8 = 2 +//@ gdb-command:print padded_tuple.data_ptr[0] +//@ gdb-check:$9 = (6, 7) +//@ gdb-command:print padded_tuple.data_ptr[1] +//@ gdb-check:$10 = (8, 9) + +//@ gdb-command:print padded_struct.length +//@ gdb-check:$11 = 2 +//@ gdb-command:print padded_struct.data_ptr[0] +//@ gdb-check:$12 = vec_slices::AStruct {x: 10, y: 11, z: 12} +//@ gdb-command:print padded_struct.data_ptr[1] +//@ gdb-check:$13 = vec_slices::AStruct {x: 13, y: 14, z: 15} + +//@ gdb-command:print mut_slice.length +//@ gdb-check:$14 = 5 +//@ gdb-command:print *(mut_slice.data_ptr as *const [i64; 5]) +//@ gdb-check:$15 = [1, 2, 3, 4, 5] + +//@ gdb-command:print MUT_VECT_SLICE.length +//@ gdb-check:$16 = 2 +//@ gdb-command:print *(MUT_VECT_SLICE.data_ptr as *const [i64; 2]) +//@ gdb-check:$17 = [64, 65] // === LLDB TESTS ================================================================================== -// lldb-command:run +//@ lldb-command:run -// lldb-command:v empty -// lldb-check:[...] size=0 +//@ lldb-command:v empty +//@ lldb-check:[...] size=0 -// lldb-command:v singleton -// lldb-check:[...] size=1 { [0] = 1 } +//@ lldb-command:v singleton +//@ lldb-check:[...] size=1 { [0] = 1 } -// lldb-command:v multiple -// lldb-check:[...] size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } +//@ lldb-command:v multiple +//@ lldb-check:[...] size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } -// lldb-command:v slice_of_slice -// lldb-check:[...] size=2 { [0] = 3 [1] = 4 } +//@ lldb-command:v slice_of_slice +//@ lldb-check:[...] size=2 { [0] = 3 [1] = 4 } -// lldb-command:v padded_tuple -// lldb-check:[...] size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } +//@ lldb-command:v padded_tuple +//@ lldb-check:[...] size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } -// lldb-command:v padded_struct -// lldb-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } +//@ lldb-command:v padded_struct +//@ lldb-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } #![allow(dead_code, unused_variables)] diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs index c0e9f802f1e3b..375ec156df58b 100644 --- a/tests/debuginfo/vec.rs +++ b/tests/debuginfo/vec.rs @@ -4,18 +4,18 @@ // === GDB TESTS =================================================================================== -// gdb-command:run -// gdb-command:print a -// gdb-check:$1 = [1, 2, 3] -// gdb-command:print vec::VECT -// gdb-check:$2 = [4, 5, 6] +//@ gdb-command:run +//@ gdb-command:print a +//@ gdb-check:$1 = [1, 2, 3] +//@ gdb-command:print vec::VECT +//@ gdb-check:$2 = [4, 5, 6] // === LLDB TESTS ================================================================================== -// lldb-command:run -// lldb-command:v a -// lldb-check:[...] { [0] = 1 [1] = 2 [2] = 3 } +//@ lldb-command:run +//@ lldb-command:v a +//@ lldb-check:[...] { [0] = 1 [1] = 2 [2] = 3 } #![allow(unused_variables)] diff --git a/tests/debuginfo/zst-interferes-with-prologue.rs b/tests/debuginfo/zst-interferes-with-prologue.rs index 4d87df1abe7a7..0f2c5cf8492d8 100644 --- a/tests/debuginfo/zst-interferes-with-prologue.rs +++ b/tests/debuginfo/zst-interferes-with-prologue.rs @@ -5,25 +5,25 @@ // === GDB TESTS =================================================================================== -// gdb-command:break zst_interferes_with_prologue::Foo::var_return_opt_try -// gdb-command:run +//@ gdb-command:break zst_interferes_with_prologue::Foo::var_return_opt_try +//@ gdb-command:run -// gdb-command:print self -// gdb-command:next -// gdb-command:print self -// gdb-command:print $1 == $2 -// gdb-check:true +//@ gdb-command:print self +//@ gdb-command:next +//@ gdb-command:print self +//@ gdb-command:print $1 == $2 +//@ gdb-check:true // === LLDB TESTS ================================================================================== -// lldb-command:b "zst_interferes_with_prologue::Foo::var_return_opt_try" -// lldb-command:run +//@ lldb-command:b "zst_interferes_with_prologue::Foo::var_return_opt_try" +//@ lldb-command:run -// lldb-command:expr self -// lldb-command:next -// lldb-command:expr self -// lldb-command:print $0 == $1 -// lldb-check:true +//@ lldb-command:expr self +//@ lldb-command:next +//@ lldb-command:expr self +//@ lldb-command:print $0 == $1 +//@ lldb-check:true struct Foo { a: usize,