diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 75c18cd2dd41c..247727762d16e 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -278,10 +278,6 @@ pub struct Build { initial_rustc: PathBuf, initial_cargo: PathBuf, - // Probed tools at runtime - lldb_version: Option, - lldb_python_dir: Option, - // Runtime state filled in later on // C/C++ compilers and archiver for all targets cc: HashMap, cc::Tool>, @@ -416,8 +412,6 @@ impl Build { ar: HashMap::new(), ranlib: HashMap::new(), crates: HashMap::new(), - lldb_version: None, - lldb_python_dir: None, is_sudo, ci_env: CiEnv::current(), delayed_failures: RefCell::new(Vec::new()), diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index c2610de23beba..724cb5841f48f 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -236,19 +236,6 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake } } - let run = |cmd: &mut Command| { - cmd.output().map(|output| { - String::from_utf8_lossy(&output.stdout) - .lines().next().unwrap_or_else(|| { - panic!("{:?} failed {:?}", cmd, output) - }).to_string() - }) - }; - build.lldb_version = run(Command::new("lldb").arg("--version")).ok(); - if build.lldb_version.is_some() { - build.lldb_python_dir = run(Command::new("lldb").arg("-P")).ok(); - } - if let Some(ref s) = build.config.ccache { cmd_finder.must_have(s); } diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 0c4816dc90458..633c15b54b9ef 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1082,11 +1082,34 @@ impl Step for Compiletest { if let Some(ref gdb) = builder.config.gdb { cmd.arg("--gdb").arg(gdb); } - if let Some(ref vers) = builder.lldb_version { + + let run = |cmd: &mut Command| { + cmd.output().map(|output| { + String::from_utf8_lossy(&output.stdout) + .lines().next().unwrap_or_else(|| { + panic!("{:?} failed {:?}", cmd, output) + }).to_string() + }) + }; + let lldb_exe = if builder.config.lldb_enabled && !target.contains("emscripten") { + // Test against the lldb that was just built. + builder.llvm_out(target) + .join("bin") + .join("lldb") + } else { + PathBuf::from("lldb") + }; + let lldb_version = Command::new(&lldb_exe) + .arg("--version") + .output() + .map(|output| { String::from_utf8_lossy(&output.stdout).to_string() }) + .ok(); + if let Some(ref vers) = lldb_version { cmd.arg("--lldb-version").arg(vers); - } - if let Some(ref dir) = builder.lldb_python_dir { - cmd.arg("--lldb-python-dir").arg(dir); + let lldb_python_dir = run(Command::new(&lldb_exe).arg("-P")).ok(); + if let Some(ref dir) = lldb_python_dir { + cmd.arg("--lldb-python-dir").arg(dir); + } } // Get paths from cmd args diff --git a/src/test/debuginfo/associated-types.rs b/src/test/debuginfo/associated-types.rs index ccd94022711cd..229f9466b5122 100644 --- a/src/test/debuginfo/associated-types.rs +++ b/src/test/debuginfo/associated-types.rs @@ -51,33 +51,42 @@ // lldb-command:run // lldb-command:print arg -// lldb-check:[...]$0 = Struct { b: -1, b1: 0 } +// lldbg-check:[...]$0 = Struct { b: -1, b1: 0 } +// lldbr-check:(associated_types::Struct) arg = Struct { b: -1, b1: 0 } // lldb-command:continue // lldb-command:print inferred -// lldb-check:[...]$1 = 1 +// lldbg-check:[...]$1 = 1 +// lldbr-check:(i64) inferred = 1 // lldb-command:print explicitly -// lldb-check:[...]$2 = 1 +// lldbg-check:[...]$2 = 1 +// lldbr-check:(i64) explicitly = 1 // lldb-command:continue // lldb-command:print arg -// lldb-check:[...]$3 = 2 +// lldbg-check:[...]$3 = 2 +// lldbr-check:(i64) arg = 2 // lldb-command:continue // lldb-command:print arg -// lldb-check:[...]$4 = (4, 5) +// lldbg-check:[...]$4 = (4, 5) +// lldbr-check:((i32, i64)) arg = { = 4 = 5 } // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$5 = 6 +// lldbg-check:[...]$5 = 6 +// lldbr-check:(i32) a = 6 // lldb-command:print b -// lldb-check:[...]$6 = 7 +// lldbg-check:[...]$6 = 7 +// lldbr-check:(i64) b = 7 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$7 = 8 +// lldbg-check:[...]$7 = 8 +// lldbr-check:(i64) a = 8 // lldb-command:print b -// lldb-check:[...]$8 = 9 +// lldbg-check:[...]$8 = 9 +// lldbr-check:(i32) b = 9 // lldb-command:continue #![allow(unused_variables)] diff --git a/src/test/debuginfo/basic-types.rs b/src/test/debuginfo/basic-types.rs index 01ce5bd31626e..75737cd6f135e 100644 --- a/src/test/debuginfo/basic-types.rs +++ b/src/test/debuginfo/basic-types.rs @@ -56,36 +56,49 @@ // lldb-command:run // lldb-command:print b -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) b = false // lldb-command:print i -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) i = -1 -// NOTE: LLDB does not support 32bit chars -// d ebugger:print (usize)(c) -// c heck:$3 = 97 +// NOTE: only rust-enabled lldb supports 32bit chars +// lldbr-command:print c +// lldbr-check:(char) c = 'a' // lldb-command:print i8 -// lldb-check:[...]$2 = 'D' +// lldbg-check:[...]$2 = 'D' +// lldbr-check:(i8) i8 = 68 // lldb-command:print i16 -// lldb-check:[...]$3 = -16 +// lldbg-check:[...]$3 = -16 +// lldbr-check:(i16) i16 = -16 // lldb-command:print i32 -// lldb-check:[...]$4 = -32 +// lldbg-check:[...]$4 = -32 +// lldbr-check:(i32) i32 = -32 // lldb-command:print i64 -// lldb-check:[...]$5 = -64 +// lldbg-check:[...]$5 = -64 +// lldbr-check:(i64) i64 = -64 // lldb-command:print u -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(usize) u = 1 // lldb-command:print u8 -// lldb-check:[...]$7 = 'd' +// lldbg-check:[...]$7 = 'd' +// lldbr-check:(u8) u8 = 100 // lldb-command:print u16 -// lldb-check:[...]$8 = 16 +// lldbg-check:[...]$8 = 16 +// lldbr-check:(u16) u16 = 16 // lldb-command:print u32 -// lldb-check:[...]$9 = 32 +// lldbg-check:[...]$9 = 32 +// lldbr-check:(u32) u32 = 32 // lldb-command:print u64 -// lldb-check:[...]$10 = 64 +// lldbg-check:[...]$10 = 64 +// lldbr-check:(u64) u64 = 64 // lldb-command:print f32 -// lldb-check:[...]$11 = 2.5 +// lldbg-check:[...]$11 = 2.5 +// lldbr-check:(f32) f32 = 2.5 // lldb-command:print f64 -// lldb-check:[...]$12 = 3.5 +// lldbg-check:[...]$12 = 3.5 +// lldbr-check:(f64) f64 = 3.5 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/borrowed-basic.rs b/src/test/debuginfo/borrowed-basic.rs index f6c0ff09efe93..6f618c3881f96 100644 --- a/src/test/debuginfo/borrowed-basic.rs +++ b/src/test/debuginfo/borrowed-basic.rs @@ -68,47 +68,60 @@ // lldb-command:run // lldb-command:print *bool_ref -// lldb-check:[...]$0 = true +// lldbg-check:[...]$0 = true +// lldbr-check:(bool) *bool_ref = true // lldb-command:print *int_ref -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) *int_ref = -1 -// NOTE: lldb doesn't support 32bit chars at the moment -// d ebugger:print *char_ref -// c heck:[...]$x = 97 +// NOTE: only rust-enabled lldb supports 32bit chars +// lldbr-command:print *char_ref +// lldbr-check:(char) *char_ref = 'a' // lldb-command:print *i8_ref -// lldb-check:[...]$2 = 'D' +// lldbg-check:[...]$2 = 'D' +// lldbr-check:(i8) *i8_ref = 68 // lldb-command:print *i16_ref -// lldb-check:[...]$3 = -16 +// lldbg-check:[...]$3 = -16 +// lldbr-check:(i16) *i16_ref = -16 // lldb-command:print *i32_ref -// lldb-check:[...]$4 = -32 +// lldbg-check:[...]$4 = -32 +// lldbr-check:(i32) *i32_ref = -32 // lldb-command:print *i64_ref -// lldb-check:[...]$5 = -64 +// lldbg-check:[...]$5 = -64 +// lldbr-check:(i64) *i64_ref = -64 // lldb-command:print *uint_ref -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(usize) *uint_ref = 1 // lldb-command:print *u8_ref -// lldb-check:[...]$7 = 'd' +// lldbg-check:[...]$7 = 'd' +// lldbr-check:(u8) *u8_ref = 100 // lldb-command:print *u16_ref -// lldb-check:[...]$8 = 16 +// lldbg-check:[...]$8 = 16 +// lldbr-check:(u16) *u16_ref = 16 // lldb-command:print *u32_ref -// lldb-check:[...]$9 = 32 +// lldbg-check:[...]$9 = 32 +// lldbr-check:(u32) *u32_ref = 32 // lldb-command:print *u64_ref -// lldb-check:[...]$10 = 64 +// lldbg-check:[...]$10 = 64 +// lldbr-check:(u64) *u64_ref = 64 // lldb-command:print *f32_ref -// lldb-check:[...]$11 = 2.5 +// lldbg-check:[...]$11 = 2.5 +// lldbr-check:(f32) *f32_ref = 2.5 // lldb-command:print *f64_ref -// lldb-check:[...]$12 = 3.5 +// lldbg-check:[...]$12 = 3.5 +// lldbr-check:(f64) *f64_ref = 3.5 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/borrowed-c-style-enum.rs b/src/test/debuginfo/borrowed-c-style-enum.rs index d6f379634be5b..73b92b82ba0a6 100644 --- a/src/test/debuginfo/borrowed-c-style-enum.rs +++ b/src/test/debuginfo/borrowed-c-style-enum.rs @@ -34,13 +34,16 @@ // lldb-command:run // lldb-command:print *the_a_ref -// lldb-check:[...]$0 = TheA +// lldbg-check:[...]$0 = TheA +// lldbr-check:(borrowed_c_style_enum::ABC) *the_a_ref = borrowed_c_style_enum::ABC::TheA // lldb-command:print *the_b_ref -// lldb-check:[...]$1 = TheB +// lldbg-check:[...]$1 = TheB +// lldbr-check:(borrowed_c_style_enum::ABC) *the_b_ref = borrowed_c_style_enum::ABC::TheB // lldb-command:print *the_c_ref -// lldb-check:[...]$2 = TheC +// lldbg-check:[...]$2 = TheC +// lldbr-check:(borrowed_c_style_enum::ABC) *the_c_ref = borrowed_c_style_enum::ABC::TheC #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs index 9e63beff3cb2e..9143e83343fb8 100644 --- a/src/test/debuginfo/borrowed-enum.rs +++ b/src/test/debuginfo/borrowed-enum.rs @@ -36,11 +36,14 @@ // lldb-command:run // lldb-command:print *the_a_ref -// lldb-check:[...]$0 = TheA { x: 0, y: 8970181431921507452 } +// lldbg-check:[...]$0 = TheA { x: 0, y: 8970181431921507452 } +// lldbr-check:(borrowed_enum::ABC::TheA) *the_a_ref = TheA { borrowed_enum::ABC::TheA: 0, borrowed_enum::ABC::TheB: 8970181431921507452 } // lldb-command:print *the_b_ref -// lldb-check:[...]$1 = TheB(0, 286331153, 286331153) +// lldbg-check:[...]$1 = TheB(0, 286331153, 286331153) +// lldbr-check:(borrowed_enum::ABC::TheB) *the_b_ref = { = 0 = 286331153 = 286331153 } // lldb-command:print *univariant_ref -// lldb-check:[...]$2 = TheOnlyCase(4820353753753434) +// lldbg-check:[...]$2 = TheOnlyCase(4820353753753434) +// lldbr-check:(borrowed_enum::Univariant) *univariant_ref = { borrowed_enum::TheOnlyCase = { = 4820353753753434 } } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/borrowed-struct.rs b/src/test/debuginfo/borrowed-struct.rs index 01428e515e27f..3efb4dd470e65 100644 --- a/src/test/debuginfo/borrowed-struct.rs +++ b/src/test/debuginfo/borrowed-struct.rs @@ -45,25 +45,32 @@ // lldb-command:run // lldb-command:print *stack_val_ref -// lldb-check:[...]$0 = SomeStruct { x: 10, y: 23.5 } +// lldbg-check:[...]$0 = SomeStruct { x: 10, y: 23.5 } +// lldbr-check:(borrowed_struct::SomeStruct) *stack_val_ref = SomeStruct { x: 10, y: 23.5 } // lldb-command:print *stack_val_interior_ref_1 -// lldb-check:[...]$1 = 10 +// lldbg-check:[...]$1 = 10 +// lldbr-check:(isize) *stack_val_interior_ref_1 = 10 // lldb-command:print *stack_val_interior_ref_2 -// lldb-check:[...]$2 = 23.5 +// lldbg-check:[...]$2 = 23.5 +// lldbr-check:(f64) *stack_val_interior_ref_2 = 23.5 // lldb-command:print *ref_to_unnamed -// lldb-check:[...]$3 = SomeStruct { x: 11, y: 24.5 } +// lldbg-check:[...]$3 = SomeStruct { x: 11, y: 24.5 } +// lldbr-check:(borrowed_struct::SomeStruct) *ref_to_unnamed = SomeStruct { x: 11, y: 24.5 } // lldb-command:print *unique_val_ref -// lldb-check:[...]$4 = SomeStruct { x: 13, y: 26.5 } +// lldbg-check:[...]$4 = SomeStruct { x: 13, y: 26.5 } +// lldbr-check:(borrowed_struct::SomeStruct) *unique_val_ref = SomeStruct { x: 13, y: 26.5 } // lldb-command:print *unique_val_interior_ref_1 -// lldb-check:[...]$5 = 13 +// lldbg-check:[...]$5 = 13 +// lldbr-check:(isize) *unique_val_interior_ref_1 = 13 // lldb-command:print *unique_val_interior_ref_2 -// lldb-check:[...]$6 = 26.5 +// lldbg-check:[...]$6 = 26.5 +// lldbr-check:(f64) *unique_val_interior_ref_2 = 26.5 #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/borrowed-tuple.rs b/src/test/debuginfo/borrowed-tuple.rs index 17db88ee37f53..ec7c000350f53 100644 --- a/src/test/debuginfo/borrowed-tuple.rs +++ b/src/test/debuginfo/borrowed-tuple.rs @@ -34,13 +34,16 @@ // lldb-command:run // lldb-command:print *stack_val_ref -// lldb-check:[...]$0 = (-14, -19) +// lldbg-check:[...]$0 = (-14, -19) +// lldbr-check:((i16, f32)) *stack_val_ref = { = -14 = -19 } // lldb-command:print *ref_to_unnamed -// lldb-check:[...]$1 = (-15, -20) +// lldbg-check:[...]$1 = (-15, -20) +// lldbr-check:((i16, f32)) *ref_to_unnamed = { = -15 = -20 } // lldb-command:print *unique_val_ref -// lldb-check:[...]$2 = (-17, -22) +// lldbg-check:[...]$2 = (-17, -22) +// lldbr-check:((i16, f32)) *unique_val_ref = { = -17 = -22 } #![allow(unused_variables)] diff --git a/src/test/debuginfo/borrowed-unique-basic.rs b/src/test/debuginfo/borrowed-unique-basic.rs index 9e95498b0c30e..78effa5f3dffe 100644 --- a/src/test/debuginfo/borrowed-unique-basic.rs +++ b/src/test/debuginfo/borrowed-unique-basic.rs @@ -70,46 +70,60 @@ // lldb-command:run // lldb-command:print *bool_ref -// lldb-check:[...]$0 = true +// lldbg-check:[...]$0 = true +// lldbr-check:(bool) *bool_ref = true // lldb-command:print *int_ref -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) *int_ref = -1 -// d ebugger:print *char_ref -// c heck:[...]$3 = 97 +// NOTE: only rust-enabled lldb supports 32bit chars +// lldbr-command:print *char_ref +// lldbr-check:(char) *char_ref = 97 // lldb-command:print *i8_ref -// lldb-check:[...]$2 = 68 +// lldbg-check:[...]$2 = 68 +// lldbr-check:(i8) *i8_ref = 68 // lldb-command:print *i16_ref -// lldb-check:[...]$3 = -16 +// lldbg-check:[...]$3 = -16 +// lldbr-check:(i16) *i16_ref = -16 // lldb-command:print *i32_ref -// lldb-check:[...]$4 = -32 +// lldbg-check:[...]$4 = -32 +// lldbr-check:(i32) *i32_ref = -32 // lldb-command:print *i64_ref -// lldb-check:[...]$5 = -64 +// lldbg-check:[...]$5 = -64 +// lldbr-check:(i64) *i64_ref = -64 // lldb-command:print *uint_ref -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(usize) *uint_ref = 1 // lldb-command:print *u8_ref -// lldb-check:[...]$7 = 100 +// lldbg-check:[...]$7 = 100 +// lldbr-check:(u8) *u8_ref = 100 // lldb-command:print *u16_ref -// lldb-check:[...]$8 = 16 +// lldbg-check:[...]$8 = 16 +// lldbr-check:(u16) *u16_ref = 16 // lldb-command:print *u32_ref -// lldb-check:[...]$9 = 32 +// lldbg-check:[...]$9 = 32 +// lldbr-check:(u32) *u32_ref = 32 // lldb-command:print *u64_ref -// lldb-check:[...]$10 = 64 +// lldbg-check:[...]$10 = 64 +// lldbr-check:(u64) *u64_ref = 64 // lldb-command:print *f32_ref -// lldb-check:[...]$11 = 2.5 +// lldbg-check:[...]$11 = 2.5 +// lldbr-check:(f32) *f32_ref = 2.5 // lldb-command:print *f64_ref -// lldb-check:[...]$12 = 3.5 +// lldbg-check:[...]$12 = 3.5 +// lldbr-check:(f64) *f64_ref = 3.5 #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs index 98c09fe09de8f..7e25a9bf76a86 100644 --- a/src/test/debuginfo/box.rs +++ b/src/test/debuginfo/box.rs @@ -27,9 +27,11 @@ // lldb-command:run // lldb-command:print *a -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(i32) *a = 1 // lldb-command:print *b -// lldb-check:[...]$1 = (2, 3.5) +// lldbg-check:[...]$1 = (2, 3.5) +// lldbr-check:((i32, f64)) *b = { = 2 = 3.5 } #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/boxed-struct.rs b/src/test/debuginfo/boxed-struct.rs index ac091b4a533db..130ea3822cb3a 100644 --- a/src/test/debuginfo/boxed-struct.rs +++ b/src/test/debuginfo/boxed-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // min-lldb-version: 310 // compile-flags:-g @@ -30,10 +32,12 @@ // lldb-command:run // lldb-command:print *unique -// lldb-check:[...]$0 = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 } +// lldbg-check:[...]$0 = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 } +// lldbr-check:(boxed_struct::StructWithSomePadding) *unique = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 } // lldb-command:print *unique_dtor -// lldb-check:[...]$1 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 } +// lldbg-check:[...]$1 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 } +// lldbr-check:(boxed_struct::StructWithDestructor) *unique_dtor = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 } #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs index c14f8c7b354fc..c0fb2dbdda274 100644 --- a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -36,15 +36,18 @@ // lldb-command:run // lldb-command:print self -// lldb-check:[...]$0 = 1111 +// lldbg-check:[...]$0 = 1111 +// lldbr-check:(isize) self = 1111 // lldb-command:continue // lldb-command:print self -// lldb-check:[...]$1 = Struct { x: 2222, y: 3333 } +// lldbg-check:[...]$1 = Struct { x: 2222, y: 3333 } +// lldbr-check:(by_value_self_argument_in_trait_impl::Struct) self = Struct { x: 2222, y: 3333 } // lldb-command:continue // lldb-command:print self -// lldb-check:[...]$2 = (4444.5, 5555, 6666, 7777.5) +// lldbg-check:[...]$2 = (4444.5, 5555, 6666, 7777.5) +// lldbr-check:((f64, isize, isize, f64)) self = { = 4444.5 = 5555 = 6666 = 7777.5 } // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/c-style-enum-in-composite.rs b/src/test/debuginfo/c-style-enum-in-composite.rs index 004e15d1cc6c1..0a19a040a5f43 100644 --- a/src/test/debuginfo/c-style-enum-in-composite.rs +++ b/src/test/debuginfo/c-style-enum-in-composite.rs @@ -50,24 +50,31 @@ // lldb-command:run // lldb-command:print tuple_interior_padding -// lldb-check:[...]$0 = (0, OneHundred) +// lldbg-check:[...]$0 = (0, OneHundred) +// lldbr-check:((i16, c_style_enum_in_composite::AnEnum)) tuple_interior_padding = { = 0 = c_style_enum_in_composite::AnEnum::OneHundred } // lldb-command:print tuple_padding_at_end -// lldb-check:[...]$1 = ((1, OneThousand), 2) +// lldbg-check:[...]$1 = ((1, OneThousand), 2) +// lldbr-check:(((u64, c_style_enum_in_composite::AnEnum), u64)) tuple_padding_at_end = { = { = 1 = c_style_enum_in_composite::AnEnum::OneThousand } = 2 } // lldb-command:print tuple_different_enums -// lldb-check:[...]$2 = (OneThousand, MountainView, OneMillion, Vienna) +// lldbg-check:[...]$2 = (OneThousand, MountainView, OneMillion, Vienna) +// lldbr-check:((c_style_enum_in_composite::AnEnum, c_style_enum_in_composite::AnotherEnum, c_style_enum_in_composite::AnEnum, c_style_enum_in_composite::AnotherEnum)) tuple_different_enums = { = 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 } // lldb-command:print padded_struct -// lldb-check:[...]$3 = PaddedStruct { a: 3, b: OneMillion, c: 4, d: Toronto, e: 5 } +// lldbg-check:[...]$3 = PaddedStruct { a: 3, b: OneMillion, c: 4, d: Toronto, e: 5 } +// lldbr-check:(c_style_enum_in_composite::PaddedStruct) padded_struct = PaddedStruct { a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5 } // lldb-command:print packed_struct -// lldb-check:[...]$4 = PackedStruct { a: 6, b: OneHundred, c: 7, d: Vienna, e: 8 } +// lldbg-check:[...]$4 = PackedStruct { a: 6, b: OneHundred, c: 7, d: Vienna, e: 8 } +// lldbr-check:(c_style_enum_in_composite::PackedStruct) packed_struct = PackedStruct { a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8 } // lldb-command:print non_padded_struct -// lldb-check:[...]$5 = NonPaddedStruct { a: OneMillion, b: MountainView, c: OneThousand, d: Toronto } +// lldbg-check:[...]$5 = NonPaddedStruct { a: OneMillion, b: MountainView, c: OneThousand, d: Toronto } +// lldbr-check:(c_style_enum_in_composite::NonPaddedStruct) non_padded_struct = 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 } // lldb-command:print struct_with_drop -// lldb-check:[...]$6 = (StructWithDrop { a: OneHundred, b: Vienna }, 9) +// lldbg-check:[...]$6 = (StructWithDrop { a: OneHundred, b: Vienna }, 9) +// lldbr-check:((c_style_enum_in_composite::StructWithDrop, i64)) struct_with_drop = { = StructWithDrop { a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna } = 9 } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/c-style-enum.rs b/src/test/debuginfo/c-style-enum.rs index 2dbac8e3d9eac..a756d4fdf6ce7 100644 --- a/src/test/debuginfo/c-style-enum.rs +++ b/src/test/debuginfo/c-style-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // ignore-aarch64 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 // min-lldb-version: 310 @@ -107,25 +109,32 @@ // lldb-command:run // lldb-command:print auto_one -// lldb-check:[...]$0 = One +// lldbg-check:[...]$0 = One +// lldbr-check:(c_style_enum::AutoDiscriminant) auto_one = c_style_enum::AutoDiscriminant::One // lldb-command:print auto_two -// lldb-check:[...]$1 = Two +// lldbg-check:[...]$1 = Two +// lldbr-check:(c_style_enum::AutoDiscriminant) auto_two = c_style_enum::AutoDiscriminant::Two // lldb-command:print auto_three -// lldb-check:[...]$2 = Three +// lldbg-check:[...]$2 = Three +// lldbr-check:(c_style_enum::AutoDiscriminant) auto_three = c_style_enum::AutoDiscriminant::Three // lldb-command:print manual_one_hundred -// lldb-check:[...]$3 = OneHundred +// lldbg-check:[...]$3 = OneHundred +// lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_hundred = c_style_enum::ManualDiscriminant::OneHundred // lldb-command:print manual_one_thousand -// lldb-check:[...]$4 = OneThousand +// lldbg-check:[...]$4 = OneThousand +// lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_thousand = c_style_enum::ManualDiscriminant::OneThousand // lldb-command:print manual_one_million -// lldb-check:[...]$5 = OneMillion +// lldbg-check:[...]$5 = OneMillion +// lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_million = c_style_enum::ManualDiscriminant::OneMillion // lldb-command:print single_variant -// lldb-check:[...]$6 = TheOnlyVariant +// lldbg-check:[...]$6 = TheOnlyVariant +// lldbr-check:(c_style_enum::SingleVariant) single_variant = c_style_enum::SingleVariant::TheOnlyVariant #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/debuginfo/closure-in-generic-function.rs b/src/test/debuginfo/closure-in-generic-function.rs index 5335e0bfa4a69..bb61b394a9c7b 100644 --- a/src/test/debuginfo/closure-in-generic-function.rs +++ b/src/test/debuginfo/closure-in-generic-function.rs @@ -34,15 +34,19 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = 0.5 +// lldbg-check:[...]$0 = 0.5 +// lldbr-check:(f64) x = 0.5 // lldb-command:print y -// lldb-check:[...]$1 = 10 +// lldbg-check:[...]$1 = 10 +// lldbr-check:(i32) y = 10 // lldb-command:continue // lldb-command:print *x -// lldb-check:[...]$2 = 29 +// lldbg-check:[...]$2 = 29 +// lldbr-check:(i32) *x = 29 // lldb-command:print *y -// lldb-check:[...]$3 = 110 +// lldbg-check:[...]$3 = 110 +// lldbr-check:(i32) *y = 110 // lldb-command:continue #![feature(box_syntax)] diff --git a/src/test/debuginfo/cross-crate-spans.rs b/src/test/debuginfo/cross-crate-spans.rs index 28728df928051..9002e19ce21ba 100644 --- a/src/test/debuginfo/cross-crate-spans.rs +++ b/src/test/debuginfo/cross-crate-spans.rs @@ -50,19 +50,25 @@ extern crate cross_crate_spans; // lldb-command:run // lldb-command:print result -// lldb-check:[...]$0 = (17, 17) +// lldbg-check:[...]$0 = (17, 17) +// lldbr-check:((u32, u32)) result = { = 17 = 17 } // lldb-command:print a_variable -// lldb-check:[...]$1 = 123456789 +// lldbg-check:[...]$1 = 123456789 +// lldbr-check:(u32) a_variable = 123456789 // lldb-command:print another_variable -// lldb-check:[...]$2 = 123456789.5 +// lldbg-check:[...]$2 = 123456789.5 +// lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue // lldb-command:print result -// lldb-check:[...]$3 = (1212, 1212) +// lldbg-check:[...]$3 = (1212, 1212) +// lldbr-check:((i16, i16)) result = { = 1212 = 1212 } // lldb-command:print a_variable -// lldb-check:[...]$4 = 123456789 +// lldbg-check:[...]$4 = 123456789 +// lldbr-check:(u32) a_variable = 123456789 // lldb-command:print another_variable -// lldb-check:[...]$5 = 123456789.5 +// lldbg-check:[...]$5 = 123456789.5 +// lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue diff --git a/src/test/debuginfo/destructured-fn-argument.rs b/src/test/debuginfo/destructured-fn-argument.rs index efa9ee59b22b2..b152fa27906f1 100644 --- a/src/test/debuginfo/destructured-fn-argument.rs +++ b/src/test/debuginfo/destructured-fn-argument.rs @@ -174,147 +174,196 @@ // lldb-command:run // lldb-command:print a -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) a = 1 // lldb-command:print b -// lldb-check:[...]$1 = false +// lldbg-check:[...]$1 = false +// lldbr-check:(bool) b = false // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$2 = 2 +// lldbg-check:[...]$2 = 2 +// lldbr-check:(isize) a = 2 // lldb-command:print b -// lldb-check:[...]$3 = 3 +// lldbg-check:[...]$3 = 3 +// lldbr-check:(u16) b = 3 // lldb-command:print c -// lldb-check:[...]$4 = 4 +// lldbg-check:[...]$4 = 4 +// lldbr-check:(u16) c = 4 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$5 = 5 +// lldbg-check:[...]$5 = 5 +// lldbr-check:(isize) a = 5 // lldb-command:print b -// lldb-check:[...]$6 = (6, 7) +// lldbg-check:[...]$6 = (6, 7) +// lldbr-check:((u32, u32)) b = { = 6 = 7 } // lldb-command:continue // lldb-command:print h -// lldb-check:[...]$7 = 8 +// lldbg-check:[...]$7 = 8 +// lldbr-check:(i16) h = 8 // lldb-command:print i -// lldb-check:[...]$8 = Struct { a: 9, b: 10 } +// lldbg-check:[...]$8 = Struct { a: 9, b: 10 } +// lldbr-check:(destructured_fn_argument::Struct) i = Struct { a: 9, b: 10 } // lldb-command:print j -// lldb-check:[...]$9 = 11 +// lldbg-check:[...]$9 = 11 +// lldbr-check:(i16) j = 11 // lldb-command:continue // lldb-command:print k -// lldb-check:[...]$10 = 12 +// lldbg-check:[...]$10 = 12 +// lldbr-check:(i64) k = 12 // lldb-command:print l -// lldb-check:[...]$11 = 13 +// lldbg-check:[...]$11 = 13 +// lldbr-check:(i32) l = 13 // lldb-command:continue // lldb-command:print m -// lldb-check:[...]$12 = 14 +// lldbg-check:[...]$12 = 14 +// lldbr-check:(isize) m = 14 // lldb-command:print n -// lldb-check:[...]$13 = 16 +// lldbg-check:[...]$13 = 16 +// lldbr-check:(i32) n = 16 // lldb-command:continue // lldb-command:print o -// lldb-check:[...]$14 = 18 +// lldbg-check:[...]$14 = 18 +// lldbr-check:(i32) o = 18 // lldb-command:continue // lldb-command:print p -// lldb-check:[...]$15 = 19 +// lldbg-check:[...]$15 = 19 +// lldbr-check:(i64) p = 19 // lldb-command:print q -// lldb-check:[...]$16 = 20 +// lldbg-check:[...]$16 = 20 +// lldbr-check:(i32) q = 20 // lldb-command:print r -// lldb-check:[...]$17 = Struct { a: 21, b: 22 } +// lldbg-check:[...]$17 = Struct { a: 21, b: 22 } +// lldbr-check:(destructured_fn_argument::Struct) r = Struct { a: 21, b: 22 } // lldb-command:continue // lldb-command:print s -// lldb-check:[...]$18 = 24 +// lldbg-check:[...]$18 = 24 +// lldbr-check:(i32) s = 24 // lldb-command:print t -// lldb-check:[...]$19 = 23 +// lldbg-check:[...]$19 = 23 +// lldbr-check:(i64) t = 23 // lldb-command:continue // lldb-command:print u -// lldb-check:[...]$20 = 25 +// lldbg-check:[...]$20 = 25 +// lldbr-check:(i16) u = 25 // lldb-command:print v -// lldb-check:[...]$21 = 26 +// lldbg-check:[...]$21 = 26 +// lldbr-check:(i32) v = 26 // lldb-command:print w -// lldb-check:[...]$22 = 27 +// lldbg-check:[...]$22 = 27 +// lldbr-check:(i64) w = 27 // lldb-command:print x -// lldb-check:[...]$23 = 28 +// lldbg-check:[...]$23 = 28 +// lldbr-check:(i32) x = 28 // lldb-command:print y -// lldb-check:[...]$24 = 29 +// lldbg-check:[...]$24 = 29 +// lldbr-check:(i64) y = 29 // lldb-command:print z -// lldb-check:[...]$25 = 30 +// lldbg-check:[...]$25 = 30 +// lldbr-check:(i32) z = 30 // lldb-command:print ae -// lldb-check:[...]$26 = 31 +// lldbg-check:[...]$26 = 31 +// lldbr-check:(i64) ae = 31 // lldb-command:print oe -// lldb-check:[...]$27 = 32 +// lldbg-check:[...]$27 = 32 +// lldbr-check:(i32) oe = 32 // lldb-command:print ue -// lldb-check:[...]$28 = 33 +// lldbg-check:[...]$28 = 33 +// lldbr-check:(u16) ue = 33 // lldb-command:continue // lldb-command:print aa -// lldb-check:[...]$29 = (34, 35) +// lldbg-check:[...]$29 = (34, 35) +// lldbr-check:((isize, isize)) aa = { = 34 = 35 } // lldb-command:continue // lldb-command:print bb -// lldb-check:[...]$30 = (36, 37) +// lldbg-check:[...]$30 = (36, 37) +// lldbr-check:((isize, isize)) bb = { = 36 = 37 } // lldb-command:continue // lldb-command:print cc -// lldb-check:[...]$31 = 38 +// lldbg-check:[...]$31 = 38 +// lldbr-check:(isize) cc = 38 // lldb-command:continue // lldb-command:print dd -// lldb-check:[...]$32 = (40, 41, 42) +// lldbg-check:[...]$32 = (40, 41, 42) +// lldbr-check:((isize, isize, isize)) dd = { = 40 = 41 = 42 } // lldb-command:continue // lldb-command:print *ee -// lldb-check:[...]$33 = (43, 44, 45) +// lldbg-check:[...]$33 = (43, 44, 45) +// lldbr-check:((isize, isize, isize)) *ee = { = 43 = 44 = 45 } // lldb-command:continue // lldb-command:print *ff -// lldb-check:[...]$34 = 46 +// lldbg-check:[...]$34 = 46 +// lldbr-check:(isize) *ff = 46 // lldb-command:print gg -// lldb-check:[...]$35 = (47, 48) +// lldbg-check:[...]$35 = (47, 48) +// lldbr-check:((isize, isize)) gg = { = 47 = 48 } // lldb-command:continue // lldb-command:print *hh -// lldb-check:[...]$36 = 50 +// lldbg-check:[...]$36 = 50 +// lldbr-check:(i32) *hh = 50 // lldb-command:continue // lldb-command:print ii -// lldb-check:[...]$37 = 51 +// lldbg-check:[...]$37 = 51 +// lldbr-check:(i32) ii = 51 // lldb-command:continue // lldb-command:print *jj -// lldb-check:[...]$38 = 52 +// lldbg-check:[...]$38 = 52 +// lldbr-check:(i32) *jj = 52 // lldb-command:continue // lldb-command:print kk -// lldb-check:[...]$39 = 53 +// lldbg-check:[...]$39 = 53 +// lldbr-check:(f64) kk = 53 // lldb-command:print ll -// lldb-check:[...]$40 = 54 +// lldbg-check:[...]$40 = 54 +// lldbr-check:(isize) ll = 54 // lldb-command:continue // lldb-command:print mm -// lldb-check:[...]$41 = 55 +// lldbg-check:[...]$41 = 55 +// lldbr-check:(f64) mm = 55 // lldb-command:print *nn -// lldb-check:[...]$42 = 56 +// lldbg-check:[...]$42 = 56 +// lldbr-check:(isize) *nn = 56 // lldb-command:continue // lldb-command:print oo -// lldb-check:[...]$43 = 57 +// lldbg-check:[...]$43 = 57 +// lldbr-check:(isize) oo = 57 // lldb-command:print pp -// lldb-check:[...]$44 = 58 +// lldbg-check:[...]$44 = 58 +// lldbr-check:(isize) pp = 58 // lldb-command:print qq -// lldb-check:[...]$45 = 59 +// lldbg-check:[...]$45 = 59 +// lldbr-check:(isize) qq = 59 // lldb-command:continue // lldb-command:print rr -// lldb-check:[...]$46 = 60 +// lldbg-check:[...]$46 = 60 +// lldbr-check:(isize) rr = 60 // lldb-command:print ss -// lldb-check:[...]$47 = 61 +// lldbg-check:[...]$47 = 61 +// lldbr-check:(isize) ss = 61 // lldb-command:print tt -// lldb-check:[...]$48 = 62 +// lldbg-check:[...]$48 = 62 +// lldbr-check:(isize) tt = 62 // lldb-command:continue #![allow(unused_variables)] diff --git a/src/test/debuginfo/destructured-for-loop-variable.rs b/src/test/debuginfo/destructured-for-loop-variable.rs index e973c22fd4a85..48231a906c902 100644 --- a/src/test/debuginfo/destructured-for-loop-variable.rs +++ b/src/test/debuginfo/destructured-for-loop-variable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // min-lldb-version: 310 // compile-flags:-g @@ -91,66 +93,90 @@ // DESTRUCTURED STRUCT // lldb-command:print x -// lldb-check:[...]$0 = 400 +// lldbg-check:[...]$0 = 400 +// lldbr-check:(i16) x = 400 // lldb-command:print y -// lldb-check:[...]$1 = 401.5 +// lldbg-check:[...]$1 = 401.5 +// lldbr-check:(f32) y = 401.5 // lldb-command:print z -// lldb-check:[...]$2 = true +// lldbg-check:[...]$2 = true +// lldbr-check:(bool) z = true // lldb-command:continue // DESTRUCTURED TUPLE // lldb-command:print _i8 -// lldb-check:[...]$3 = 0x6f +// lldbg-check:[...]$3 = 0x6f +// lldbr-check:(i8) _i8 = 111 // lldb-command:print _u8 -// lldb-check:[...]$4 = 0x70 +// lldbg-check:[...]$4 = 0x70 +// lldbr-check:(u8) _u8 = 112 // lldb-command:print _i16 -// lldb-check:[...]$5 = -113 +// lldbg-check:[...]$5 = -113 +// lldbr-check:(i16) _i16 = -113 // lldb-command:print _u16 -// lldb-check:[...]$6 = 114 +// lldbg-check:[...]$6 = 114 +// lldbr-check:(u16) _u16 = 114 // lldb-command:print _i32 -// lldb-check:[...]$7 = -115 +// lldbg-check:[...]$7 = -115 +// lldbr-check:(i32) _i32 = -115 // lldb-command:print _u32 -// lldb-check:[...]$8 = 116 +// lldbg-check:[...]$8 = 116 +// lldbr-check:(u32) _u32 = 116 // lldb-command:print _i64 -// lldb-check:[...]$9 = -117 +// lldbg-check:[...]$9 = -117 +// lldbr-check:(i64) _i64 = -117 // lldb-command:print _u64 -// lldb-check:[...]$10 = 118 +// lldbg-check:[...]$10 = 118 +// lldbr-check:(u64) _u64 = 118 // lldb-command:print _f32 -// lldb-check:[...]$11 = 119.5 +// lldbg-check:[...]$11 = 119.5 +// lldbr-check:(f32) _f32 = 119.5 // lldb-command:print _f64 -// lldb-check:[...]$12 = 120.5 +// lldbg-check:[...]$12 = 120.5 +// lldbr-check:(f64) _f64 = 120.5 // lldb-command:continue // MORE COMPLEX CASE // lldb-command:print v1 -// lldb-check:[...]$13 = 80000 +// lldbg-check:[...]$13 = 80000 +// lldbr-check:(i32) v1 = 80000 // lldb-command:print x1 -// lldb-check:[...]$14 = 8000 +// lldbg-check:[...]$14 = 8000 +// lldbr-check:(i16) x1 = 8000 // lldb-command:print *y1 -// lldb-check:[...]$15 = 80001.5 +// lldbg-check:[...]$15 = 80001.5 +// lldbr-check:(f32) *y1 = 80001.5 // lldb-command:print z1 -// lldb-check:[...]$16 = false +// lldbg-check:[...]$16 = false +// lldbr-check:(bool) z1 = false // lldb-command:print *x2 -// lldb-check:[...]$17 = -30000 +// lldbg-check:[...]$17 = -30000 +// lldbr-check:(i16) *x2 = -30000 // lldb-command:print y2 -// lldb-check:[...]$18 = -300001.5 +// lldbg-check:[...]$18 = -300001.5 +// lldbr-check:(f32) y2 = -300001.5 // lldb-command:print *z2 -// lldb-check:[...]$19 = true +// lldbg-check:[...]$19 = true +// lldbr-check:(bool) *z2 = true // lldb-command:print v2 -// lldb-check:[...]$20 = 854237.5 +// lldbg-check:[...]$20 = 854237.5 +// lldbr-check:(f64) v2 = 854237.5 // lldb-command:continue // SIMPLE IDENTIFIER // lldb-command:print i -// lldb-check:[...]$21 = 1234 +// lldbg-check:[...]$21 = 1234 +// lldbr-check:(i32) i = 1234 // lldb-command:continue // lldb-command:print simple_struct_ident -// lldb-check:[...]$22 = Struct { x: 3537, y: 35437.5, z: true } +// lldbg-check:[...]$22 = Struct { x: 3537, y: 35437.5, z: true } +// lldbr-check:(destructured_for_loop_variable::Struct) simple_struct_ident = Struct { x: 3537, y: 35437.5, z: true } // lldb-command:continue // lldb-command:print simple_tuple_ident -// lldb-check:[...]$23 = (34903493, 232323) +// lldbg-check:[...]$23 = (34903493, 232323) +// lldbr-check:((u32, i64)) simple_tuple_ident = { = 34903493 = 232323 } // lldb-command:continue #![allow(unused_variables)] diff --git a/src/test/debuginfo/destructured-local.rs b/src/test/debuginfo/destructured-local.rs index 1f18b77ab8f6f..5a2edf81d2931 100644 --- a/src/test/debuginfo/destructured-local.rs +++ b/src/test/debuginfo/destructured-local.rs @@ -140,114 +140,157 @@ // lldb-command:run // lldb-command:print a -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) a = 1 // lldb-command:print b -// lldb-check:[...]$1 = false +// lldbg-check:[...]$1 = false +// lldbr-check:(bool) b = false // lldb-command:print c -// lldb-check:[...]$2 = 2 +// lldbg-check:[...]$2 = 2 +// lldbr-check:(isize) c = 2 // lldb-command:print d -// lldb-check:[...]$3 = 3 +// lldbg-check:[...]$3 = 3 +// lldbr-check:(u16) d = 3 // lldb-command:print e -// lldb-check:[...]$4 = 4 +// lldbg-check:[...]$4 = 4 +// lldbr-check:(u16) e = 4 // lldb-command:print f -// lldb-check:[...]$5 = 5 +// lldbg-check:[...]$5 = 5 +// lldbr-check:(isize) f = 5 // lldb-command:print g -// lldb-check:[...]$6 = (6, 7) +// lldbg-check:[...]$6 = (6, 7) +// lldbr-check:((u32, u32)) g = { = 6 = 7 } // lldb-command:print h -// lldb-check:[...]$7 = 8 +// lldbg-check:[...]$7 = 8 +// lldbr-check:(i16) h = 8 // lldb-command:print i -// lldb-check:[...]$8 = Struct { a: 9, b: 10 } +// lldbg-check:[...]$8 = Struct { a: 9, b: 10 } +// lldbr-check:(destructured_local::Struct) i = Struct { a: 9, b: 10 } // lldb-command:print j -// lldb-check:[...]$9 = 11 +// lldbg-check:[...]$9 = 11 +// lldbr-check:(i16) j = 11 // lldb-command:print k -// lldb-check:[...]$10 = 12 +// lldbg-check:[...]$10 = 12 +// lldbr-check:(i64) k = 12 // lldb-command:print l -// lldb-check:[...]$11 = 13 +// lldbg-check:[...]$11 = 13 +// lldbr-check:(i32) l = 13 // lldb-command:print m -// lldb-check:[...]$12 = 14 +// lldbg-check:[...]$12 = 14 +// lldbr-check:(i32) m = 14 // lldb-command:print n -// lldb-check:[...]$13 = 16 +// lldbg-check:[...]$13 = 16 +// lldbr-check:(i32) n = 16 // lldb-command:print o -// lldb-check:[...]$14 = 18 +// lldbg-check:[...]$14 = 18 +// lldbr-check:(i32) o = 18 // lldb-command:print p -// lldb-check:[...]$15 = 19 +// lldbg-check:[...]$15 = 19 +// lldbr-check:(i64) p = 19 // lldb-command:print q -// lldb-check:[...]$16 = 20 +// lldbg-check:[...]$16 = 20 +// lldbr-check:(i32) q = 20 // lldb-command:print r -// lldb-check:[...]$17 = Struct { a: 21, b: 22 } +// lldbg-check:[...]$17 = Struct { a: 21, b: 22 } +// lldbr-check:(destructured_local::Struct) r = Struct { a: 21, b: 22 } // lldb-command:print s -// lldb-check:[...]$18 = 24 +// lldbg-check:[...]$18 = 24 +// lldbr-check:(i32) s = 24 // lldb-command:print t -// lldb-check:[...]$19 = 23 +// lldbg-check:[...]$19 = 23 +// lldbr-check:(i64) t = 23 // lldb-command:print u -// lldb-check:[...]$20 = 25 +// lldbg-check:[...]$20 = 25 +// lldbr-check:(i32) u = 25 // lldb-command:print v -// lldb-check:[...]$21 = 26 +// lldbg-check:[...]$21 = 26 +// lldbr-check:(i32) v = 26 // lldb-command:print w -// lldb-check:[...]$22 = 27 +// lldbg-check:[...]$22 = 27 +// lldbr-check:(i32) w = 27 // lldb-command:print x -// lldb-check:[...]$23 = 28 +// lldbg-check:[...]$23 = 28 +// lldbr-check:(i32) x = 28 // lldb-command:print y -// lldb-check:[...]$24 = 29 +// lldbg-check:[...]$24 = 29 +// lldbr-check:(i64) y = 29 // lldb-command:print z -// lldb-check:[...]$25 = 30 +// lldbg-check:[...]$25 = 30 +// lldbr-check:(i32) z = 30 // lldb-command:print ae -// lldb-check:[...]$26 = 31 +// lldbg-check:[...]$26 = 31 +// lldbr-check:(i64) ae = 31 // lldb-command:print oe -// lldb-check:[...]$27 = 32 +// lldbg-check:[...]$27 = 32 +// lldbr-check:(i32) oe = 32 // lldb-command:print ue -// lldb-check:[...]$28 = 33 +// lldbg-check:[...]$28 = 33 +// lldbr-check:(i32) ue = 33 // lldb-command:print aa -// lldb-check:[...]$29 = (34, 35) +// lldbg-check:[...]$29 = (34, 35) +// lldbr-check:((i32, i32)) aa = { = 34 = 35 } // lldb-command:print bb -// lldb-check:[...]$30 = (36, 37) +// lldbg-check:[...]$30 = (36, 37) +// lldbr-check:((i32, i32)) bb = { = 36 = 37 } // lldb-command:print cc -// lldb-check:[...]$31 = 38 +// lldbg-check:[...]$31 = 38 +// lldbr-check:(i32) cc = 38 // lldb-command:print dd -// lldb-check:[...]$32 = (40, 41, 42) +// lldbg-check:[...]$32 = (40, 41, 42) +// lldbr-check:((i32, i32, i32)) dd = { = 40 = 41 = 42 } // lldb-command:print *ee -// lldb-check:[...]$33 = (43, 44, 45) +// lldbg-check:[...]$33 = (43, 44, 45) +// lldbr-check:((i32, i32, i32)) *ee = { = 43 = 44 = 45 } // lldb-command:print *ff -// lldb-check:[...]$34 = 46 +// lldbg-check:[...]$34 = 46 +// lldbr-check:(i32) *ff = 46 // lldb-command:print gg -// lldb-check:[...]$35 = (47, 48) +// lldbg-check:[...]$35 = (47, 48) +// lldbr-check:((i32, i32)) gg = { = 47 = 48 } // lldb-command:print *hh -// lldb-check:[...]$36 = 50 +// lldbg-check:[...]$36 = 50 +// lldbr-check:(i32) *hh = 50 // lldb-command:print ii -// lldb-check:[...]$37 = 51 +// lldbg-check:[...]$37 = 51 +// lldbr-check:(i32) ii = 51 // lldb-command:print *jj -// lldb-check:[...]$38 = 52 +// lldbg-check:[...]$38 = 52 +// lldbr-check:(i32) *jj = 52 // lldb-command:print kk -// lldb-check:[...]$39 = 53 +// lldbg-check:[...]$39 = 53 +// lldbr-check:(f64) kk = 53 // lldb-command:print ll -// lldb-check:[...]$40 = 54 +// lldbg-check:[...]$40 = 54 +// lldbr-check:(isize) ll = 54 // lldb-command:print mm -// lldb-check:[...]$41 = 55 +// lldbg-check:[...]$41 = 55 +// lldbr-check:(f64) mm = 55 // lldb-command:print *nn -// lldb-check:[...]$42 = 56 +// lldbg-check:[...]$42 = 56 +// lldbr-check:(isize) *nn = 56 #![allow(unused_variables)] diff --git a/src/test/debuginfo/evec-in-struct.rs b/src/test/debuginfo/evec-in-struct.rs index 2e151577590b3..c5460c69944f1 100644 --- a/src/test/debuginfo/evec-in-struct.rs +++ b/src/test/debuginfo/evec-in-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // min-lldb-version: 310 // compile-flags:-g @@ -41,18 +43,23 @@ // lldb-command:run // lldb-command:print no_padding1 -// lldb-check:[...]$0 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] } +// lldbg-check:[...]$0 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] } +// lldbr-check:(evec_in_struct::NoPadding1) no_padding1 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] } // lldb-command:print no_padding2 -// lldb-check:[...]$1 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] } +// lldbg-check:[...]$1 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] } +// lldbr-check:(evec_in_struct::NoPadding2) no_padding2 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] } // lldb-command:print struct_internal_padding -// lldb-check:[...]$2 = StructInternalPadding { x: [13, 14], y: [15, 16] } +// lldbg-check:[...]$2 = StructInternalPadding { x: [13, 14], y: [15, 16] } +// lldbr-check:(evec_in_struct::StructInternalPadding) struct_internal_padding = StructInternalPadding { x: [13, 14], y: [15, 16] } // lldb-command:print single_vec -// lldb-check:[...]$3 = SingleVec { x: [17, 18, 19, 20, 21] } +// lldbg-check:[...]$3 = SingleVec { x: [17, 18, 19, 20, 21] } +// lldbr-check:(evec_in_struct::SingleVec) single_vec = SingleVec { x: [17, 18, 19, 20, 21] } // lldb-command:print struct_padded_at_end -// lldb-check:[...]$4 = StructPaddedAtEnd { x: [22, 23], y: [24, 25] } +// lldbg-check:[...]$4 = StructPaddedAtEnd { x: [22, 23], y: [24, 25] } +// lldbr-check:(evec_in_struct::StructPaddedAtEnd) struct_padded_at_end = StructPaddedAtEnd { x: [22, 23], y: [24, 25] } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/extern-c-fn.rs b/src/test/debuginfo/extern-c-fn.rs index 01901b2c42b8e..2e6602c63ff70 100644 --- a/src/test/debuginfo/extern-c-fn.rs +++ b/src/test/debuginfo/extern-c-fn.rs @@ -33,13 +33,17 @@ // lldb-command:run // lldb-command:print len -// lldb-check:[...]$0 = 20 +// lldbg-check:[...]$0 = 20 +// lldbr-check:(i32) len = 20 // lldb-command:print local0 -// lldb-check:[...]$1 = 19 +// lldbg-check:[...]$1 = 19 +// lldbr-check:(i32) local0 = 19 // lldb-command:print local1 -// lldb-check:[...]$2 = true +// lldbg-check:[...]$2 = true +// lldbr-check:(bool) local1 = true // lldb-command:print local2 -// lldb-check:[...]$3 = 20.5 +// lldbg-check:[...]$3 = 20.5 +// lldbr-check:(f64) local2 = 20.5 // lldb-command:continue diff --git a/src/test/debuginfo/function-arguments.rs b/src/test/debuginfo/function-arguments.rs index c8f2e385a6e74..9fc03feec9b6d 100644 --- a/src/test/debuginfo/function-arguments.rs +++ b/src/test/debuginfo/function-arguments.rs @@ -33,15 +33,19 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = 111102 +// lldbg-check:[...]$0 = 111102 +// lldbr-check:(isize) x = 111102 // lldb-command:print y -// lldb-check:[...]$1 = true +// lldbg-check:[...]$1 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$2 = 2000 +// lldbg-check:[...]$2 = 2000 +// lldbr-check:(i32) a = 2000 // lldb-command:print b -// lldb-check:[...]$3 = 3000 +// lldbg-check:[...]$3 = 3000 +// lldbr-check:(i64) b = 3000 // lldb-command:continue diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs index f1bfc08915edd..89b0e4ca453bf 100644 --- a/src/test/debuginfo/generic-function.rs +++ b/src/test/debuginfo/generic-function.rs @@ -52,27 +52,36 @@ // lldb-command:run // lldb-command:print *t0 -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(i32) *t0 = 1 // lldb-command:print *t1 -// lldb-check:[...]$1 = 2.5 +// lldbg-check:[...]$1 = 2.5 +// lldbr-check:(f64) *t1 = 2.5 // lldb-command:print ret -// lldb-check:[...]$2 = ((1, 2.5), (2.5, 1)) +// lldbg-check:[...]$2 = ((1, 2.5), (2.5, 1)) +// lldbr-check:(((i32, f64), (f64, i32))) ret = { = { = 1 = 2.5 } = { = 2.5 = 1 } } // lldb-command:continue // lldb-command:print *t0 -// lldb-check:[...]$3 = 3.5 +// lldbg-check:[...]$3 = 3.5 +// lldbr-check:(f64) *t0 = 3.5 // lldb-command:print *t1 -// lldb-check:[...]$4 = 4 +// lldbg-check:[...]$4 = 4 +// lldbr-check:(u16) *t1 = 4 // lldb-command:print ret -// lldb-check:[...]$5 = ((3.5, 4), (4, 3.5)) +// lldbg-check:[...]$5 = ((3.5, 4), (4, 3.5)) +// lldbr-check:(((f64, u16), (u16, f64))) ret = { = { = 3.5 = 4 } = { = 4 = 3.5 } } // lldb-command:continue // lldb-command:print *t0 -// lldb-check:[...]$6 = 5 +// lldbg-check:[...]$6 = 5 +// lldbr-check:(i32) *t0 = 5 // lldb-command:print *t1 -// lldb-check:[...]$7 = Struct { a: 6, b: 7.5 } +// lldbg-check:[...]$7 = Struct { a: 6, b: 7.5 } +// lldbr-check:(generic_function::Struct) *t1 = Struct { a: 6, b: 7.5 } // lldb-command:print ret -// lldb-check:[...]$8 = ((5, Struct { a: 6, b: 7.5 }), (Struct { a: 6, b: 7.5 }, 5)) +// lldbg-check:[...]$8 = ((5, Struct { a: 6, b: 7.5 }), (Struct { a: 6, b: 7.5 }, 5)) +// lldbr-check:(((i32, generic_function::Struct), (generic_function::Struct, i32))) ret = { = { = 5 = Struct { a: 6, b: 7.5 } } = { = Struct { a: 6, b: 7.5 } = 5 } } // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/generic-functions-nested.rs b/src/test/debuginfo/generic-functions-nested.rs index 79ae007a50062..ea6dc62eca9eb 100644 --- a/src/test/debuginfo/generic-functions-nested.rs +++ b/src/test/debuginfo/generic-functions-nested.rs @@ -46,27 +46,35 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = -1 +// lldbg-check:[...]$0 = -1 +// lldbr-check:(i32) x = -1 // lldb-command:print y -// lldb-check:[...]$1 = 1 +// lldbg-check:[...]$1 = 1 +// lldbr-check:(i32) y = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = -1 +// lldbg-check:[...]$2 = -1 +// lldbr-check:(i32) x = -1 // lldb-command:print y -// lldb-check:[...]$3 = 2.5 +// lldbg-check:[...]$3 = 2.5 +// lldbr-check:(f64) y = 2.5 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = -2.5 +// lldbg-check:[...]$4 = -2.5 +// lldbr-check:(f64) x = -2.5 // lldb-command:print y -// lldb-check:[...]$5 = 1 +// lldbg-check:[...]$5 = 1 +// lldbr-check:(i32) y = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$6 = -2.5 +// lldbg-check:[...]$6 = -2.5 +// lldbr-check:(f64) x = -2.5 // lldb-command:print y -// lldb-check:[...]$7 = 2.5 +// lldbg-check:[...]$7 = 2.5 +// lldbr-check:(f64) y = 2.5 // lldb-command:continue diff --git a/src/test/debuginfo/generic-method-on-generic-struct.rs b/src/test/debuginfo/generic-method-on-generic-struct.rs index 4f3f6dfc821ee..97bb9aa98e87b 100644 --- a/src/test/debuginfo/generic-method-on-generic-struct.rs +++ b/src/test/debuginfo/generic-method-on-generic-struct.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength // compile-flags:-g // min-lldb-version: 310 @@ -73,47 +74,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = 2 +// lldbg-check:[...]$2 = 2 +// lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 1234.5 } +// lldbg-check:[...]$6 = Struct { x: 1234.5 } +// lldbr-check:(generic_method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 1234.5 } +// lldbg-check:[...]$9 = Struct { x: 1234.5 } +// lldbr-check:(generic_method_on_generic_struct::Struct) self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 1234.5 } +// lldbg-check:[...]$12 = Struct { x: 1234.5 } +// lldbr-check:(generic_method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10.5 +// lldbg-check:[...]$14 = -10.5 +// lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue #![feature(box_syntax)] diff --git a/src/test/debuginfo/generic-struct.rs b/src/test/debuginfo/generic-struct.rs index 35f00ce78717b..4e06a15e1cdf0 100644 --- a/src/test/debuginfo/generic-struct.rs +++ b/src/test/debuginfo/generic-struct.rs @@ -35,14 +35,18 @@ // lldb-command:run // lldb-command:print int_int -// lldb-check:[...]$0 = AGenericStruct { key: 0, value: 1 } +// lldbg-check:[...]$0 = AGenericStruct { key: 0, value: 1 } +// lldbr-check:(generic_struct::AGenericStruct) int_int = AGenericStruct { key: 0, value: 1 } // lldb-command:print int_float -// lldb-check:[...]$1 = AGenericStruct { key: 2, value: 3.5 } +// lldbg-check:[...]$1 = AGenericStruct { key: 2, value: 3.5 } +// lldbr-check:(generic_struct::AGenericStruct) int_float = AGenericStruct { key: 2, value: 3.5 } // lldb-command:print float_int -// lldb-check:[...]$2 = AGenericStruct { key: 4.5, value: 5 } +// lldbg-check:[...]$2 = AGenericStruct { key: 4.5, value: 5 } +// lldbr-check:(generic_struct::AGenericStruct) float_int = AGenericStruct { key: 4.5, value: 5 } // lldb-command:print float_int_float -// lldb-check:[...]$3 = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } +// lldbg-check:[...]$3 = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } +// lldbr-check:(generic_struct::AGenericStruct>) float_int_float = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs index 012bd6140cdbe..62bec28a022af 100644 --- a/src/test/debuginfo/generic-tuple-style-enum.rs +++ b/src/test/debuginfo/generic-tuple-style-enum.rs @@ -41,16 +41,20 @@ // lldb-command:run // lldb-command:print case1 -// lldb-check:[...]$0 = Case1(0, 31868, 31868, 31868, 31868) +// lldbg-check:[...]$0 = Case1(0, 31868, 31868, 31868, 31868) +// lldbr-check:(generic_tuple_style_enum::Regular::Case1) case1 = { = 0 = 31868 = 31868 = 31868 = 31868 } // lldb-command:print case2 -// lldb-check:[...]$1 = Case2(0, 286331153, 286331153) +// lldbg-check:[...]$1 = Case2(0, 286331153, 286331153) +// lldbr-check:(generic_tuple_style_enum::Regular::Case2) case2 = Regular::Case2 { generic_tuple_style_enum::Regular::Case1: 0, generic_tuple_style_enum::Regular::Case2: 286331153, generic_tuple_style_enum::Regular::Case3: 286331153 } // lldb-command:print case3 -// lldb-check:[...]$2 = Case3(0, 6438275382588823897) +// lldbg-check:[...]$2 = Case3(0, 6438275382588823897) +// lldbr-check:(generic_tuple_style_enum::Regular::Case3) case3 = Regular::Case3 { generic_tuple_style_enum::Regular::Case1: 0, generic_tuple_style_enum::Regular::Case2: 6438275382588823897 } // lldb-command:print univariant -// lldb-check:[...]$3 = TheOnlyCase(-1) +// lldbg-check:[...]$3 = TheOnlyCase(-1) +// lldbr-check:(generic_tuple_style_enum::Univariant) univariant = { generic_tuple_style_enum::TheOnlyCase = { = -1 } } #![feature(omit_gdb_pretty_printer_section)] #![omit_gdb_pretty_printer_section] diff --git a/src/test/debuginfo/include_string.rs b/src/test/debuginfo/include_string.rs index 2c75349e5c8c7..e915bf137028b 100644 --- a/src/test/debuginfo/include_string.rs +++ b/src/test/debuginfo/include_string.rs @@ -26,11 +26,14 @@ // lldb-command:run // lldb-command:print string1.length -// lldb-check:[...]$0 = 48 +// lldbg-check:[...]$0 = 48 +// lldbr-check:(usize) length = 48 // lldb-command:print string2.length -// lldb-check:[...]$1 = 49 +// lldbg-check:[...]$1 = 49 +// lldbr-check:(usize) length = 49 // lldb-command:print string3.length -// lldb-check:[...]$2 = 50 +// lldbg-check:[...]$2 = 50 +// lldbr-check:(usize) length = 50 // lldb-command:continue diff --git a/src/test/debuginfo/issue-22656.rs b/src/test/debuginfo/issue-22656.rs index a971e06ed5ec2..6c3988b127ec2 100644 --- a/src/test/debuginfo/issue-22656.rs +++ b/src/test/debuginfo/issue-22656.rs @@ -23,10 +23,12 @@ // lldb-command:run // lldb-command:print v -// lldb-check:[...]$0 = vec![1, 2, 3] +// lldbg-check:[...]$0 = vec![1, 2, 3] +// lldbr-check:(alloc::vec::Vec) v = vec![1, 2, 3] // lldb-command:print zs -// lldb-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct, y: 123, z: ZeroSizedStruct, w: 456 } -// lldb-command:continue +// lldbg-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct, y: 123, z: ZeroSizedStruct, w: 456 } +// lldbr-check:(issue_22656::StructWithZeroSizedField) zs = StructWithZeroSizedField { x: ZeroSizedStruct { }, y: 123, z: ZeroSizedStruct { }, w: 456 } +// lldbr-command:continue #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/debuginfo/lexical-scope-in-for-loop.rs b/src/test/debuginfo/lexical-scope-in-for-loop.rs index e99e241411bfd..7a3c30ed8e5d0 100644 --- a/src/test/debuginfo/lexical-scope-in-for-loop.rs +++ b/src/test/debuginfo/lexical-scope-in-for-loop.rs @@ -55,34 +55,41 @@ // FIRST ITERATION // lldb-command:print x -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(i32) x = -1 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldb-check:[...]$2 = 2 +// lldbg-check:[...]$2 = 2 +// lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = -2 +// lldbg-check:[...]$3 = -2 +// lldbr-check:(i32) x = -2 // lldb-command:continue // THIRD ITERATION // lldb-command:print x -// lldb-check:[...]$4 = 3 +// lldbg-check:[...]$4 = 3 +// lldbr-check:(i32) x = 3 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = -3 +// lldbg-check:[...]$5 = -3 +// lldbr-check:(i32) x = -3 // lldb-command:continue // AFTER LOOP // lldb-command:print x -// lldb-check:[...]$6 = 1000000 +// lldbg-check:[...]$6 = 1000000 +// lldbr-check:(i32) x = 1000000 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-in-if.rs b/src/test/debuginfo/lexical-scope-in-if.rs index 42e288321e197..1a21fe6c1a98c 100644 --- a/src/test/debuginfo/lexical-scope-in-if.rs +++ b/src/test/debuginfo/lexical-scope-in-if.rs @@ -79,58 +79,74 @@ // BEFORE if // lldb-command:print x -// lldb-check:[...]$0 = 999 +// lldbg-check:[...]$0 = 999 +// lldbr-check:(i32) x = 999 // lldb-command:print y -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue // AT BEGINNING of 'then' block // lldb-command:print x -// lldb-check:[...]$2 = 999 +// lldbg-check:[...]$2 = 999 +// lldbr-check:(i32) x = 999 // lldb-command:print y -// lldb-check:[...]$3 = -1 +// lldbg-check:[...]$3 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 1st redeclaration of 'x' // lldb-command:print x -// lldb-check:[...]$4 = 1001 +// lldbg-check:[...]$4 = 1001 +// lldbr-check:(i32) x = 1001 // lldb-command:print y -// lldb-check:[...]$5 = -1 +// lldbg-check:[...]$5 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 2st redeclaration of 'x' // lldb-command:print x -// lldb-check:[...]$6 = 1002 +// lldbg-check:[...]$6 = 1002 +// lldbr-check:(i32) x = 1002 // lldb-command:print y -// lldb-check:[...]$7 = 1003 +// lldbg-check:[...]$7 = 1003 +// lldbr-check:(i32) y = 1003 // lldb-command:continue // AFTER 1st if expression // lldb-command:print x -// lldb-check:[...]$8 = 999 +// lldbg-check:[...]$8 = 999 +// lldbr-check:(i32) x = 999 // lldb-command:print y -// lldb-check:[...]$9 = -1 +// lldbg-check:[...]$9 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldb-check:[...]$10 = 999 +// lldbg-check:[...]$10 = 999 +// lldbr-check:(i32) x = 999 // lldb-command:print y -// lldb-check:[...]$11 = -1 +// lldbg-check:[...]$11 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldb-check:[...]$12 = 1004 +// lldbg-check:[...]$12 = 1004 +// lldbr-check:(i32) x = 1004 // lldb-command:print y -// lldb-check:[...]$13 = 1005 +// lldbg-check:[...]$13 = 1005 +// lldbr-check:(i32) y = 1005 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldb-check:[...]$14 = 999 +// lldbg-check:[...]$14 = 999 +// lldbr-check:(i32) x = 999 // lldb-command:print y -// lldb-check:[...]$15 = -1 +// lldbg-check:[...]$15 = -1 +// lldbr-check:(i32) y = -1 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-in-match.rs b/src/test/debuginfo/lexical-scope-in-match.rs index 597d9837aadcf..3c10039e76abf 100644 --- a/src/test/debuginfo/lexical-scope-in-match.rs +++ b/src/test/debuginfo/lexical-scope-in-match.rs @@ -74,55 +74,73 @@ // lldb-command:run // lldb-command:print shadowed -// lldb-check:[...]$0 = 231 +// lldbg-check:[...]$0 = 231 +// lldbr-check:(i32) shadowed = 231 // lldb-command:print not_shadowed -// lldb-check:[...]$1 = 232 +// lldbg-check:[...]$1 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$2 = 233 +// lldbg-check:[...]$2 = 233 +// lldbr-check:(i32) shadowed = 233 // lldb-command:print not_shadowed -// lldb-check:[...]$3 = 232 +// lldbg-check:[...]$3 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:print local_to_arm -// lldb-check:[...]$4 = 234 +// lldbg-check:[...]$4 = 234 +// lldbr-check:(i32) local_to_arm = 234 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$5 = 236 +// lldbg-check:[...]$5 = 236 +// lldbr-check:(i32) shadowed = 236 // lldb-command:print not_shadowed -// lldb-check:[...]$6 = 232 +// lldbg-check:[...]$6 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$7 = 237 +// lldbg-check:[...]$7 = 237 +// lldbr-check:(isize) shadowed = 237 // lldb-command:print not_shadowed -// lldb-check:[...]$8 = 232 +// lldbg-check:[...]$8 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:print local_to_arm -// lldb-check:[...]$9 = 238 +// lldbg-check:[...]$9 = 238 +// lldbr-check:(isize) local_to_arm = 238 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$10 = 239 +// lldbg-check:[...]$10 = 239 +// lldbr-check:(isize) shadowed = 239 // lldb-command:print not_shadowed -// lldb-check:[...]$11 = 232 +// lldbg-check:[...]$11 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$12 = 241 +// lldbg-check:[...]$12 = 241 +// lldbr-check:(isize) shadowed = 241 // lldb-command:print not_shadowed -// lldb-check:[...]$13 = 232 +// lldbg-check:[...]$13 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$14 = 243 +// lldbg-check:[...]$14 = 243 +// lldbr-check:(i32) shadowed = 243 // lldb-command:print *local_to_arm -// lldb-check:[...]$15 = 244 +// lldbg-check:[...]$15 = 244 +// lldbr-check:(i32) *local_to_arm = 244 // lldb-command:continue // lldb-command:print shadowed -// lldb-check:[...]$16 = 231 +// lldbg-check:[...]$16 = 231 +// lldbr-check:(i32) shadowed = 231 // lldb-command:print not_shadowed -// lldb-check:[...]$17 = 232 +// lldbg-check:[...]$17 = 232 +// lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-in-stack-closure.rs b/src/test/debuginfo/lexical-scope-in-stack-closure.rs index 0a8d3b61a8d8d..fec9d9af1baca 100644 --- a/src/test/debuginfo/lexical-scope-in-stack-closure.rs +++ b/src/test/debuginfo/lexical-scope-in-stack-closure.rs @@ -46,27 +46,33 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = false +// lldbg-check:[...]$1 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 1000 +// lldbg-check:[...]$2 = 1000 +// lldbr-check:(isize) x = 1000 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = 2.5 +// lldbg-check:[...]$3 = 2.5 +// lldbr-check:(f64) x = 2.5 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = true +// lldbg-check:[...]$4 = true +// lldbr-check:(bool) x = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = false +// lldbg-check:[...]$5 = false +// lldbr-check:(bool) x = false // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs index e55088afd7d9f..d160b0250cf32 100644 --- a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -78,57 +78,70 @@ // FIRST ITERATION // lldb-command:print x -// lldb-check:[...]$0 = 0 +// lldbg-check:[...]$0 = 0 +// lldbr-check:(i32) x = 0 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = 1 +// lldbg-check:[...]$1 = 1 +// lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 101 +// lldbg-check:[...]$2 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = 101 +// lldbg-check:[...]$3 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = -987 +// lldbg-check:[...]$4 = -987 +// lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = 101 +// lldbg-check:[...]$5 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$7 = 2 +// lldbg-check:[...]$7 = 2 +// lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$8 = 102 +// lldbg-check:[...]$8 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$9 = 102 +// lldbg-check:[...]$9 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$10 = -987 +// lldbg-check:[...]$10 = -987 +// lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$11 = 102 +// lldbg-check:[...]$11 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$12 = 2 +// lldbg-check:[...]$12 = 2 +// lldbr-check:(i32) x = 2 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-in-unique-closure.rs b/src/test/debuginfo/lexical-scope-in-unique-closure.rs index 70dece865ece0..574752d728f6f 100644 --- a/src/test/debuginfo/lexical-scope-in-unique-closure.rs +++ b/src/test/debuginfo/lexical-scope-in-unique-closure.rs @@ -46,27 +46,33 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = false +// lldbg-check:[...]$1 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 1000 +// lldbg-check:[...]$2 = 1000 +// lldbr-check:(isize) x = 1000 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = 2.5 +// lldbg-check:[...]$3 = 2.5 +// lldbr-check:(f64) x = 2.5 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = true +// lldbg-check:[...]$4 = true +// lldbr-check:(bool) x = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = false +// lldbg-check:[...]$5 = false +// lldbr-check:(bool) x = false // lldb-command:continue diff --git a/src/test/debuginfo/lexical-scope-in-while.rs b/src/test/debuginfo/lexical-scope-in-while.rs index 38d8b75a644fd..7bc0409f2bb02 100644 --- a/src/test/debuginfo/lexical-scope-in-while.rs +++ b/src/test/debuginfo/lexical-scope-in-while.rs @@ -78,57 +78,70 @@ // FIRST ITERATION // lldb-command:print x -// lldb-check:[...]$0 = 0 +// lldbg-check:[...]$0 = 0 +// lldbr-check:(i32) x = 0 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = 1 +// lldbg-check:[...]$1 = 1 +// lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 101 +// lldbg-check:[...]$2 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = 101 +// lldbg-check:[...]$3 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = -987 +// lldbg-check:[...]$4 = -987 +// lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = 101 +// lldbg-check:[...]$5 = 101 +// lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$7 = 2 +// lldbg-check:[...]$7 = 2 +// lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$8 = 102 +// lldbg-check:[...]$8 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$9 = 102 +// lldbg-check:[...]$9 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$10 = -987 +// lldbg-check:[...]$10 = -987 +// lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$11 = 102 +// lldbg-check:[...]$11 = 102 +// lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$12 = 2 +// lldbg-check:[...]$12 = 2 +// lldbr-check:(i32) x = 2 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scope-with-macro.rs b/src/test/debuginfo/lexical-scope-with-macro.rs index 32d775168692b..4e88f65ad1d00 100644 --- a/src/test/debuginfo/lexical-scope-with-macro.rs +++ b/src/test/debuginfo/lexical-scope-with-macro.rs @@ -67,48 +67,57 @@ // lldb-command:run // lldb-command:print a -// lldb-check:[...]$0 = 10 +// lldbg-check:[...]$0 = 10 +// lldbr-check:(i32) a = 10 // lldb-command:print b -// lldb-check:[...]$1 = 34 +// lldbg-check:[...]$1 = 34 +// lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$2 = 890242 +// lldbg-check:[...]$2 = 890242 +// lldbr-check:(i32) a = 10 // lldb-command:print b -// lldb-check:[...]$3 = 34 +// lldbg-check:[...]$3 = 34 +// lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$4 = 10 +// lldbg-check:[...]$4 = 10 +// lldbr-check:(i32) a = 10 // lldb-command:print b -// lldb-check:[...]$5 = 34 +// lldbg-check:[...]$5 = 34 +// lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$6 = 102 +// lldbg-check:[...]$6 = 102 +// lldbr-check:(i32) a = 10 // lldb-command:print b -// lldb-check:[...]$7 = 34 +// lldbg-check:[...]$7 = 34 +// lldbr-check:(i32) b = 34 // lldb-command:continue -// lldb-command:print a -// lldb-check:[...]$8 = 110 -// lldb-command:print b -// lldb-check:[...]$9 = 34 -// lldb-command:continue - -// lldb-command:print a -// lldb-check:[...]$10 = 10 -// lldb-command:print b -// lldb-check:[...]$11 = 34 -// lldb-command:continue - -// lldb-command:print a -// lldb-check:[...]$12 = 10 -// lldb-command:print b -// lldb-check:[...]$13 = 34 -// lldb-command:print c -// lldb-check:[...]$14 = 400 -// lldb-command:continue +// Don't test this with rust-enabled lldb for now; see issue #48807 +// lldbg-command:print a +// lldbg-check:[...]$8 = 110 +// lldbg-command:print b +// lldbg-check:[...]$9 = 34 +// lldbg-command:continue + +// lldbg-command:print a +// lldbg-check:[...]$10 = 10 +// lldbg-command:print b +// lldbg-check:[...]$11 = 34 +// lldbg-command:continue + +// lldbg-command:print a +// lldbg-check:[...]$12 = 10 +// lldbg-command:print b +// lldbg-check:[...]$13 = 34 +// lldbg-command:print c +// lldbg-check:[...]$14 = 400 +// lldbg-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/lexical-scopes-in-block-expression.rs b/src/test/debuginfo/lexical-scopes-in-block-expression.rs index e76f9da1c2505..9cb2a4c546efa 100644 --- a/src/test/debuginfo/lexical-scopes-in-block-expression.rs +++ b/src/test/debuginfo/lexical-scopes-in-block-expression.rs @@ -205,155 +205,203 @@ // STRUCT EXPRESSION // lldb-command:print val -// lldb-check:[...]$0 = -1 +// lldbg-check:[...]$0 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$1 = 10 +// lldbg-check:[...]$1 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$2 = 11 +// lldbg-check:[...]$2 = 11 +// lldbr-check:(isize) val = 11 // lldb-command:print ten -// lldb-check:[...]$3 = 10 +// lldbg-check:[...]$3 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$4 = -1 +// lldbg-check:[...]$4 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$5 = 10 +// lldbg-check:[...]$5 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // FUNCTION CALL // lldb-command:print val -// lldb-check:[...]$6 = -1 +// lldbg-check:[...]$6 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$7 = 10 +// lldbg-check:[...]$7 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$8 = 12 +// lldbg-check:[...]$8 = 12 +// lldbr-check:(isize) val = 12 // lldb-command:print ten -// lldb-check:[...]$9 = 10 +// lldbg-check:[...]$9 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$10 = -1 +// lldbg-check:[...]$10 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$11 = 10 +// lldbg-check:[...]$11 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // TUPLE EXPRESSION // lldb-command:print val -// lldb-check:[...]$12 = -1 +// lldbg-check:[...]$12 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$13 = 10 +// lldbg-check:[...]$13 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$14 = 13 +// lldbg-check:[...]$14 = 13 +// lldbr-check:(isize) val = 13 // lldb-command:print ten -// lldb-check:[...]$15 = 10 +// lldbg-check:[...]$15 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$16 = -1 +// lldbg-check:[...]$16 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$17 = 10 +// lldbg-check:[...]$17 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // VEC EXPRESSION // lldb-command:print val -// lldb-check:[...]$18 = -1 +// lldbg-check:[...]$18 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$19 = 10 +// lldbg-check:[...]$19 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$20 = 14 +// lldbg-check:[...]$20 = 14 +// lldbr-check:(isize) val = 14 // lldb-command:print ten -// lldb-check:[...]$21 = 10 +// lldbg-check:[...]$21 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$22 = -1 +// lldbg-check:[...]$22 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$23 = 10 +// lldbg-check:[...]$23 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // REPEAT VEC EXPRESSION // lldb-command:print val -// lldb-check:[...]$24 = -1 +// lldbg-check:[...]$24 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$25 = 10 +// lldbg-check:[...]$25 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$26 = 15 +// lldbg-check:[...]$26 = 15 +// lldbr-check:(isize) val = 15 // lldb-command:print ten -// lldb-check:[...]$27 = 10 +// lldbg-check:[...]$27 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$28 = -1 +// lldbg-check:[...]$28 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$29 = 10 +// lldbg-check:[...]$29 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // ASSIGNMENT EXPRESSION // lldb-command:print val -// lldb-check:[...]$30 = -1 +// lldbg-check:[...]$30 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$31 = 10 +// lldbg-check:[...]$31 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$32 = 16 +// lldbg-check:[...]$32 = 16 +// lldbr-check:(isize) val = 16 // lldb-command:print ten -// lldb-check:[...]$33 = 10 +// lldbg-check:[...]$33 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$34 = -1 +// lldbg-check:[...]$34 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$35 = 10 +// lldbg-check:[...]$35 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // ARITHMETIC EXPRESSION // lldb-command:print val -// lldb-check:[...]$36 = -1 +// lldbg-check:[...]$36 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$37 = 10 +// lldbg-check:[...]$37 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$38 = 17 +// lldbg-check:[...]$38 = 17 +// lldbr-check:(isize) val = 17 // lldb-command:print ten -// lldb-check:[...]$39 = 10 +// lldbg-check:[...]$39 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$40 = -1 +// lldbg-check:[...]$40 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$41 = 10 +// lldbg-check:[...]$41 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // INDEX EXPRESSION // lldb-command:print val -// lldb-check:[...]$42 = -1 +// lldbg-check:[...]$42 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$43 = 10 +// lldbg-check:[...]$43 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$44 = 18 +// lldbg-check:[...]$44 = 18 +// lldbr-check:(isize) val = 18 // lldb-command:print ten -// lldb-check:[...]$45 = 10 +// lldbg-check:[...]$45 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldb-check:[...]$46 = -1 +// lldbg-check:[...]$46 = -1 +// lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldb-check:[...]$47 = 10 +// lldbg-check:[...]$47 = 10 +// lldbr-check:(isize) ten = 10 // lldb-command:continue #![allow(unused_variables)] diff --git a/src/test/debuginfo/method-on-generic-struct.rs b/src/test/debuginfo/method-on-generic-struct.rs index 20d419b4ac088..57238961e3fa3 100644 --- a/src/test/debuginfo/method-on-generic-struct.rs +++ b/src/test/debuginfo/method-on-generic-struct.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldbg-check:[...]$2 = -2 +// lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 1234.5 } +// lldbg-check:[...]$6 = Struct { x: 1234.5 } +// lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 1234.5 } +// lldbg-check:[...]$9 = Struct { x: 1234.5 } +// lldbr-check:(method_on_generic_struct::Struct) self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 1234.5 } +// lldbg-check:[...]$12 = Struct { x: 1234.5 } +// lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldbg-check:[...]$14 = -10 +// lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/src/test/debuginfo/method-on-struct.rs b/src/test/debuginfo/method-on-struct.rs index c7546fe2221ff..e64962593dfcd 100644 --- a/src/test/debuginfo/method-on-struct.rs +++ b/src/test/debuginfo/method-on-struct.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct { x: 100 } +// lldbg-check:[...]$0 = Struct { x: 100 } +// lldbr-check:(method_on_struct::Struct) *self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldbg-check:[...]$2 = -2 +// lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct { x: 100 } +// lldbg-check:[...]$3 = Struct { x: 100 } +// lldbr-check:(method_on_struct::Struct) self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 200 } +// lldbg-check:[...]$6 = Struct { x: 200 } +// lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 200 } +// lldbg-check:[...]$9 = Struct { x: 200 } +// lldbr-check:(method_on_struct::Struct) self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 200 } +// lldbg-check:[...]$12 = Struct { x: 200 } +// lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldbg-check:[...]$14 = -10 +// lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/src/test/debuginfo/method-on-trait.rs b/src/test/debuginfo/method-on-trait.rs index 1dc37bb06ac40..4c1e111d3b81d 100644 --- a/src/test/debuginfo/method-on-trait.rs +++ b/src/test/debuginfo/method-on-trait.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct { x: 100 } +// lldbg-check:[...]$0 = Struct { x: 100 } +// lldbr-check:(method_on_trait::Struct) *self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldbg-check:[...]$2 = -2 +// lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct { x: 100 } +// lldbg-check:[...]$3 = Struct { x: 100 } +// lldbr-check:(method_on_trait::Struct) self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 200 } +// lldbg-check:[...]$6 = Struct { x: 200 } +// lldbr-check:(method_on_trait::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 200 } +// lldbg-check:[...]$9 = Struct { x: 200 } +// lldbr-check:(method_on_trait::Struct) self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 200 } +// lldbg-check:[...]$12 = Struct { x: 200 } +// lldbr-check:(method_on_trait::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldbg-check:[...]$14 = -10 +// lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/src/test/debuginfo/method-on-tuple-struct.rs b/src/test/debuginfo/method-on-tuple-struct.rs index dac762ae0c35b..cef7a1cbf1b56 100644 --- a/src/test/debuginfo/method-on-tuple-struct.rs +++ b/src/test/debuginfo/method-on-tuple-struct.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = TupleStruct(100, -100.5) +// lldbg-check:[...]$0 = TupleStruct(100, -100.5) +// lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { = 100 = -100.5 } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldbg-check:[...]$2 = -2 +// lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = TupleStruct(100, -100.5) +// lldbg-check:[...]$3 = TupleStruct(100, -100.5) +// lldbr-check:(method_on_tuple_struct::TupleStruct) self = { = 100 = -100.5 } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = TupleStruct(200, -200.5) +// lldbg-check:[...]$6 = TupleStruct(200, -200.5) +// lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { = 200 = -200.5 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = TupleStruct(200, -200.5) +// lldbg-check:[...]$9 = TupleStruct(200, -200.5) +// lldbr-check:(method_on_tuple_struct::TupleStruct) self = { = 200 = -200.5 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = TupleStruct(200, -200.5) +// lldbg-check:[...]$12 = TupleStruct(200, -200.5) +// lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { = 200 = -200.5 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldbg-check:[...]$14 = -10 +// lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/src/test/debuginfo/multi-cgu.rs b/src/test/debuginfo/multi-cgu.rs index f4f9f92396f2c..7f370954b9053 100644 --- a/src/test/debuginfo/multi-cgu.rs +++ b/src/test/debuginfo/multi-cgu.rs @@ -35,11 +35,13 @@ // lldb-command:run // lldb-command:print xxx -// lldb-check:[...]$0 = 12345 +// lldbg-check:[...]$0 = 12345 +// lldbr-check:(u32) xxx = 12345 // lldb-command:continue // lldb-command:print yyy -// lldb-check:[...]$1 = 67890 +// lldbg-check:[...]$1 = 67890 +// lldbr-check:(u64) yyy = 67890 // lldb-command:continue diff --git a/src/test/debuginfo/multiple-functions-equal-var-names.rs b/src/test/debuginfo/multiple-functions-equal-var-names.rs index 71ba1bcea306a..b2327e494e7d1 100644 --- a/src/test/debuginfo/multiple-functions-equal-var-names.rs +++ b/src/test/debuginfo/multiple-functions-equal-var-names.rs @@ -33,15 +33,18 @@ // lldb-command:run // lldb-command:print abc -// lldb-check:[...]$0 = 10101 +// lldbg-check:[...]$0 = 10101 +// lldbr-check:(i32) abc = 10101 // lldb-command:continue // lldb-command:print abc -// lldb-check:[...]$1 = 20202 +// lldbg-check:[...]$1 = 20202 +// lldbr-check:(i32) abc = 20202 // lldb-command:continue // lldb-command:print abc -// lldb-check:[...]$2 = 30303 +// lldbg-check:[...]$2 = 30303 +// lldbr-check:(i32) abc = 30303 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/multiple-functions.rs b/src/test/debuginfo/multiple-functions.rs index 7a1b7b19d9f5d..d78ef0292c160 100644 --- a/src/test/debuginfo/multiple-functions.rs +++ b/src/test/debuginfo/multiple-functions.rs @@ -33,15 +33,18 @@ // lldb-command:run // lldb-command:print a -// lldb-check:[...]$0 = 10101 +// lldbg-check:[...]$0 = 10101 +// lldbr-check:(i32) a = 10101 // lldb-command:continue // lldb-command:print b -// lldb-check:[...]$1 = 20202 +// lldbg-check:[...]$1 = 20202 +// lldbr-check:(i32) b = 20202 // lldb-command:continue // lldb-command:print c -// lldb-check:[...]$2 = 30303 +// lldbg-check:[...]$2 = 30303 +// lldbr-check:(i32) c = 30303 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs index 462e1c59aea22..91f0e14157ee3 100644 --- a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs @@ -58,39 +58,51 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:print y -// lldb-check:[...]$1 = true +// lldbg-check:[...]$1 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 10 +// lldbg-check:[...]$2 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:print y -// lldb-check:[...]$3 = true +// lldbg-check:[...]$3 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = 10.5 +// lldbg-check:[...]$4 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldb-check:[...]$5 = 20 +// lldbg-check:[...]$5 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$6 = true +// lldbg-check:[...]$6 = true +// lldbr-check:(bool) x = true // lldb-command:print y -// lldb-check:[...]$7 = 2220 +// lldbg-check:[...]$7 = 2220 +// lldbr-check:(i32) y = 2220 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$8 = 203203.5 +// lldbg-check:[...]$8 = 203203.5 +// lldbr-check:(f64) x = 203203.5 // lldb-command:print y -// lldb-check:[...]$9 = 2220 +// lldbg-check:[...]$9 = 2220 +// lldbr-check:(i32) y = 2220 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$10 = 10.5 +// lldbg-check:[...]$10 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldb-check:[...]$11 = 20 +// lldbg-check:[...]$11 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/packed-struct-with-destructor.rs b/src/test/debuginfo/packed-struct-with-destructor.rs index 50bd857d46076..d5273d53dc59a 100644 --- a/src/test/debuginfo/packed-struct-with-destructor.rs +++ b/src/test/debuginfo/packed-struct-with-destructor.rs @@ -56,28 +56,36 @@ // lldb-command:run // lldb-command:print packed -// lldb-check:[...]$0 = Packed { x: 123, y: 234, z: 345 } +// lldbg-check:[...]$0 = Packed { x: 123, y: 234, z: 345 } +// lldbr-check:(packed_struct_with_destructor::Packed) packed = Packed { x: 123, y: 234, z: 345 } // lldb-command:print packedInPacked -// lldb-check:[...]$1 = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } +// lldbg-check:[...]$1 = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } +// lldbr-check:(packed_struct_with_destructor::PackedInPacked) packedInPacked = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } // lldb-command:print packedInUnpacked -// lldb-check:[...]$2 = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } +// lldbg-check:[...]$2 = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } +// lldbr-check:(packed_struct_with_destructor::PackedInUnpacked) packedInUnpacked = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } // lldb-command:print unpackedInPacked -// lldb-check:[...]$3 = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654 }, c: Unpacked { x: 543, y: 432, z: 321 }, d: 210 } +// lldbg-check:[...]$3 = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654 }, c: Unpacked { x: 543, y: 432, z: 321 }, d: 210 } +// lldbr-check:(packed_struct_with_destructor::UnpackedInPacked) unpackedInPacked = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654 }, c: Unpacked { x: 543, y: 432, z: 321 }, d: 210 } // lldb-command:print packedInPackedWithDrop -// lldb-check:[...]$4 = PackedInPackedWithDrop { a: 11, b: Packed { x: 22, y: 33, z: 44 }, c: 55, d: Packed { x: 66, y: 77, z: 88 } } +// lldbg-check:[...]$4 = PackedInPackedWithDrop { a: 11, b: Packed { x: 22, y: 33, z: 44 }, c: 55, d: Packed { x: 66, y: 77, z: 88 } } +// lldbr-check:(packed_struct_with_destructor::PackedInPackedWithDrop) packedInPackedWithDrop = PackedInPackedWithDrop { a: 11, b: Packed { x: 22, y: 33, z: 44 }, c: 55, d: Packed { x: 66, y: 77, z: 88 } } // lldb-command:print packedInUnpackedWithDrop -// lldb-check:[...]$5 = PackedInUnpackedWithDrop { a: -11, b: Packed { x: -22, y: -33, z: -44 }, c: -55, d: Packed { x: -66, y: -77, z: -88 } } +// lldbg-check:[...]$5 = PackedInUnpackedWithDrop { a: -11, b: Packed { x: -22, y: -33, z: -44 }, c: -55, d: Packed { x: -66, y: -77, z: -88 } } +// lldbr-check:(packed_struct_with_destructor::PackedInUnpackedWithDrop) packedInUnpackedWithDrop = PackedInUnpackedWithDrop { a: -11, b: Packed { x: -22, y: -33, z: -44 }, c: -55, d: Packed { x: -66, y: -77, z: -88 } } // lldb-command:print unpackedInPackedWithDrop -// lldb-check:[...]$6 = UnpackedInPackedWithDrop { a: 98, b: Unpacked { x: 87, y: 76, z: 65 }, c: Unpacked { x: 54, y: 43, z: 32 }, d: 21 } +// lldbg-check:[...]$6 = UnpackedInPackedWithDrop { a: 98, b: Unpacked { x: 87, y: 76, z: 65 }, c: Unpacked { x: 54, y: 43, z: 32 }, d: 21 } +// lldbr-check:(packed_struct_with_destructor::UnpackedInPackedWithDrop) unpackedInPackedWithDrop = UnpackedInPackedWithDrop { a: 98, b: Unpacked { x: 87, y: 76, z: 65 }, c: Unpacked { x: 54, y: 43, z: 32 }, d: 21 } // lldb-command:print deeplyNested -// lldb-check:[...]$7 = DeeplyNested { a: PackedInPacked { a: 1, b: Packed { x: 2, y: 3, z: 4 }, c: 5, d: Packed { x: 6, y: 7, z: 8 } }, b: UnpackedInPackedWithDrop { a: 9, b: Unpacked { x: 10, y: 11, z: 12 }, c: Unpacked { x: 13, y: 14, z: 15 }, d: 16 }, c: PackedInUnpacked { a: 17, b: Packed { x: 18, y: 19, z: 20 }, c: 21, d: Packed { x: 22, y: 23, z: 24 } }, d: PackedInUnpackedWithDrop { a: 25, b: Packed { x: 26, y: 27, z: 28 }, c: 29, d: Packed { x: 30, y: 31, z: 32 } }, e: UnpackedInPacked { a: 33, b: Unpacked { x: 34, y: 35, z: 36 }, c: Unpacked { x: 37, y: 38, z: 39 }, d: 40 }, f: PackedInPackedWithDrop { a: 41, b: Packed { x: 42, y: 43, z: 44 }, c: 45, d: Packed { x: 46, y: 47, z: 48 } } } +// lldbg-check:[...]$7 = DeeplyNested { a: PackedInPacked { a: 1, b: Packed { x: 2, y: 3, z: 4 }, c: 5, d: Packed { x: 6, y: 7, z: 8 } }, b: UnpackedInPackedWithDrop { a: 9, b: Unpacked { x: 10, y: 11, z: 12 }, c: Unpacked { x: 13, y: 14, z: 15 }, d: 16 }, c: PackedInUnpacked { a: 17, b: Packed { x: 18, y: 19, z: 20 }, c: 21, d: Packed { x: 22, y: 23, z: 24 } }, d: PackedInUnpackedWithDrop { a: 25, b: Packed { x: 26, y: 27, z: 28 }, c: 29, d: Packed { x: 30, y: 31, z: 32 } }, e: UnpackedInPacked { a: 33, b: Unpacked { x: 34, y: 35, z: 36 }, c: Unpacked { x: 37, y: 38, z: 39 }, d: 40 }, f: PackedInPackedWithDrop { a: 41, b: Packed { x: 42, y: 43, z: 44 }, c: 45, d: Packed { x: 46, y: 47, z: 48 } } } +// lldbr-check:(packed_struct_with_destructor::DeeplyNested) deeplyNested = DeeplyNested { a: PackedInPacked { a: 1, b: Packed { x: 2, y: 3, z: 4 }, c: 5, d: Packed { x: 6, y: 7, z: 8 } }, b: UnpackedInPackedWithDrop { a: 9, b: Unpacked { x: 10, y: 11, z: 12 }, c: Unpacked { x: 13, y: 14, z: 15 }, d: 16 }, c: PackedInUnpacked { a: 17, b: Packed { x: 18, y: 19, z: 20 }, c: 21, d: Packed { x: 22, y: 23, z: 24 } }, d: PackedInUnpackedWithDrop { a: 25, b: Packed { x: 26, y: 27, z: 28 }, c: 29, d: Packed { x: 30, y: 31, z: 32 } }, e: UnpackedInPacked { a: 33, b: Unpacked { x: 34, y: 35, z: 36 }, c: Unpacked { x: 37, y: 38, z: 39 }, d: 40 }, f: PackedInPackedWithDrop { a: 41, b: Packed { x: 42, y: 43, z: 44 }, c: 45, d: Packed { x: 46, y: 47, z: 48 } } } #![allow(unused_variables)] diff --git a/src/test/debuginfo/packed-struct.rs b/src/test/debuginfo/packed-struct.rs index 16e6371a9c0a9..2ed3711fbde80 100644 --- a/src/test/debuginfo/packed-struct.rs +++ b/src/test/debuginfo/packed-struct.rs @@ -46,22 +46,28 @@ // lldb-command:run // lldb-command:print packed -// lldb-check:[...]$0 = Packed { x: 123, y: 234, z: 345 } +// lldbg-check:[...]$0 = Packed { x: 123, y: 234, z: 345 } +// lldbr-check:(packed_struct::Packed) packed = Packed { x: 123, y: 234, z: 345 } // lldb-command:print packedInPacked -// lldb-check:[...]$1 = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } +// lldbg-check:[...]$1 = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } +// lldbr-check:(packed_struct::PackedInPacked) packedInPacked = PackedInPacked { a: 1111, b: Packed { x: 2222, y: 3333, z: 4444 }, c: 5555, d: Packed { x: 6666, y: 7777, z: 8888 } } // lldb-command:print packedInUnpacked -// lldb-check:[...]$2 = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } +// lldbg-check:[...]$2 = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } +// lldbr-check:(packed_struct::PackedInUnpacked) packedInUnpacked = PackedInUnpacked { a: -1111, b: Packed { x: -2222, y: -3333, z: -4444 }, c: -5555, d: Packed { x: -6666, y: -7777, z: -8888 } } // lldb-command:print unpackedInPacked -// lldb-check:[...]$3 = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654, w: 543 }, c: Unpacked { x: 432, y: 321, z: 210, w: 109 }, d: -98 } +// lldbg-check:[...]$3 = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654, w: 543 }, c: Unpacked { x: 432, y: 321, z: 210, w: 109 }, d: -98 } +// lldbr-check:(packed_struct::UnpackedInPacked) unpackedInPacked = UnpackedInPacked { a: 987, b: Unpacked { x: 876, y: 765, z: 654, w: 543 }, c: Unpacked { x: 432, y: 321, z: 210, w: 109 }, d: -98 } // lldb-command:print sizeof(packed) -// lldb-check:[...]$4 = 14 +// lldbg-check:[...]$4 = 14 +// lldbr-check:(usize) = 14 // lldb-command:print sizeof(packedInPacked) -// lldb-check:[...]$5 = 40 +// lldbg-check:[...]$5 = 40 +// lldbr-check:(usize) = 40 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/self-in-default-method.rs b/src/test/debuginfo/self-in-default-method.rs index 796d122cd66ba..a9acaab7dfc06 100644 --- a/src/test/debuginfo/self-in-default-method.rs +++ b/src/test/debuginfo/self-in-default-method.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct { x: 100 } +// lldbg-check:[...]$0 = Struct { x: 100 } +// lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldbg-check:[...]$2 = -2 +// lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct { x: 100 } +// lldbg-check:[...]$3 = Struct { x: 100 } +// lldbr-check:(self_in_default_method::Struct) self = Struct { x: 100 } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 200 } +// lldbg-check:[...]$6 = Struct { x: 200 } +// lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 200 } +// lldbg-check:[...]$9 = Struct { x: 200 } +// lldbr-check:(self_in_default_method::Struct) self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 200 } +// lldbg-check:[...]$12 = Struct { x: 200 } +// lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldbg-check:[...]$14 = -10 +// lldbr-check:(isize) arg2 = -10 // lldb-command:continue #![feature(box_syntax)] diff --git a/src/test/debuginfo/self-in-generic-default-method.rs b/src/test/debuginfo/self-in-generic-default-method.rs index b07d7ca5fb7b7..2613300b8d996 100644 --- a/src/test/debuginfo/self-in-generic-default-method.rs +++ b/src/test/debuginfo/self-in-generic-default-method.rs @@ -73,47 +73,62 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Struct { x: 987 } +// lldbg-check:[...]$0 = Struct { x: 987 } +// lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 987 } // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldbg-check:[...]$1 = -1 +// lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = 2 +// lldbg-check:[...]$2 = 2 +// lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Struct { x: 987 } +// lldbg-check:[...]$3 = Struct { x: 987 } +// lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 987 } // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldbg-check:[...]$4 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldbg-check:[...]$5 = -4 +// lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Struct { x: 879 } +// lldbg-check:[...]$6 = Struct { x: 879 } +// lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldbg-check:[...]$7 = -5 +// lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldbg-check:[...]$8 = -6 +// lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Struct { x: 879 } +// lldbg-check:[...]$9 = Struct { x: 879 } +// lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 879 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldbg-check:[...]$10 = -7 +// lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldbg-check:[...]$11 = -8 +// lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Struct { x: 879 } +// lldbg-check:[...]$12 = Struct { x: 879 } +// lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldbg-check:[...]$13 = -9 +// lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10.5 +// lldbg-check:[...]$14 = -10.5 +// lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue #![feature(box_syntax)] diff --git a/src/test/debuginfo/shadowed-argument.rs b/src/test/debuginfo/shadowed-argument.rs index baf782b7e678a..49d876d4530b9 100644 --- a/src/test/debuginfo/shadowed-argument.rs +++ b/src/test/debuginfo/shadowed-argument.rs @@ -40,21 +40,27 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:print y -// lldb-check:[...]$1 = true +// lldbg-check:[...]$1 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 10 +// lldbg-check:[...]$2 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:print y -// lldb-check:[...]$3 = true +// lldbg-check:[...]$3 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = 10.5 +// lldbg-check:[...]$4 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldb-check:[...]$5 = 20 +// lldbg-check:[...]$5 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/src/test/debuginfo/shadowed-variable.rs b/src/test/debuginfo/shadowed-variable.rs index 6e4d94d26cdeb..3a8f6d3b70d16 100644 --- a/src/test/debuginfo/shadowed-variable.rs +++ b/src/test/debuginfo/shadowed-variable.rs @@ -50,33 +50,43 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:print y -// lldb-check:[...]$1 = true +// lldbg-check:[...]$1 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 10 +// lldbg-check:[...]$2 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:print y -// lldb-check:[...]$3 = true +// lldbg-check:[...]$3 = true +// lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = 10.5 +// lldbg-check:[...]$4 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldb-check:[...]$5 = 20 +// lldbg-check:[...]$5 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$6 = 10.5 +// lldbg-check:[...]$6 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldb-check:[...]$7 = 20 +// lldbg-check:[...]$7 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$8 = 11.5 +// lldbg-check:[...]$8 = 11.5 +// lldbr-check:(f64) x = 11.5 // lldb-command:print y -// lldb-check:[...]$9 = 20 +// lldbg-check:[...]$9 = 20 +// lldbr-check:(i32) y = 20 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/simple-lexical-scope.rs b/src/test/debuginfo/simple-lexical-scope.rs index 5f9a4fd080534..935a0bb2ae443 100644 --- a/src/test/debuginfo/simple-lexical-scope.rs +++ b/src/test/debuginfo/simple-lexical-scope.rs @@ -50,31 +50,38 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = false +// lldbg-check:[...]$0 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = false +// lldbg-check:[...]$1 = false +// lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$2 = 10 +// lldbg-check:[...]$2 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$3 = 10 +// lldbg-check:[...]$3 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$4 = 10.5 +// lldbg-check:[...]$4 = 10.5 +// lldbr-check:(f64) x = 10.5 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$5 = 10 +// lldbg-check:[...]$5 = 10 +// lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$6 = false +// lldbg-check:[...]$6 = false +// lldbr-check:(bool) x = false // lldb-command:continue diff --git a/src/test/debuginfo/simple-struct.rs b/src/test/debuginfo/simple-struct.rs index 8fdf204d30ab5..e27324fe33066 100644 --- a/src/test/debuginfo/simple-struct.rs +++ b/src/test/debuginfo/simple-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // min-lldb-version: 310 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 @@ -108,22 +110,28 @@ // lldb-command:run // lldb-command:print no_padding16 -// lldb-check:[...]$0 = NoPadding16 { x: 10000, y: -10001 } +// lldbg-check:[...]$0 = NoPadding16 { x: 10000, y: -10001 } +// lldbr-check:(simple_struct::NoPadding16) no_padding16 = NoPadding16 { x: 10000, y: -10001 } // lldb-command:print no_padding32 -// lldb-check:[...]$1 = NoPadding32 { x: -10002, y: -10003.5, z: 10004 } +// lldbg-check:[...]$1 = NoPadding32 { x: -10002, y: -10003.5, z: 10004 } +// lldbr-check:(simple_struct::NoPadding32) no_padding32 = NoPadding32 { x: -10002, y: -10003.5, z: 10004 } // lldb-command:print no_padding64 -// lldb-check:[...]$2 = NoPadding64 { x: -10005.5, y: 10006, z: 10007 } +// lldbg-check:[...]$2 = NoPadding64 { x: -10005.5, y: 10006, z: 10007 } +// lldbr-check:(simple_struct::NoPadding64) no_padding64 = NoPadding64 { x: -10005.5, y: 10006, z: 10007 } // lldb-command:print no_padding163264 -// lldb-check:[...]$3 = NoPadding163264 { a: -10008, b: 10009, c: 10010, d: 10011 } +// lldbg-check:[...]$3 = NoPadding163264 { a: -10008, b: 10009, c: 10010, d: 10011 } +// lldbr-check:(simple_struct::NoPadding163264) no_padding163264 = NoPadding163264 { a: -10008, b: 10009, c: 10010, d: 10011 } // lldb-command:print internal_padding -// lldb-check:[...]$4 = InternalPadding { x: 10012, y: -10013 } +// lldbg-check:[...]$4 = InternalPadding { x: 10012, y: -10013 } +// lldbr-check:(simple_struct::InternalPadding) internal_padding = InternalPadding { x: 10012, y: -10013 } // lldb-command:print padding_at_end -// lldb-check:[...]$5 = PaddingAtEnd { x: -10014, y: 10015 } +// lldbg-check:[...]$5 = PaddingAtEnd { x: -10014, y: 10015 } +// lldbr-check:(simple_struct::PaddingAtEnd) padding_at_end = PaddingAtEnd { x: -10014, y: 10015 } #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/debuginfo/simple-tuple.rs b/src/test/debuginfo/simple-tuple.rs index 8f69672c88844..ea0fd4e37fd42 100644 --- a/src/test/debuginfo/simple-tuple.rs +++ b/src/test/debuginfo/simple-tuple.rs @@ -110,21 +110,28 @@ // lldb-command:run // lldb-command:print/d noPadding8 -// lldb-check:[...]$0 = (-100, 100) +// lldbg-check:[...]$0 = (-100, 100) +// lldbr-check:((i8, u8)) noPadding8 = { = -100 -100 = 100 100 } // lldb-command:print noPadding16 -// lldb-check:[...]$1 = (0, 1, 2) +// lldbg-check:[...]$1 = (0, 1, 2) +// lldbr-check:((i16, i16, u16)) noPadding16 = { = 0 = 1 = 2 } // lldb-command:print noPadding32 -// lldb-check:[...]$2 = (3, 4.5, 5) +// lldbg-check:[...]$2 = (3, 4.5, 5) +// lldbr-check:((i32, f32, u32)) noPadding32 = { = 3 = 4.5 = 5 } // lldb-command:print noPadding64 -// lldb-check:[...]$3 = (6, 7.5, 8) +// lldbg-check:[...]$3 = (6, 7.5, 8) +// lldbr-check:((i64, f64, u64)) noPadding64 = { = 6 = 7.5 = 8 } // lldb-command:print internalPadding1 -// lldb-check:[...]$4 = (9, 10) +// lldbg-check:[...]$4 = (9, 10) +// lldbr-check:((i16, i32)) internalPadding1 = { = 9 = 10 } // lldb-command:print internalPadding2 -// lldb-check:[...]$5 = (11, 12, 13, 14) +// lldbg-check:[...]$5 = (11, 12, 13, 14) +// lldbr-check:((i16, i32, u32, u64)) internalPadding2 = { = 11 = 12 = 13 = 14 } // lldb-command:print paddingAtEnd -// lldb-check:[...]$6 = (15, 16) +// lldbg-check:[...]$6 = (15, 16) +// lldbr-check:((i32, i16)) paddingAtEnd = { = 15 = 16 } #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/debuginfo/static-method-on-struct-and-enum.rs b/src/test/debuginfo/static-method-on-struct-and-enum.rs index dab4ab515d995..75a67c6b84bce 100644 --- a/src/test/debuginfo/static-method-on-struct-and-enum.rs +++ b/src/test/debuginfo/static-method-on-struct-and-enum.rs @@ -39,18 +39,23 @@ // STRUCT // lldb-command:print arg1 -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) arg1 = 1 // lldb-command:print arg2 -// lldb-check:[...]$1 = 2 +// lldbg-check:[...]$1 = 2 +// lldbr-check:(isize) arg2 = 2 // lldb-command:continue // ENUM // lldb-command:print arg1 -// lldb-check:[...]$2 = -3 +// lldbg-check:[...]$2 = -3 +// lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldb-check:[...]$3 = 4.5 +// lldbg-check:[...]$3 = 4.5 +// lldbr-check:(f64) arg2 = 4.5 // lldb-command:print arg3 -// lldb-check:[...]$4 = 5 +// lldbg-check:[...]$4 = 5 +// lldbr-check:(usize) arg3 = 5 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/struct-in-struct.rs b/src/test/debuginfo/struct-in-struct.rs index 46524cf1d029a..129500860c82f 100644 --- a/src/test/debuginfo/struct-in-struct.rs +++ b/src/test/debuginfo/struct-in-struct.rs @@ -35,28 +35,36 @@ // lldb-command:run // lldb-command:print three_simple_structs -// lldb-check:[...]$0 = ThreeSimpleStructs { x: Simple { x: 1 }, y: Simple { x: 2 }, z: Simple { x: 3 } } +// lldbg-check:[...]$0 = ThreeSimpleStructs { x: Simple { x: 1 }, y: Simple { x: 2 }, z: Simple { x: 3 } } +// lldbr-check:(struct_in_struct::ThreeSimpleStructs) three_simple_structs = ThreeSimpleStructs { x: Simple { x: 1 }, y: Simple { x: 2 }, z: Simple { x: 3 } } // lldb-command:print internal_padding_parent -// lldb-check:[...]$1 = InternalPaddingParent { x: InternalPadding { x: 4, y: 5 }, y: InternalPadding { x: 6, y: 7 }, z: InternalPadding { x: 8, y: 9 } } +// lldbg-check:[...]$1 = InternalPaddingParent { x: InternalPadding { x: 4, y: 5 }, y: InternalPadding { x: 6, y: 7 }, z: InternalPadding { x: 8, y: 9 } } +// lldbr-check:(struct_in_struct::InternalPaddingParent) internal_padding_parent = InternalPaddingParent { x: InternalPadding { x: 4, y: 5 }, y: InternalPadding { x: 6, y: 7 }, z: InternalPadding { x: 8, y: 9 } } // lldb-command:print padding_at_end_parent -// lldb-check:[...]$2 = PaddingAtEndParent { x: PaddingAtEnd { x: 10, y: 11 }, y: PaddingAtEnd { x: 12, y: 13 }, z: PaddingAtEnd { x: 14, y: 15 } } +// lldbg-check:[...]$2 = PaddingAtEndParent { x: PaddingAtEnd { x: 10, y: 11 }, y: PaddingAtEnd { x: 12, y: 13 }, z: PaddingAtEnd { x: 14, y: 15 } } +// lldbr-check:(struct_in_struct::PaddingAtEndParent) padding_at_end_parent = PaddingAtEndParent { x: PaddingAtEnd { x: 10, y: 11 }, y: PaddingAtEnd { x: 12, y: 13 }, z: PaddingAtEnd { x: 14, y: 15 } } // lldb-command:print mixed -// lldb-check:[...]$3 = Mixed { x: PaddingAtEnd { x: 16, y: 17 }, y: InternalPadding { x: 18, y: 19 }, z: Simple { x: 20 }, w: 21 } +// lldbg-check:[...]$3 = Mixed { x: PaddingAtEnd { x: 16, y: 17 }, y: InternalPadding { x: 18, y: 19 }, z: Simple { x: 20 }, w: 21 } +// lldbr-check:(struct_in_struct::Mixed) mixed = Mixed { x: PaddingAtEnd { x: 16, y: 17 }, y: InternalPadding { x: 18, y: 19 }, z: Simple { x: 20 }, w: 21 } // lldb-command:print bag -// lldb-check:[...]$4 = Bag { x: Simple { x: 22 } } +// lldbg-check:[...]$4 = Bag { x: Simple { x: 22 } } +// lldbr-check:(struct_in_struct::Bag) bag = Bag { x: Simple { x: 22 } } // lldb-command:print bag_in_bag -// lldb-check:[...]$5 = BagInBag { x: Bag { x: Simple { x: 23 } } } +// lldbg-check:[...]$5 = BagInBag { x: Bag { x: Simple { x: 23 } } } +// lldbr-check:(struct_in_struct::BagInBag) bag_in_bag = BagInBag { x: Bag { x: Simple { x: 23 } } } // lldb-command:print tjo -// lldb-check:[...]$6 = ThatsJustOverkill { x: BagInBag { x: Bag { x: Simple { x: 24 } } } } +// lldbg-check:[...]$6 = ThatsJustOverkill { x: BagInBag { x: Bag { x: Simple { x: 24 } } } } +// lldbr-check:(struct_in_struct::ThatsJustOverkill) tjo = ThatsJustOverkill { x: BagInBag { x: Bag { x: Simple { x: 24 } } } } // lldb-command:print tree -// lldb-check:[...]$7 = Tree { x: Simple { x: 25 }, y: InternalPaddingParent { x: InternalPadding { x: 26, y: 27 }, y: InternalPadding { x: 28, y: 29 }, z: InternalPadding { x: 30, y: 31 } }, z: BagInBag { x: Bag { x: Simple { x: 32 } } } } +// lldbg-check:[...]$7 = Tree { x: Simple { x: 25 }, y: InternalPaddingParent { x: InternalPadding { x: 26, y: 27 }, y: InternalPadding { x: 28, y: 29 }, z: InternalPadding { x: 30, y: 31 } }, z: BagInBag { x: Bag { x: Simple { x: 32 } } } } +// lldbr-check:(struct_in_struct::Tree) tree = Tree { x: Simple { x: 25 }, y: InternalPaddingParent { x: InternalPadding { x: 26, y: 27 }, y: InternalPadding { x: 28, y: 29 }, z: InternalPadding { x: 30, y: 31 } }, z: BagInBag { x: Bag { x: Simple { x: 32 } } } } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/struct-namespace.rs b/src/test/debuginfo/struct-namespace.rs index 3fd4cf57b2a80..efa415c7100b8 100644 --- a/src/test/debuginfo/struct-namespace.rs +++ b/src/test/debuginfo/struct-namespace.rs @@ -16,14 +16,18 @@ // lldb-command:run // lldb-command:p struct1 -// lldb-check:(struct_namespace::Struct1) $0 = [...] +// lldbg-check:(struct_namespace::Struct1) $0 = [...] +// lldbr-check:(struct_namespace::Struct1) struct1 = Struct1 { a: 0, b: 1 } // lldb-command:p struct2 -// lldb-check:(struct_namespace::Struct2) $1 = [...] +// lldbg-check:(struct_namespace::Struct2) $1 = [...] +// lldbr-check:(struct_namespace::Struct2) struct2 = { = 2 } // lldb-command:p mod1_struct1 -// lldb-check:(struct_namespace::mod1::Struct1) $2 = [...] +// lldbg-check:(struct_namespace::mod1::Struct1) $2 = [...] +// lldbr-check:(struct_namespace::mod1::Struct1) mod1_struct1 = Struct1 { a: 3, b: 4 } // lldb-command:p mod1_struct2 -// lldb-check:(struct_namespace::mod1::Struct2) $3 = [...] +// lldbg-check:(struct_namespace::mod1::Struct2) $3 = [...] +// lldbr-check:(struct_namespace::mod1::Struct2) mod1_struct2 = { = 5 } #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs index b156a3be699e3..36cd85fb4dc65 100644 --- a/src/test/debuginfo/struct-style-enum.rs +++ b/src/test/debuginfo/struct-style-enum.rs @@ -41,16 +41,20 @@ // lldb-command:run // lldb-command:print case1 -// lldb-check:[...]$0 = Case1 { a: 0, b: 31868, c: 31868, d: 31868, e: 31868 } +// lldbg-check:[...]$0 = Case1 { a: 0, b: 31868, c: 31868, d: 31868, e: 31868 } +// lldbr-check:(struct_style_enum::Regular::Case1) case1 = { a = 0 b = 31868 c = 31868 d = 31868 e = 31868 } // lldb-command:print case2 -// lldb-check:[...]$1 = Case2 { a: 0, b: 286331153, c: 286331153 } +// lldbg-check:[...]$1 = Case2 { a: 0, b: 286331153, c: 286331153 } +// lldbr-check:(struct_style_enum::Regular::Case2) case2 = Case2 { struct_style_enum::Regular::Case1: 0, struct_style_enum::Regular::Case2: 286331153, struct_style_enum::Regular::Case3: 286331153 } // lldb-command:print case3 -// lldb-check:[...]$2 = Case3 { a: 0, b: 6438275382588823897 } +// lldbg-check:[...]$2 = Case3 { a: 0, b: 6438275382588823897 } +// lldbr-check:(struct_style_enum::Regular::Case3) case3 = Case3 { struct_style_enum::Regular::Case1: 0, struct_style_enum::Regular::Case2: 6438275382588823897 } // lldb-command:print univariant -// lldb-check:[...]$3 = TheOnlyCase { a: -1 } +// lldbg-check:[...]$3 = TheOnlyCase { a: -1 } +// lldbr-check:(struct_style_enum::Univariant) univariant = Univariant { struct_style_enum::TheOnlyCase: TheOnlyCase { a: -1 } } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/struct-with-destructor.rs b/src/test/debuginfo/struct-with-destructor.rs index ab935a07d650f..f7722bb377531 100644 --- a/src/test/debuginfo/struct-with-destructor.rs +++ b/src/test/debuginfo/struct-with-destructor.rs @@ -38,16 +38,20 @@ // lldb-command:run // lldb-command:print simple -// lldb-check:[...]$0 = WithDestructor { x: 10, y: 20 } +// lldbg-check:[...]$0 = WithDestructor { x: 10, y: 20 } +// lldbr-check:(struct_with_destructor::WithDestructor) simple = WithDestructor { x: 10, y: 20 } // lldb-command:print noDestructor -// lldb-check:[...]$1 = NoDestructorGuarded { a: NoDestructor { x: 10, y: 20 }, guard: -1 } +// lldbg-check:[...]$1 = NoDestructorGuarded { a: NoDestructor { x: 10, y: 20 }, guard: -1 } +// lldbr-check:(struct_with_destructor::NoDestructorGuarded) noDestructor = NoDestructorGuarded { a: NoDestructor { x: 10, y: 20 }, guard: -1 } // lldb-command:print withDestructor -// lldb-check:[...]$2 = WithDestructorGuarded { a: WithDestructor { x: 10, y: 20 }, guard: -1 } +// lldbg-check:[...]$2 = WithDestructorGuarded { a: WithDestructor { x: 10, y: 20 }, guard: -1 } +// lldbr-check:(struct_with_destructor::WithDestructorGuarded) withDestructor = WithDestructorGuarded { a: WithDestructor { x: 10, y: 20 }, guard: -1 } // lldb-command:print nested -// lldb-check:[...]$3 = NestedOuter { a: NestedInner { a: WithDestructor { x: 7890, y: 9870 } } } +// lldbg-check:[...]$3 = NestedOuter { a: NestedInner { a: WithDestructor { x: 7890, y: 9870 } } } +// lldbr-check:(struct_with_destructor::NestedOuter) nested = NestedOuter { a: NestedInner { a: WithDestructor { x: 7890, y: 9870 } } } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/tuple-in-tuple.rs b/src/test/debuginfo/tuple-in-tuple.rs index 4ebc740b9c0f7..79335a3d0e139 100644 --- a/src/test/debuginfo/tuple-in-tuple.rs +++ b/src/test/debuginfo/tuple-in-tuple.rs @@ -46,21 +46,28 @@ // lldb-command:run // lldb-command:print no_padding1 -// lldb-check:[...]$0 = ((0, 1), 2, 3) +// lldbg-check:[...]$0 = ((0, 1), 2, 3) +// lldbr-check:(((u32, u32), u32, u32)) no_padding1 = { = { = 0 = 1 } = 2 = 3 } // lldb-command:print no_padding2 -// lldb-check:[...]$1 = (4, (5, 6), 7) +// lldbg-check:[...]$1 = (4, (5, 6), 7) +// lldbr-check:((u32, (u32, u32), u32)) no_padding2 = { = 4 = { = 5 = 6 } = 7 } // lldb-command:print no_padding3 -// lldb-check:[...]$2 = (8, 9, (10, 11)) +// lldbg-check:[...]$2 = (8, 9, (10, 11)) +// lldbr-check:((u32, u32, (u32, u32))) no_padding3 = { = 8 = 9 = { = 10 = 11 } } // lldb-command:print internal_padding1 -// lldb-check:[...]$3 = (12, (13, 14)) +// lldbg-check:[...]$3 = (12, (13, 14)) +// lldbr-check:((i16, (i32, i32))) internal_padding1 = { = 12 = { = 13 = 14 } } // lldb-command:print internal_padding2 -// lldb-check:[...]$4 = (15, (16, 17)) +// lldbg-check:[...]$4 = (15, (16, 17)) +// lldbr-check:((i16, (i16, i32))) internal_padding2 = { = 15 = { = 16 = 17 } } // lldb-command:print padding_at_end1 -// lldb-check:[...]$5 = (18, (19, 20)) +// lldbg-check:[...]$5 = (18, (19, 20)) +// lldbr-check:((i32, (i32, i16))) padding_at_end1 = { = 18 = { = 19 = 20 } } // lldb-command:print padding_at_end2 -// lldb-check:[...]$6 = ((21, 22), 23) +// lldbg-check:[...]$6 = ((21, 22), 23) +// lldbr-check:(((i32, i16), i32)) padding_at_end2 = { = { = 21 = 22 } = 23 } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/tuple-struct.rs b/src/test/debuginfo/tuple-struct.rs index aa644d8419b54..def48c84488dc 100644 --- a/src/test/debuginfo/tuple-struct.rs +++ b/src/test/debuginfo/tuple-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // min-lldb-version: 310 // compile-flags:-g @@ -46,22 +48,28 @@ // lldb-command:run // lldb-command:print no_padding16 -// lldb-check:[...]$0 = NoPadding16(10000, -10001) +// lldbg-check:[...]$0 = NoPadding16(10000, -10001) +// lldbr-check:(tuple_struct::NoPadding16) no_padding16 = { = 10000 = -10001 } // lldb-command:print no_padding32 -// lldb-check:[...]$1 = NoPadding32(-10002, -10003.5, 10004) +// lldbg-check:[...]$1 = NoPadding32(-10002, -10003.5, 10004) +// lldbr-check:(tuple_struct::NoPadding32) no_padding32 = { = -10002 = -10003.5 = 10004 } // lldb-command:print no_padding64 -// lldb-check:[...]$2 = NoPadding64(-10005.5, 10006, 10007) +// lldbg-check:[...]$2 = NoPadding64(-10005.5, 10006, 10007) +// lldbr-check:(tuple_struct::NoPadding64) no_padding64 = { = -10005.5 = 10006 = 10007 } // lldb-command:print no_padding163264 -// lldb-check:[...]$3 = NoPadding163264(-10008, 10009, 10010, 10011) +// lldbg-check:[...]$3 = NoPadding163264(-10008, 10009, 10010, 10011) +// lldbr-check:(tuple_struct::NoPadding163264) no_padding163264 = { = -10008 = 10009 = 10010 = 10011 } // lldb-command:print internal_padding -// lldb-check:[...]$4 = InternalPadding(10012, -10013) +// lldbg-check:[...]$4 = InternalPadding(10012, -10013) +// lldbr-check:(tuple_struct::InternalPadding) internal_padding = { = 10012 = -10013 } // lldb-command:print padding_at_end -// lldb-check:[...]$5 = PaddingAtEnd(-10014, 10015) +// lldbg-check:[...]$5 = PaddingAtEnd(-10014, 10015) +// lldbr-check:(tuple_struct::PaddingAtEnd) padding_at_end = { = -10014 = 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/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs index f36153d1f5c5a..682e74601b0a1 100644 --- a/src/test/debuginfo/tuple-style-enum.rs +++ b/src/test/debuginfo/tuple-style-enum.rs @@ -41,16 +41,20 @@ // lldb-command:run // lldb-command:print case1 -// lldb-check:[...]$0 = Case1(0, 31868, 31868, 31868, 31868) +// lldbg-check:[...]$0 = Case1(0, 31868, 31868, 31868, 31868) +// lldbr-check:(tuple_style_enum::Regular::Case1) case1 = { = 0 = 31868 = 31868 = 31868 = 31868 } // lldb-command:print case2 -// lldb-check:[...]$1 = Case2(0, 286331153, 286331153) +// lldbg-check:[...]$1 = Case2(0, 286331153, 286331153) +// lldbr-check:(tuple_style_enum::Regular::Case2) case2 = Case2 { tuple_style_enum::Regular::Case1: 0, tuple_style_enum::Regular::Case2: 286331153, tuple_style_enum::Regular::Case3: 286331153 } // lldb-command:print case3 -// lldb-check:[...]$2 = Case3(0, 6438275382588823897) +// lldbg-check:[...]$2 = Case3(0, 6438275382588823897) +// lldbr-check:(tuple_style_enum::Regular::Case3) case3 = Case3 { tuple_style_enum::Regular::Case1: 0, tuple_style_enum::Regular::Case2: 6438275382588823897 } // lldb-command:print univariant -// lldb-check:[...]$3 = TheOnlyCase(-1) +// lldbg-check:[...]$3 = TheOnlyCase(-1) +// lldbr-check:(tuple_style_enum::Univariant) univariant = { tuple_style_enum::TheOnlyCase = { = -1 } } #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/union-smoke.rs b/src/test/debuginfo/union-smoke.rs index 622c7cf0d3334..7772127bad295 100644 --- a/src/test/debuginfo/union-smoke.rs +++ b/src/test/debuginfo/union-smoke.rs @@ -29,9 +29,13 @@ // lldb-command:run // lldb-command:print u -// lldb-check:[...]$0 = U { a: ('\x02', '\x02'), b: 514 } -// lldb-command:print union_smoke::SU -// lldb-check:[...]$1 = U { a: ('\x01', '\x01'), b: 257 } +// lldbg-check:[...]$0 = U { a: ('\x02', '\x02'), b: 514 } +// lldbr-check:(union_smoke::U) u = { a = { = 2 = 2 } b = 514 } + +// Don't test this with rust-enabled lldb for now; see +// https://github.com/rust-lang-nursery/lldb/issues/18 +// lldbg-command:print union_smoke::SU +// lldbg-check:[...]$1 = U { a: ('\x01', '\x01'), b: 257 } #![allow(unused)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs index 5a99de7779cff..6b62c30451394 100644 --- a/src/test/debuginfo/unique-enum.rs +++ b/src/test/debuginfo/unique-enum.rs @@ -36,13 +36,16 @@ // lldb-command:run // lldb-command:print *the_a -// lldb-check:[...]$0 = TheA { x: 0, y: 8970181431921507452 } +// lldbg-check:[...]$0 = TheA { x: 0, y: 8970181431921507452 } +// lldbr-check:(unique_enum::ABC::TheA) *the_a = TheA { unique_enum::ABC::TheA: 0, unique_enum::ABC::TheB: 8970181431921507452 } // lldb-command:print *the_b -// lldb-check:[...]$1 = TheB(0, 286331153, 286331153) +// lldbg-check:[...]$1 = TheB(0, 286331153, 286331153) +// lldbr-check:(unique_enum::ABC::TheB) *the_b = { = 0 = 286331153 = 286331153 } // lldb-command:print *univariant -// lldb-check:[...]$2 = TheOnlyCase(123234) +// lldbg-check:[...]$2 = TheOnlyCase(123234) +// lldbr-check:(unique_enum::Univariant) *univariant = { unique_enum::TheOnlyCase = { = 123234 } } #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/var-captured-in-nested-closure.rs b/src/test/debuginfo/var-captured-in-nested-closure.rs index b9a1d73b6d869..02c836bb6ac47 100644 --- a/src/test/debuginfo/var-captured-in-nested-closure.rs +++ b/src/test/debuginfo/var-captured-in-nested-closure.rs @@ -54,31 +54,43 @@ // lldb-command:run // lldb-command:print variable -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldb-check:[...]$1 = 2 +// lldbg-check:[...]$1 = 2 +// lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldb-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *struct_ref -// lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned -// lldb-check:[...]$4 = 6 +// lldbg-check:[...]$4 = 6 +// lldbr-check:(isize) *owned = 6 // lldb-command:print closure_local -// lldb-check:[...]$5 = 8 +// lldbg-check:[...]$5 = 8 +// lldbr-check:(isize) closure_local = 8 // lldb-command:continue // lldb-command:print variable -// lldb-check:[...]$6 = 1 +// lldbg-check:[...]$6 = 1 +// lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldb-check:[...]$7 = 2 +// lldbg-check:[...]$7 = 2 +// lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldb-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *struct_ref -// lldb-check:[...]$9 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$9 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned -// lldb-check:[...]$10 = 6 +// lldbg-check:[...]$10 = 6 +// lldbr-check:(isize) *owned = 6 // lldb-command:print closure_local -// lldb-check:[...]$11 = 8 +// lldbg-check:[...]$11 = 8 +// lldbr-check:(isize) closure_local = 8 // lldb-command:continue #![allow(unused_variables)] diff --git a/src/test/debuginfo/var-captured-in-sendable-closure.rs b/src/test/debuginfo/var-captured-in-sendable-closure.rs index 9aeb3bc91336a..a562584dfd028 100644 --- a/src/test/debuginfo/var-captured-in-sendable-closure.rs +++ b/src/test/debuginfo/var-captured-in-sendable-closure.rs @@ -34,11 +34,14 @@ // lldb-command:run // lldb-command:print constant -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) constant = 1 // lldb-command:print a_struct -// lldb-check:[...]$1 = Struct { a: -2, b: 3.5, c: 4 } +// lldbg-check:[...]$1 = Struct { a: -2, b: 3.5, c: 4 } +// lldbr-check:(var_captured_in_sendable_closure::Struct) a_struct = Struct { a: -2, b: 3.5, c: 4 } // lldb-command:print *owned -// lldb-check:[...]$2 = 5 +// lldbg-check:[...]$2 = 5 +// lldbr-check:(isize) *owned = 5 #![allow(unused_variables)] #![feature(box_syntax)] diff --git a/src/test/debuginfo/var-captured-in-stack-closure.rs b/src/test/debuginfo/var-captured-in-stack-closure.rs index c795a095b9769..cf4eaf393e956 100644 --- a/src/test/debuginfo/var-captured-in-stack-closure.rs +++ b/src/test/debuginfo/var-captured-in-stack-closure.rs @@ -50,28 +50,38 @@ // lldb-command:run // lldb-command:print variable -// lldb-check:[...]$0 = 1 +// lldbg-check:[...]$0 = 1 +// lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldb-check:[...]$1 = 2 +// lldbg-check:[...]$1 = 2 +// lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldb-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *struct_ref -// lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned -// lldb-check:[...]$4 = 6 +// lldbg-check:[...]$4 = 6 +// lldbr-check:(isize) *owned = 6 // lldb-command:continue // lldb-command:print variable -// lldb-check:[...]$5 = 2 +// lldbg-check:[...]$5 = 2 +// lldbr-check:(isize) variable = 2 // lldb-command:print constant -// lldb-check:[...]$6 = 2 +// lldbg-check:[...]$6 = 2 +// lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldb-check:[...]$7 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$7 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *struct_ref -// lldb-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 } +// lldbg-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 } +// lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned -// lldb-check:[...]$9 = 6 +// lldbg-check:[...]$9 = 6 +// lldbr-check:(isize) *owned = 6 #![feature(box_syntax)] #![allow(unused_variables)] diff --git a/src/test/debuginfo/vec-slices.rs b/src/test/debuginfo/vec-slices.rs index 888d9b28506b3..39bf0c175ebcb 100644 --- a/src/test/debuginfo/vec-slices.rs +++ b/src/test/debuginfo/vec-slices.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength + // ignore-windows // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 // min-lldb-version: 310 @@ -80,22 +82,28 @@ // lldb-command:run // lldb-command:print empty -// lldb-check:[...]$0 = &[] +// lldbg-check:[...]$0 = &[] +// lldbr-check:(&[i64]) empty = &[] // lldb-command:print singleton -// lldb-check:[...]$1 = &[1] +// lldbg-check:[...]$1 = &[1] +// lldbr-check:(&[i64]) singleton = &[1] // lldb-command:print multiple -// lldb-check:[...]$2 = &[2, 3, 4, 5] +// lldbg-check:[...]$2 = &[2, 3, 4, 5] +// lldbr-check:(&[i64]) multiple = &[2, 3, 4, 5] // lldb-command:print slice_of_slice -// lldb-check:[...]$3 = &[3, 4] +// lldbg-check:[...]$3 = &[3, 4] +// lldbr-check:(&[i64]) slice_of_slice = &[3, 4] // lldb-command:print padded_tuple -// lldb-check:[...]$4 = &[(6, 7), (8, 9)] +// lldbg-check:[...]$4 = &[(6, 7), (8, 9)] +// lldbr-check:(&[(i32, i16)]) padded_tuple = { data_ptr = *0x555555554ff0 length = 2 } // lldb-command:print padded_struct -// lldb-check:[...]$5 = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }] +// lldbg-check:[...]$5 = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }] +// lldbr-check:(&[vec_slices::AStruct]) padded_struct = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }] #![allow(dead_code, unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/test/debuginfo/vec.rs b/src/test/debuginfo/vec.rs index dba947530fea8..752f3f1cba1ec 100644 --- a/src/test/debuginfo/vec.rs +++ b/src/test/debuginfo/vec.rs @@ -28,7 +28,8 @@ // lldb-command:run // lldb-command:print a -// lldb-check:[...]$0 = [1, 2, 3] +// lldbg-check:[...]$0 = [1, 2, 3] +// lldbr-check:([i32; 3]) a = [1, 2, 3] #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index a4d839275c3eb..7006fb9427e1c 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -205,6 +205,9 @@ pub struct Config { /// Version of LLDB pub lldb_version: Option, + /// Whether LLDB has native rust support + pub lldb_native_rust: bool, + /// Version of LLVM pub llvm_version: Option, diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 8829d8808366b..688f2babe6e8c 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -133,6 +133,8 @@ impl EarlyProps { // Ignore if actual version is smaller the minimum required // version lldb_version_to_int(actual_version) < lldb_version_to_int(min_version) + } else if line.starts_with("rust-lldb") && !config.lldb_native_rust { + true } else { false } diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 2fa459bec9455..f46e031d768bd 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -282,6 +282,7 @@ pub fn parse_config(args: Vec) -> Config { let android_cross_path = opt_path(matches, "android-cross-path"); let (gdb, gdb_version, gdb_native_rust) = analyze_gdb(matches.opt_str("gdb"), &target, &android_cross_path); + let (lldb_version, lldb_native_rust) = extract_lldb_version(matches.opt_str("lldb-version")); let color = match matches.opt_str("color").as_ref().map(|x| &**x) { Some("auto") | None => ColorConfig::AutoColor, @@ -326,7 +327,8 @@ pub fn parse_config(args: Vec) -> Config { gdb, gdb_version, gdb_native_rust, - lldb_version: extract_lldb_version(matches.opt_str("lldb-version")), + lldb_version, + lldb_native_rust, llvm_version: matches.opt_str("llvm-version"), system_llvm: matches.opt_present("system-llvm"), android_cross_path: android_cross_path, @@ -906,17 +908,27 @@ fn extract_gdb_version(full_version_line: &str) -> Option { None } -fn extract_lldb_version(full_version_line: Option) -> Option { +/// Returns (LLDB version, LLDB is rust-enabled) +fn extract_lldb_version(full_version_line: Option) -> (Option, bool) { // Extract the major LLDB version from the given version string. // LLDB version strings are different for Apple and non-Apple platforms. - // At the moment, this function only supports the Apple variant, which looks - // like this: + // The Apple variant looks like this: // // LLDB-179.5 (older versions) // lldb-300.2.51 (new versions) // // We are only interested in the major version number, so this function // will return `Some("179")` and `Some("300")` respectively. + // + // Upstream versions look like: + // lldb version 6.0.1 + // + // There doesn't seem to be a way to correlate the Apple version + // with the upstream version, and since the tests were originally + // written against Apple versions, we make a fake Apple version by + // multiplying the first number by 100. This is a hack, but + // normally fine because the only non-Apple version we test is + // rust-enabled. if let Some(ref full_version_line) = full_version_line { if !full_version_line.trim().is_empty() { @@ -951,12 +963,22 @@ fn extract_lldb_version(full_version_line: Option) -> Option { .take_while(|c| c.is_digit(10)) .collect::(); if !vers.is_empty() { - return Some(vers); + return (Some(vers), full_version_line.contains("rust-enabled")); + } + } + + if full_version_line.starts_with("lldb version ") { + let vers = full_version_line[13..] + .chars() + .take_while(|c| c.is_digit(10)) + .collect::(); + if !vers.is_empty() { + return (Some(vers + "00"), full_version_line.contains("rust-enabled")); } } } } - None + (None, false) } fn is_blacklisted_lldb_version(version: &str) -> bool { diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 63a282c227c24..4cb6f6b83bdd1 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -945,13 +945,23 @@ impl<'test> TestCx<'test> { } } + let prefixes = if self.config.lldb_native_rust { + static PREFIXES: &'static [&'static str] = &["lldb", "lldbr"]; + println!("NOTE: compiletest thinks it is using LLDB with native rust support"); + PREFIXES + } else { + static PREFIXES: &'static [&'static str] = &["lldb", "lldbg"]; + println!("NOTE: compiletest thinks it is using LLDB without native rust support"); + PREFIXES + }; + // Parse debugger commands etc from test files let DebuggerCommands { commands, check_lines, breakpoint_lines, .. - } = self.parse_debugger_commands(&["lldb"]); + } = self.parse_debugger_commands(prefixes); // Write debugger script: // We don't want to hang when calling `quit` while the process is still running