From 2d48a3a7bca119eba5648db12e74142bb93d27ea Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 2 Mar 2024 01:29:20 +0100 Subject: [PATCH 01/14] Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attribute to inner type. --- library/core/src/num/nonzero.rs | 127 +++++++++++------- .../consts/const-eval/raw-bytes.32bit.stderr | 4 +- .../consts/const-eval/raw-bytes.64bit.stderr | 4 +- tests/ui/consts/const-eval/ub-nonnull.stderr | 4 +- tests/ui/lint/clashing-extern-fn.stderr | 67 ++++++++- tests/ui/lint/invalid_value.stderr | 27 +--- tests/ui/lint/lint-ctypes-enum.stderr | 120 ++++++++++++++++- .../ui/print_type_sizes/niche-filling.stdout | 2 + 8 files changed, 269 insertions(+), 86 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 6cbcac20ea1b4..b853771b9ea54 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -6,21 +6,12 @@ use crate::hash::{Hash, Hasher}; use crate::intrinsics; use crate::marker::StructuralPartialEq; use crate::ops::{BitOr, BitOrAssign, Div, Neg, Rem}; +use crate::ptr; use crate::str::FromStr; use super::from_str_radix; use super::{IntErrorKind, ParseIntError}; -mod private { - #[unstable( - feature = "nonzero_internals", - reason = "implementation detail which may disappear or be replaced at any time", - issue = "none" - )] - #[const_trait] - pub trait Sealed {} -} - /// A marker trait for primitive types which can be zero. /// /// This is an implementation detail for [NonZero]\ which may disappear or be replaced at any time. @@ -34,38 +25,70 @@ mod private { issue = "none" )] #[const_trait] -pub unsafe trait ZeroablePrimitive: Sized + Copy + private::Sealed {} +pub unsafe trait ZeroablePrimitive: Sized + Copy + private::Sealed { + #[doc(hidden)] + type NonZeroInner: Sized + Copy; +} macro_rules! impl_zeroable_primitive { - ($primitive:ty) => { - #[unstable( - feature = "nonzero_internals", - reason = "implementation detail which may disappear or be replaced at any time", - issue = "none" - )] - impl const private::Sealed for $primitive {} - - #[unstable( - feature = "nonzero_internals", - reason = "implementation detail which may disappear or be replaced at any time", - issue = "none" - )] - unsafe impl const ZeroablePrimitive for $primitive {} + ($($NonZeroInner:ident ( $primitive:ty )),+ $(,)?) => { + mod private { + #[unstable( + feature = "nonzero_internals", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "none" + )] + #[const_trait] + pub trait Sealed {} + + $( + #[derive(Debug, Clone, Copy, PartialEq)] + #[repr(transparent)] + #[rustc_layout_scalar_valid_range_start(1)] + #[rustc_nonnull_optimization_guaranteed] + #[unstable( + feature = "nonzero_internals", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "none" + )] + pub struct $NonZeroInner($primitive); + )+ + } + + $( + #[unstable( + feature = "nonzero_internals", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "none" + )] + impl const private::Sealed for $primitive {} + + #[unstable( + feature = "nonzero_internals", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "none" + )] + unsafe impl const ZeroablePrimitive for $primitive { + type NonZeroInner = private::$NonZeroInner; + } + )+ }; } -impl_zeroable_primitive!(u8); -impl_zeroable_primitive!(u16); -impl_zeroable_primitive!(u32); -impl_zeroable_primitive!(u64); -impl_zeroable_primitive!(u128); -impl_zeroable_primitive!(usize); -impl_zeroable_primitive!(i8); -impl_zeroable_primitive!(i16); -impl_zeroable_primitive!(i32); -impl_zeroable_primitive!(i64); -impl_zeroable_primitive!(i128); -impl_zeroable_primitive!(isize); +impl_zeroable_primitive!( + NonZeroU8Inner(u8), + NonZeroU16Inner(u16), + NonZeroU32Inner(u32), + NonZeroU64Inner(u64), + NonZeroU128Inner(u128), + NonZeroUsizeInner(usize), + NonZeroI8Inner(i8), + NonZeroI16Inner(i16), + NonZeroI32Inner(i32), + NonZeroI64Inner(i64), + NonZeroI128Inner(i128), + NonZeroIsizeInner(isize), +); /// A value that is known not to equal zero. /// @@ -80,10 +103,8 @@ impl_zeroable_primitive!(isize); /// ``` #[unstable(feature = "generic_nonzero", issue = "120257")] #[repr(transparent)] -#[rustc_layout_scalar_valid_range_start(1)] -#[rustc_nonnull_optimization_guaranteed] #[rustc_diagnostic_item = "NonZero"] -pub struct NonZero(T); +pub struct NonZero(T::NonZeroInner); macro_rules! impl_nonzero_fmt { ($Trait:ident) => { @@ -114,8 +135,7 @@ where { #[inline] fn clone(&self) -> Self { - // SAFETY: The contained value is non-zero. - unsafe { Self(self.0) } + Self(self.0) } } @@ -188,19 +208,19 @@ where #[inline] fn max(self, other: Self) -> Self { // SAFETY: The maximum of two non-zero values is still non-zero. - unsafe { Self(self.get().max(other.get())) } + unsafe { Self::new_unchecked(self.get().max(other.get())) } } #[inline] fn min(self, other: Self) -> Self { // SAFETY: The minimum of two non-zero values is still non-zero. - unsafe { Self(self.get().min(other.get())) } + unsafe { Self::new_unchecked(self.get().min(other.get())) } } #[inline] fn clamp(self, min: Self, max: Self) -> Self { // SAFETY: A non-zero value clamped between two non-zero values is still non-zero. - unsafe { Self(self.get().clamp(min.get(), max.get())) } + unsafe { Self::new_unchecked(self.get().clamp(min.get(), max.get())) } } } @@ -240,7 +260,7 @@ where #[inline] fn bitor(self, rhs: Self) -> Self::Output { // SAFETY: Bitwise OR of two non-zero values is still non-zero. - unsafe { Self(self.get() | rhs.get()) } + unsafe { Self::new_unchecked(self.get() | rhs.get()) } } } @@ -254,7 +274,7 @@ where #[inline] fn bitor(self, rhs: T) -> Self::Output { // SAFETY: Bitwise OR of a non-zero value with anything is still non-zero. - unsafe { Self(self.get() | rhs) } + unsafe { Self::new_unchecked(self.get() | rhs) } } } @@ -268,7 +288,7 @@ where #[inline] fn bitor(self, rhs: NonZero) -> Self::Output { // SAFETY: Bitwise OR of anything with a non-zero value is still non-zero. - unsafe { NonZero(self | rhs.get()) } + unsafe { NonZero::new_unchecked(self | rhs.get()) } } } @@ -346,7 +366,7 @@ where pub fn from_mut(n: &mut T) -> Option<&mut Self> { // SAFETY: Memory layout optimization guarantees that `Option>` has // the same layout and size as `T`, with `0` representing `None`. - let opt_n = unsafe { &mut *(n as *mut T as *mut Option) }; + let opt_n = unsafe { &mut *(ptr::from_mut(n).cast::>()) }; opt_n.as_mut() } @@ -390,12 +410,17 @@ where // memory somewhere. If the value of `self` was from by-value argument // of some not-inlined function, LLVM don't have range metadata // to understand that the value cannot be zero. - match Self::new(self.0) { - Some(Self(n)) => n, + // + // SAFETY: `Self` is guaranteed to have the same layout as `Option`. + match unsafe { intrinsics::transmute_unchecked(self) } { None => { // SAFETY: `NonZero` is guaranteed to only contain non-zero values, so this is unreachable. unsafe { intrinsics::unreachable() } } + Some(Self(inner)) => { + // SAFETY: `T::NonZeroInner` is guaranteed to have the same layout as `T`. + unsafe { intrinsics::transmute_unchecked(inner) } + } } } } diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr index c06c30741164a..c1748c2e23769 100644 --- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr +++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr @@ -68,7 +68,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/raw-bytes.rs:59:1 | LL | const NULL_U8: NonZero = unsafe { mem::transmute(0u8) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 1, align: 1) { @@ -79,7 +79,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/raw-bytes.rs:61:1 | LL | const NULL_USIZE: NonZero = unsafe { mem::transmute(0usize) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 4, align: 4) { diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr index 0589280524cab..eb97eab9db756 100644 --- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr +++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr @@ -68,7 +68,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/raw-bytes.rs:59:1 | LL | const NULL_U8: NonZero = unsafe { mem::transmute(0u8) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 1, align: 1) { @@ -79,7 +79,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/raw-bytes.rs:61:1 | LL | const NULL_USIZE: NonZero = unsafe { mem::transmute(0usize) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 8, align: 8) { diff --git a/tests/ui/consts/const-eval/ub-nonnull.stderr b/tests/ui/consts/const-eval/ub-nonnull.stderr index 70b961fe1cd4f..ab0fb2abdb309 100644 --- a/tests/ui/consts/const-eval/ub-nonnull.stderr +++ b/tests/ui/consts/const-eval/ub-nonnull.stderr @@ -19,7 +19,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-nonnull.rs:24:1 | LL | const NULL_U8: NonZero = unsafe { mem::transmute(0u8) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { @@ -30,7 +30,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-nonnull.rs:26:1 | LL | const NULL_USIZE: NonZero = unsafe { mem::transmute(0usize) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { diff --git a/tests/ui/lint/clashing-extern-fn.stderr b/tests/ui/lint/clashing-extern-fn.stderr index 86ee789aeb22d..22d9b4d76f13c 100644 --- a/tests/ui/lint/clashing-extern-fn.stderr +++ b/tests/ui/lint/clashing-extern-fn.stderr @@ -1,3 +1,31 @@ +warning: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/clashing-extern-fn.rs:369:43 + | +LL | fn option_non_zero_usize() -> Option>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + = note: `#[warn(improper_ctypes)]` on by default + +warning: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/clashing-extern-fn.rs:370:43 + | +LL | fn option_non_zero_isize() -> Option>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +warning: `extern` block uses type `Option`, which is not FFI-safe + --> $DIR/clashing-extern-fn.rs:428:46 + | +LL | fn hidden_niche_transparent() -> Option; + | ^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + warning: `extern` block uses type `Option`, which is not FFI-safe --> $DIR/clashing-extern-fn.rs:430:55 | @@ -6,7 +34,6 @@ LL | fn hidden_niche_transparent_no_niche() -> Option>>`, which is not FFI-safe --> $DIR/clashing-extern-fn.rs:434:46 @@ -178,6 +205,30 @@ LL | fn non_null_ptr() -> *const usize; = note: expected `unsafe extern "C" fn() -> NonNull` found `unsafe extern "C" fn() -> *const usize` +warning: `option_non_zero_usize` redeclared with a different signature + --> $DIR/clashing-extern-fn.rs:369:13 + | +LL | fn option_non_zero_usize() -> usize; + | ----------------------------------- `option_non_zero_usize` previously declared here +... +LL | fn option_non_zero_usize() -> Option>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration + | + = note: expected `unsafe extern "C" fn() -> usize` + found `unsafe extern "C" fn() -> Option>` + +warning: `option_non_zero_isize` redeclared with a different signature + --> $DIR/clashing-extern-fn.rs:370:13 + | +LL | fn option_non_zero_isize() -> isize; + | ----------------------------------- `option_non_zero_isize` previously declared here +... +LL | fn option_non_zero_isize() -> Option>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration + | + = note: expected `unsafe extern "C" fn() -> isize` + found `unsafe extern "C" fn() -> Option>` + warning: `option_non_zero_usize_incorrect` redeclared with a different signature --> $DIR/clashing-extern-fn.rs:374:13 | @@ -202,6 +253,18 @@ LL | fn option_non_null_ptr_incorrect() -> *const isize; = note: expected `unsafe extern "C" fn() -> *const usize` found `unsafe extern "C" fn() -> *const isize` +warning: `hidden_niche_transparent` redeclared with a different signature + --> $DIR/clashing-extern-fn.rs:428:13 + | +LL | fn hidden_niche_transparent() -> usize; + | -------------------------------------- `hidden_niche_transparent` previously declared here +... +LL | fn hidden_niche_transparent() -> Option; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration + | + = note: expected `unsafe extern "C" fn() -> usize` + found `unsafe extern "C" fn() -> Option` + warning: `hidden_niche_transparent_no_niche` redeclared with a different signature --> $DIR/clashing-extern-fn.rs:430:13 | @@ -226,5 +289,5 @@ LL | fn hidden_niche_unsafe_cell() -> Option usize` found `unsafe extern "C" fn() -> Option>>` -warning: 19 warnings emitted +warning: 25 warnings emitted diff --git a/tests/ui/lint/invalid_value.stderr b/tests/ui/lint/invalid_value.stderr index 955d01bd5d904..e45d061a1f051 100644 --- a/tests/ui/lint/invalid_value.stderr +++ b/tests/ui/lint/invalid_value.stderr @@ -320,10 +320,7 @@ error: the type `(NonZero, i32)` does not permit zero-initialization --> $DIR/invalid_value.rs:94:41 | LL | let _val: (NonZero, i32) = mem::zeroed(); - | ^^^^^^^^^^^^^ - | | - | this code causes undefined behavior when executed - | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done + | ^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null @@ -331,13 +328,9 @@ error: the type `(NonZero, i32)` does not permit being left uninitialized --> $DIR/invalid_value.rs:95:41 | LL | let _val: (NonZero, i32) = mem::uninitialized(); - | ^^^^^^^^^^^^^^^^^^^^ - | | - | this code causes undefined behavior when executed - | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done + | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null - = note: integers must be initialized error: the type `*const dyn Send` does not permit zero-initialization --> $DIR/invalid_value.rs:97:37 @@ -411,10 +404,7 @@ error: the type `OneFruitNonZero` does not permit zero-initialization --> $DIR/invalid_value.rs:106:37 | LL | let _val: OneFruitNonZero = mem::zeroed(); - | ^^^^^^^^^^^^^ - | | - | this code causes undefined behavior when executed - | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done + | ^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `OneFruitNonZero` must be non-null note: because `std::num::NonZero` must be non-null (in this field of the only potentially inhabited enum variant) @@ -427,10 +417,7 @@ error: the type `OneFruitNonZero` does not permit being left uninitialized --> $DIR/invalid_value.rs:107:37 | LL | let _val: OneFruitNonZero = mem::uninitialized(); - | ^^^^^^^^^^^^^^^^^^^^ - | | - | this code causes undefined behavior when executed - | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done + | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `OneFruitNonZero` must be non-null note: because `std::num::NonZero` must be non-null (in this field of the only potentially inhabited enum variant) @@ -438,7 +425,6 @@ note: because `std::num::NonZero` must be non-null (in this field of the on | LL | Banana(NonZero), | ^^^^^^^^^^^^ - = note: integers must be initialized error: the type `bool` does not permit being left uninitialized --> $DIR/invalid_value.rs:111:26 @@ -607,10 +593,7 @@ error: the type `NonZero` does not permit zero-initialization --> $DIR/invalid_value.rs:153:34 | LL | let _val: NonZero = mem::transmute(0); - | ^^^^^^^^^^^^^^^^^ - | | - | this code causes undefined behavior when executed - | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done + | ^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null diff --git a/tests/ui/lint/lint-ctypes-enum.stderr b/tests/ui/lint/lint-ctypes-enum.stderr index 48be3eb5a5630..b1bacbeceda25 100644 --- a/tests/ui/lint/lint-ctypes-enum.stderr +++ b/tests/ui/lint/lint-ctypes-enum.stderr @@ -45,21 +45,131 @@ note: the type is defined here LL | enum T { | ^^^^^^ -error: `extern` block uses type `u128`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:71:21 + | +LL | fn nonzero_u8(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:72:22 + | +LL | fn nonzero_u16(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:73:22 + | +LL | fn nonzero_u32(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:74:22 + | +LL | fn nonzero_u64(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:75:23 | LL | fn nonzero_u128(x: Option>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | - = note: 128-bit integers don't currently have a known stable ABI + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:77:24 + | +LL | fn nonzero_usize(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:78:21 + | +LL | fn nonzero_i8(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:79:22 + | +LL | fn nonzero_i16(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:80:22 + | +LL | fn nonzero_i32(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:81:22 + | +LL | fn nonzero_i64(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint -error: `extern` block uses type `i128`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:82:23 | LL | fn nonzero_i128(x: Option>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | - = note: 128-bit integers don't currently have a known stable ABI + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:84:24 + | +LL | fn nonzero_isize(x: Option>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:85:29 + | +LL | fn transparent_struct(x: Option>>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint + +error: `extern` block uses type `Option>>`, which is not FFI-safe + --> $DIR/lint-ctypes-enum.rs:86:27 + | +LL | fn transparent_enum(x: Option>>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | + = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum + = note: enum has no representation hint error: `extern` block uses type `Option>>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:87:28 @@ -88,5 +198,5 @@ LL | fn no_result(x: Result<(), num::NonZero>); = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum = note: enum has no representation hint -error: aborting due to 8 previous errors +error: aborting due to 20 previous errors diff --git a/tests/ui/print_type_sizes/niche-filling.stdout b/tests/ui/print_type_sizes/niche-filling.stdout index 53a58ccc4eef8..eeb5de5324121 100644 --- a/tests/ui/print_type_sizes/niche-filling.stdout +++ b/tests/ui/print_type_sizes/niche-filling.stdout @@ -68,6 +68,8 @@ print-type-size type: `Union2, u32>`: 4 bytes, alignment: print-type-size variant `Union2`: 4 bytes print-type-size field `.a`: 4 bytes print-type-size field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes +print-type-size type: `core::num::nonzero::private::NonZeroU32Inner`: 4 bytes, alignment: 4 bytes +print-type-size field `.0`: 4 bytes print-type-size type: `std::num::NonZero`: 4 bytes, alignment: 4 bytes print-type-size field `.0`: 4 bytes print-type-size type: `std::option::Option>`: 4 bytes, alignment: 4 bytes From 85dfb479df1eba4efe2aa8823de169648cc5b439 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 2 Mar 2024 15:25:00 +0100 Subject: [PATCH 02/14] Fix lint. --- compiler/rustc_lint/src/types.rs | 44 +++++---- library/core/src/num/nonzero.rs | 1 + tests/ui/lint/clashing-extern-fn.stderr | 67 +------------ tests/ui/lint/lint-ctypes-enum.stderr | 120 +----------------------- 4 files changed, 35 insertions(+), 197 deletions(-) diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index 5d36a8b3d0e9c..500efefbb1198 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -984,7 +984,14 @@ pub fn transparent_newtype_field<'a, 'tcx>( } /// Is type known to be non-null? -fn ty_is_known_nonnull<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, mode: CItemKind) -> bool { +fn ty_is_known_nonnull<'tcx>( + tcx: TyCtxt<'tcx>, + param_env: ty::ParamEnv<'tcx>, + ty: Ty<'tcx>, + mode: CItemKind, +) -> bool { + let ty = tcx.try_normalize_erasing_regions(param_env, ty).unwrap_or(ty); + match ty.kind() { ty::FnPtr(_) => true, ty::Ref(..) => true, @@ -1004,7 +1011,7 @@ fn ty_is_known_nonnull<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, mode: CItemKind) - def.variants() .iter() .filter_map(|variant| transparent_newtype_field(tcx, variant)) - .any(|field| ty_is_known_nonnull(tcx, field.ty(tcx, args), mode)) + .any(|field| ty_is_known_nonnull(tcx, param_env, field.ty(tcx, args), mode)) } _ => false, } @@ -1012,7 +1019,13 @@ fn ty_is_known_nonnull<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, mode: CItemKind) - /// Given a non-null scalar (or transparent) type `ty`, return the nullable version of that type. /// If the type passed in was not scalar, returns None. -fn get_nullable_type<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option> { +fn get_nullable_type<'tcx>( + tcx: TyCtxt<'tcx>, + param_env: ty::ParamEnv<'tcx>, + ty: Ty<'tcx>, +) -> Option> { + let ty = tcx.try_normalize_erasing_regions(param_env, ty).unwrap_or(ty); + Some(match *ty.kind() { ty::Adt(field_def, field_args) => { let inner_field_ty = { @@ -1028,22 +1041,19 @@ fn get_nullable_type<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option> .expect("No non-zst fields in transparent type.") .ty(tcx, field_args) }; - return get_nullable_type(tcx, inner_field_ty); + return get_nullable_type(tcx, param_env, inner_field_ty); } ty::Int(ty) => Ty::new_int(tcx, ty), ty::Uint(ty) => Ty::new_uint(tcx, ty), ty::RawPtr(ty_mut) => Ty::new_ptr(tcx, ty_mut), // As these types are always non-null, the nullable equivalent of - // Option of these types are their raw pointer counterparts. + // `Option` of these types are their raw pointer counterparts. ty::Ref(_region, ty, mutbl) => Ty::new_ptr(tcx, ty::TypeAndMut { ty, mutbl }), - ty::FnPtr(..) => { - // There is no nullable equivalent for Rust's function pointers -- you - // must use an Option _> to represent it. - ty - } - - // We should only ever reach this case if ty_is_known_nonnull is extended - // to other types. + // There is no nullable equivalent for Rust's function pointers, + // you must use an `Option _>` to represent it. + ty::FnPtr(..) => ty, + // We should only ever reach this case if `ty_is_known_nonnull` is + // extended to other types. ref unhandled => { debug!( "get_nullable_type: Unhandled scalar kind: {:?} while checking {:?}", @@ -1056,7 +1066,7 @@ fn get_nullable_type<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option> /// Check if this enum can be safely exported based on the "nullable pointer optimization". If it /// can, return the type that `ty` can be safely converted to, otherwise return `None`. -/// Currently restricted to function pointers, boxes, references, `core::num::NonZero*`, +/// Currently restricted to function pointers, boxes, references, `core::num::NonZero`, /// `core::ptr::NonNull`, and `#[repr(transparent)]` newtypes. /// FIXME: This duplicates code in codegen. pub(crate) fn repr_nullable_ptr<'tcx>( @@ -1075,7 +1085,7 @@ pub(crate) fn repr_nullable_ptr<'tcx>( _ => return None, }; - if !ty_is_known_nonnull(tcx, field_ty, ckind) { + if !ty_is_known_nonnull(tcx, param_env, field_ty, ckind) { return None; } @@ -1099,10 +1109,10 @@ pub(crate) fn repr_nullable_ptr<'tcx>( WrappingRange { start: 0, end } if end == field_ty_scalar.size(&tcx).unsigned_int_max() - 1 => { - return Some(get_nullable_type(tcx, field_ty).unwrap()); + return Some(get_nullable_type(tcx, param_env, field_ty).unwrap()); } WrappingRange { start: 1, .. } => { - return Some(get_nullable_type(tcx, field_ty).unwrap()); + return Some(get_nullable_type(tcx, param_env, field_ty).unwrap()); } WrappingRange { start, end } => { unreachable!("Unhandled start and end range: ({}, {})", start, end) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index b853771b9ea54..89d2b4f7dc1d8 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -103,6 +103,7 @@ impl_zeroable_primitive!( /// ``` #[unstable(feature = "generic_nonzero", issue = "120257")] #[repr(transparent)] +#[rustc_nonnull_optimization_guaranteed] #[rustc_diagnostic_item = "NonZero"] pub struct NonZero(T::NonZeroInner); diff --git a/tests/ui/lint/clashing-extern-fn.stderr b/tests/ui/lint/clashing-extern-fn.stderr index 22d9b4d76f13c..86ee789aeb22d 100644 --- a/tests/ui/lint/clashing-extern-fn.stderr +++ b/tests/ui/lint/clashing-extern-fn.stderr @@ -1,31 +1,3 @@ -warning: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/clashing-extern-fn.rs:369:43 - | -LL | fn option_non_zero_usize() -> Option>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - = note: `#[warn(improper_ctypes)]` on by default - -warning: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/clashing-extern-fn.rs:370:43 - | -LL | fn option_non_zero_isize() -> Option>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -warning: `extern` block uses type `Option`, which is not FFI-safe - --> $DIR/clashing-extern-fn.rs:428:46 - | -LL | fn hidden_niche_transparent() -> Option; - | ^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - warning: `extern` block uses type `Option`, which is not FFI-safe --> $DIR/clashing-extern-fn.rs:430:55 | @@ -34,6 +6,7 @@ LL | fn hidden_niche_transparent_no_niche() -> Option>>`, which is not FFI-safe --> $DIR/clashing-extern-fn.rs:434:46 @@ -205,30 +178,6 @@ LL | fn non_null_ptr() -> *const usize; = note: expected `unsafe extern "C" fn() -> NonNull` found `unsafe extern "C" fn() -> *const usize` -warning: `option_non_zero_usize` redeclared with a different signature - --> $DIR/clashing-extern-fn.rs:369:13 - | -LL | fn option_non_zero_usize() -> usize; - | ----------------------------------- `option_non_zero_usize` previously declared here -... -LL | fn option_non_zero_usize() -> Option>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration - | - = note: expected `unsafe extern "C" fn() -> usize` - found `unsafe extern "C" fn() -> Option>` - -warning: `option_non_zero_isize` redeclared with a different signature - --> $DIR/clashing-extern-fn.rs:370:13 - | -LL | fn option_non_zero_isize() -> isize; - | ----------------------------------- `option_non_zero_isize` previously declared here -... -LL | fn option_non_zero_isize() -> Option>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration - | - = note: expected `unsafe extern "C" fn() -> isize` - found `unsafe extern "C" fn() -> Option>` - warning: `option_non_zero_usize_incorrect` redeclared with a different signature --> $DIR/clashing-extern-fn.rs:374:13 | @@ -253,18 +202,6 @@ LL | fn option_non_null_ptr_incorrect() -> *const isize; = note: expected `unsafe extern "C" fn() -> *const usize` found `unsafe extern "C" fn() -> *const isize` -warning: `hidden_niche_transparent` redeclared with a different signature - --> $DIR/clashing-extern-fn.rs:428:13 - | -LL | fn hidden_niche_transparent() -> usize; - | -------------------------------------- `hidden_niche_transparent` previously declared here -... -LL | fn hidden_niche_transparent() -> Option; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration - | - = note: expected `unsafe extern "C" fn() -> usize` - found `unsafe extern "C" fn() -> Option` - warning: `hidden_niche_transparent_no_niche` redeclared with a different signature --> $DIR/clashing-extern-fn.rs:430:13 | @@ -289,5 +226,5 @@ LL | fn hidden_niche_unsafe_cell() -> Option usize` found `unsafe extern "C" fn() -> Option>>` -warning: 25 warnings emitted +warning: 19 warnings emitted diff --git a/tests/ui/lint/lint-ctypes-enum.stderr b/tests/ui/lint/lint-ctypes-enum.stderr index b1bacbeceda25..48be3eb5a5630 100644 --- a/tests/ui/lint/lint-ctypes-enum.stderr +++ b/tests/ui/lint/lint-ctypes-enum.stderr @@ -45,131 +45,21 @@ note: the type is defined here LL | enum T { | ^^^^^^ -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:71:21 - | -LL | fn nonzero_u8(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:72:22 - | -LL | fn nonzero_u16(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:73:22 - | -LL | fn nonzero_u32(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:74:22 - | -LL | fn nonzero_u64(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe +error: `extern` block uses type `u128`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:75:23 | LL | fn nonzero_u128(x: Option>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:77:24 - | -LL | fn nonzero_usize(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:78:21 - | -LL | fn nonzero_i8(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:79:22 - | -LL | fn nonzero_i16(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:80:22 - | -LL | fn nonzero_i32(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:81:22 - | -LL | fn nonzero_i64(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint + = note: 128-bit integers don't currently have a known stable ABI -error: `extern` block uses type `Option>`, which is not FFI-safe +error: `extern` block uses type `i128`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:82:23 | LL | fn nonzero_i128(x: Option>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:84:24 - | -LL | fn nonzero_isize(x: Option>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:85:29 - | -LL | fn transparent_struct(x: Option>>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint - -error: `extern` block uses type `Option>>`, which is not FFI-safe - --> $DIR/lint-ctypes-enum.rs:86:27 - | -LL | fn transparent_enum(x: Option>>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | - = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum - = note: enum has no representation hint + = note: 128-bit integers don't currently have a known stable ABI error: `extern` block uses type `Option>>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:87:28 @@ -198,5 +88,5 @@ LL | fn no_result(x: Result<(), num::NonZero>); = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum = note: enum has no representation hint -error: aborting due to 20 previous errors +error: aborting due to 8 previous errors From b5c11d1e381fa855b03a5ea2d3a6aa74f8972fea Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 2 Mar 2024 18:37:17 +0100 Subject: [PATCH 03/14] Fix `miri` tests. --- .../tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr | 4 ++-- .../tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr index 7d481940acec9..35de453522257 100644 --- a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr +++ b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: constructing invalid value: encountered 0, but expected something greater or equal to 1 +error: Undefined Behavior: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 --> $DIR/cast_fn_ptr_invalid_callee_ret.rs:LL:CC | LL | f(); - | ^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information diff --git a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index b1a2bd2c79a40..81d775f6d7f5f 100644 --- a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: constructing invalid value: encountered 0, but expected something greater or equal to 1 +error: Undefined Behavior: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 --> $DIR/cast_fn_ptr_invalid_caller_arg.rs:LL:CC | LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information From bc532a6307b498eb050e9553c186bf63369c4690 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 2 Mar 2024 19:44:35 +0100 Subject: [PATCH 04/14] Hide implementation details for `NonZero` auto traits. --- library/core/src/num/nonzero.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 89d2b4f7dc1d8..1f7a4e276f553 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -4,8 +4,9 @@ use crate::cmp::Ordering; use crate::fmt; use crate::hash::{Hash, Hasher}; use crate::intrinsics; -use crate::marker::StructuralPartialEq; +use crate::marker::{Freeze, StructuralPartialEq}; use crate::ops::{BitOr, BitOrAssign, Div, Neg, Rem}; +use crate::panic::{RefUnwindSafe, UnwindSafe}; use crate::ptr; use crate::str::FromStr; @@ -129,6 +130,26 @@ impl_nonzero_fmt!(Octal); impl_nonzero_fmt!(LowerHex); impl_nonzero_fmt!(UpperHex); +macro_rules! impl_nonzero_auto_trait { + (unsafe $Trait:ident) => { + #[stable(feature = "nonzero", since = "1.28.0")] + unsafe impl $Trait for NonZero where T: ZeroablePrimitive + $Trait {} + }; + ($Trait:ident) => { + #[stable(feature = "nonzero", since = "1.28.0")] + impl $Trait for NonZero where T: ZeroablePrimitive + $Trait {} + }; +} + +// Implement auto-traits manually based on `T` to avoid docs exposing +// the `ZeroablePrimitive::NonZeroInner` implementation detail. +impl_nonzero_auto_trait!(unsafe Freeze); +impl_nonzero_auto_trait!(RefUnwindSafe); +impl_nonzero_auto_trait!(unsafe Send); +impl_nonzero_auto_trait!(unsafe Sync); +impl_nonzero_auto_trait!(Unpin); +impl_nonzero_auto_trait!(UnwindSafe); + #[stable(feature = "nonzero", since = "1.28.0")] impl Clone for NonZero where From 40f8227d6df463a6af592d631efb260d19924474 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 6 Mar 2024 17:28:45 +0100 Subject: [PATCH 05/14] Fix lint. --- compiler/rustc_lint/src/builtin.rs | 2 ++ tests/ui/lint/invalid_value.stderr | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 5f0af6aee6ace..f1f3c26c4568d 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2468,6 +2468,8 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue { ty: Ty<'tcx>, init: InitKind, ) -> Option { + let ty = cx.tcx.try_normalize_erasing_regions(cx.param_env, ty).unwrap_or(ty); + use rustc_type_ir::TyKind::*; match ty.kind() { // Primitive types that don't like 0 as a value. diff --git a/tests/ui/lint/invalid_value.stderr b/tests/ui/lint/invalid_value.stderr index e45d061a1f051..b4e7421829f82 100644 --- a/tests/ui/lint/invalid_value.stderr +++ b/tests/ui/lint/invalid_value.stderr @@ -323,6 +323,7 @@ LL | let _val: (NonZero, i32) = mem::zeroed(); | ^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null + = note: because `core::num::nonzero::private::NonZeroU32Inner` must be non-null error: the type `(NonZero, i32)` does not permit being left uninitialized --> $DIR/invalid_value.rs:95:41 @@ -331,6 +332,8 @@ LL | let _val: (NonZero, i32) = mem::uninitialized(); | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null + = note: because `core::num::nonzero::private::NonZeroU32Inner` must be non-null + = note: integers must be initialized error: the type `*const dyn Send` does not permit zero-initialization --> $DIR/invalid_value.rs:97:37 @@ -412,6 +415,7 @@ note: because `std::num::NonZero` must be non-null (in this field of the on | LL | Banana(NonZero), | ^^^^^^^^^^^^ + = note: because `core::num::nonzero::private::NonZeroU32Inner` must be non-null error: the type `OneFruitNonZero` does not permit being left uninitialized --> $DIR/invalid_value.rs:107:37 @@ -425,6 +429,8 @@ note: because `std::num::NonZero` must be non-null (in this field of the on | LL | Banana(NonZero), | ^^^^^^^^^^^^ + = note: because `core::num::nonzero::private::NonZeroU32Inner` must be non-null + = note: integers must be initialized error: the type `bool` does not permit being left uninitialized --> $DIR/invalid_value.rs:111:26 @@ -596,6 +602,7 @@ LL | let _val: NonZero = mem::transmute(0); | ^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed | = note: `std::num::NonZero` must be non-null + = note: because `core::num::nonzero::private::NonZeroU32Inner` must be non-null error: the type `NonNull` does not permit zero-initialization --> $DIR/invalid_value.rs:156:34 From ecee730c45cdc7a582734d6440acba08a1214f82 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 9 Mar 2024 16:38:50 +0100 Subject: [PATCH 06/14] Try fixing `debuginfo` test. --- src/etc/lldb_commands | 2 +- src/etc/natvis/libcore.natvis | 5 ++++- src/etc/rust_types.py | 2 +- src/tools/compiletest/src/runtest.rs | 2 +- tests/debuginfo/numeric-types.rs | 24 ++++++++++++------------ 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/etc/lldb_commands b/src/etc/lldb_commands index ed66ecf30729e..5304f2ca34a2c 100644 --- a/src/etc/lldb_commands +++ b/src/etc/lldb_commands @@ -15,5 +15,5 @@ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)C type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust -type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero.+$" --category Rust +type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero<.+>$" --category Rust type category enable Rust diff --git a/src/etc/natvis/libcore.natvis b/src/etc/natvis/libcore.natvis index 5e0c21a13a9fe..8a441cf209356 100644 --- a/src/etc/natvis/libcore.natvis +++ b/src/etc/natvis/libcore.natvis @@ -42,7 +42,10 @@ - {__0} + {__0.__0} + + __0.__0 + diff --git a/src/etc/rust_types.py b/src/etc/rust_types.py index bf512bc99b8f2..3b2d2f9e98340 100644 --- a/src/etc/rust_types.py +++ b/src/etc/rust_types.py @@ -50,7 +50,7 @@ class RustType(object): STD_REF_REGEX = re.compile(r"^(core::(\w+::)+)Ref<.+>$") STD_REF_MUT_REGEX = re.compile(r"^(core::(\w+::)+)RefMut<.+>$") STD_REF_CELL_REGEX = re.compile(r"^(core::(\w+::)+)RefCell<.+>$") -STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero.+$") +STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero<.+>$") TUPLE_ITEM_REGEX = re.compile(r"__\d+$") diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index ae0db88d873be..1e1c5fb20d40b 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1495,7 +1495,7 @@ impl<'test> TestCx<'test> { "^(core::([a-z_]+::)+)Ref<.+>$", "^(core::([a-z_]+::)+)RefMut<.+>$", "^(core::([a-z_]+::)+)RefCell<.+>$", - "^core::num::([a-z_]+::)*NonZero.+$", + "^core::num::([a-z_]+::)*NonZero<.+>$", ]; // In newer versions of lldb, persistent results (the `$N =` part at the start of diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 74c9e5e1dc3f3..9ea770652b1eb 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -203,40 +203,40 @@ // lldb-command:run // lldb-command:print/d nz_i8 -// lldb-check:[...]$0 = 11 { __0 = 11 } +// lldb-check:[...]$0 = None { __0 = { 0 = 11 } } // lldb-command:print nz_i16 -// lldb-check:[...]$1 = 22 { __0 = 22 } +// lldb-check:[...]$1 = None { __0 = { 0 = 22 } } // lldb-command:print nz_i32 -// lldb-check:[...]$2 = 33 { __0 = 33 } +// lldb-check:[...]$2 = None { __0 = { 0 = 33 } } // lldb-command:print nz_i64 -// lldb-check:[...]$3 = 44 { __0 = 44 } +// lldb-check:[...]$3 = None { __0 = { 0 = 44 } } // lldb-command:print nz_i128 -// lldb-check:[...]$4 = 55 { __0 = 55 } +// lldb-check:[...]$4 = None { __0 = { 0 = 55 } } // lldb-command:print nz_isize -// lldb-check:[...]$5 = 66 { __0 = 66 } +// lldb-check:[...]$5 = None { __0 = { 0 = 66 } } // lldb-command:print/d nz_u8 -// lldb-check:[...]$6 = 77 { __0 = 77 } +// lldb-check:[...]$6 = None { __0 = { 0 = 77 } } // lldb-command:print nz_u16 -// lldb-check:[...]$7 = 88 { __0 = 88 } +// lldb-check:[...]$7 = None { __0 = { 0 = 88 } } // lldb-command:print nz_u32 -// lldb-check:[...]$8 = 99 { __0 = 99 } +// lldb-check:[...]$8 = None { __0 = { 0 = 99 } } // lldb-command:print nz_u64 -// lldb-check:[...]$9 = 100 { __0 = 100 } +// lldb-check:[...]$9 = None { __0 = { 0 = 100 } } // lldb-command:print nz_u128 -// lldb-check:[...]$10 = 111 { __0 = 111 } +// lldb-check:[...]$10 = None { __0 = { 0 = 111 } } // lldb-command:print nz_usize -// lldb-check:[...]$11 = 122 { __0 = 122 } +// lldb-check:[...]$11 = None { __0 = { 0 = 122 } } #![feature(generic_nonzero)] use std::num::*; From 4a799082fe5768fdc991a64f07debfb56b703622 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 10 Mar 2024 06:45:39 +0100 Subject: [PATCH 07/14] Fix `StdNonZeroNumberSummaryProvider`. --- src/etc/lldb_commands | 2 +- src/etc/lldb_providers.py | 11 ++++++---- src/etc/rust_types.py | 30 ++++++++++++++-------------- src/tools/compiletest/src/runtest.rs | 2 +- tests/debuginfo/numeric-types.rs | 26 +++++++++++++----------- 5 files changed, 38 insertions(+), 33 deletions(-) diff --git a/src/etc/lldb_commands b/src/etc/lldb_commands index 5304f2ca34a2c..615d13ccd0ffd 100644 --- a/src/etc/lldb_commands +++ b/src/etc/lldb_commands @@ -15,5 +15,5 @@ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)C type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust -type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero<.+>$" --category Rust +type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)NonZero<.+>$" --category Rust type category enable Rust diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index cfb3f0a4eaebe..319660f0ddc5f 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -743,7 +743,10 @@ def has_children(self): def StdNonZeroNumberSummaryProvider(valobj, _dict): # type: (SBValue, dict) -> str - objtype = valobj.GetType() - field = objtype.GetFieldAtIndex(0) - element = valobj.GetChildMemberWithName(field.name) - return element.GetValue() + inner = valobj.GetChildAtIndex(0) + inner_inner = inner.GetChildAtIndex(0) + + if inner_inner.GetTypeName() in ['char', 'unsigned char']: + return str(inner_inner.GetValueAsSigned()) + else: + return inner_inner.GetValue() diff --git a/src/etc/rust_types.py b/src/etc/rust_types.py index 3b2d2f9e98340..2b06683ef93cb 100644 --- a/src/etc/rust_types.py +++ b/src/etc/rust_types.py @@ -34,23 +34,23 @@ class RustType(object): STD_NONZERO_NUMBER = "StdNonZeroNumber" -STD_STRING_REGEX = re.compile(r"^(alloc::(\w+::)+)String$") +STD_STRING_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)String$") STD_STR_REGEX = re.compile(r"^&(mut )?str$") STD_SLICE_REGEX = re.compile(r"^&(mut )?\[.+\]$") -STD_OS_STRING_REGEX = re.compile(r"^(std::ffi::(\w+::)+)OsString$") -STD_VEC_REGEX = re.compile(r"^(alloc::(\w+::)+)Vec<.+>$") -STD_VEC_DEQUE_REGEX = re.compile(r"^(alloc::(\w+::)+)VecDeque<.+>$") -STD_BTREE_SET_REGEX = re.compile(r"^(alloc::(\w+::)+)BTreeSet<.+>$") -STD_BTREE_MAP_REGEX = re.compile(r"^(alloc::(\w+::)+)BTreeMap<.+>$") -STD_HASH_MAP_REGEX = re.compile(r"^(std::collections::(\w+::)+)HashMap<.+>$") -STD_HASH_SET_REGEX = re.compile(r"^(std::collections::(\w+::)+)HashSet<.+>$") -STD_RC_REGEX = re.compile(r"^(alloc::(\w+::)+)Rc<.+>$") -STD_ARC_REGEX = re.compile(r"^(alloc::(\w+::)+)Arc<.+>$") -STD_CELL_REGEX = re.compile(r"^(core::(\w+::)+)Cell<.+>$") -STD_REF_REGEX = re.compile(r"^(core::(\w+::)+)Ref<.+>$") -STD_REF_MUT_REGEX = re.compile(r"^(core::(\w+::)+)RefMut<.+>$") -STD_REF_CELL_REGEX = re.compile(r"^(core::(\w+::)+)RefCell<.+>$") -STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero<.+>$") +STD_OS_STRING_REGEX = re.compile(r"^(std::ffi::([a-z_]+::)+)OsString$") +STD_VEC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Vec<.+>$") +STD_VEC_DEQUE_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)VecDeque<.+>$") +STD_BTREE_SET_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)BTreeSet<.+>$") +STD_BTREE_MAP_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)BTreeMap<.+>$") +STD_HASH_MAP_REGEX = re.compile(r"^(std::collections::([a-z_]+::)+)HashMap<.+>$") +STD_HASH_SET_REGEX = re.compile(r"^(std::collections::([a-z_]+::)+)HashSet<.+>$") +STD_RC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Rc<.+>$") +STD_ARC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Arc<.+>$") +STD_CELL_REGEX = re.compile(r"^(core::([a-z_]+::)+)Cell<.+>$") +STD_REF_REGEX = re.compile(r"^(core::([a-z_]+::)+)Ref<.+>$") +STD_REF_MUT_REGEX = re.compile(r"^(core::([a-z_]+::)+)RefMut<.+>$") +STD_REF_CELL_REGEX = re.compile(r"^(core::([a-z_]+::)+)RefCell<.+>$") +STD_NONZERO_NUMBER_REGEX = re.compile(r"^(core::([a-z_]+::)+)NonZero<.+>$") TUPLE_ITEM_REGEX = re.compile(r"__\d+$") diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 1e1c5fb20d40b..386db1a64b831 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1495,7 +1495,7 @@ impl<'test> TestCx<'test> { "^(core::([a-z_]+::)+)Ref<.+>$", "^(core::([a-z_]+::)+)RefMut<.+>$", "^(core::([a-z_]+::)+)RefCell<.+>$", - "^core::num::([a-z_]+::)*NonZero<.+>$", + "^(core::([a-z_]+::)+)NonZero<.+>$", ]; // In newer versions of lldb, persistent results (the `$N =` part at the start of diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 9ea770652b1eb..f662fa7ed5496 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -203,40 +203,42 @@ // lldb-command:run // lldb-command:print/d nz_i8 -// lldb-check:[...]$0 = None { __0 = { 0 = 11 } } +// lldb-check:[...]$0 = 11 { __0 = { 0 = 11 } } // lldb-command:print nz_i16 -// lldb-check:[...]$1 = None { __0 = { 0 = 22 } } +// lldb-check:[...]$1 = 22 { __0 = { 0 = 22 } } // lldb-command:print nz_i32 -// lldb-check:[...]$2 = None { __0 = { 0 = 33 } } +// lldb-check:[...]$2 = 33 { __0 = { 0 = 33 } } // lldb-command:print nz_i64 -// lldb-check:[...]$3 = None { __0 = { 0 = 44 } } +// lldb-check:[...]$3 = 44 { __0 = { 0 = 44 } } // lldb-command:print nz_i128 -// lldb-check:[...]$4 = None { __0 = { 0 = 55 } } +// lldb-check:[...]$4 = 55 { __0 = { 0 = 55 } } // lldb-command:print nz_isize -// lldb-check:[...]$5 = None { __0 = { 0 = 66 } } +// FIXME: `lldb_lookup.summary_lookup` is never called for `NonZero` for some reason. +// // lldb-check:[...]$5 = 66 { __0 = { 0 = 66 } } // lldb-command:print/d nz_u8 -// lldb-check:[...]$6 = None { __0 = { 0 = 77 } } +// lldb-check:[...]$6 = 77 { __0 = { 0 = 77 } } // lldb-command:print nz_u16 -// lldb-check:[...]$7 = None { __0 = { 0 = 88 } } +// lldb-check:[...]$7 = 88 { __0 = { 0 = 88 } } // lldb-command:print nz_u32 -// lldb-check:[...]$8 = None { __0 = { 0 = 99 } } +// lldb-check:[...]$8 = 99 { __0 = { 0 = 99 } } // lldb-command:print nz_u64 -// lldb-check:[...]$9 = None { __0 = { 0 = 100 } } +// lldb-check:[...]$9 = 100 { __0 = { 0 = 100 } } // lldb-command:print nz_u128 -// lldb-check:[...]$10 = None { __0 = { 0 = 111 } } +// lldb-check:[...]$10 = 111 { __0 = { 0 = 111 } } // lldb-command:print nz_usize -// lldb-check:[...]$11 = None { __0 = { 0 = 122 } } +// FIXME: `lldb_lookup.summary_lookup` is never called for `NonZero` for some reason. +// // lldb-check:[...]$11 = 122 { __0 = { 0 = 122 } } #![feature(generic_nonzero)] use std::num::*; From 36a8daeb44ebee51fb769a106e5aafbbb4a59ebb Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 10 Mar 2024 13:43:41 +0100 Subject: [PATCH 08/14] Deduplicate `lldb_commands`. --- src/tools/compiletest/src/runtest.rs | 42 ++++++---------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 386db1a64b831..e26e9df6f16bf 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1474,29 +1474,8 @@ impl<'test> TestCx<'test> { // Switch LLDB into "Rust mode" let rust_src_root = self.config.find_rust_src_root().expect("Could not find Rust source root"); - let rust_pp_module_rel_path = Path::new("./src/etc/lldb_lookup.py"); - let rust_pp_module_abs_path = - rust_src_root.join(rust_pp_module_rel_path).to_str().unwrap().to_owned(); - - let rust_type_regexes = vec![ - "^(alloc::([a-z_]+::)+)String$", - "^&(mut )?str$", - "^&(mut )?\\[.+\\]$", - "^(std::ffi::([a-z_]+::)+)OsString$", - "^(alloc::([a-z_]+::)+)Vec<.+>$", - "^(alloc::([a-z_]+::)+)VecDeque<.+>$", - "^(alloc::([a-z_]+::)+)BTreeSet<.+>$", - "^(alloc::([a-z_]+::)+)BTreeMap<.+>$", - "^(std::collections::([a-z_]+::)+)HashMap<.+>$", - "^(std::collections::([a-z_]+::)+)HashSet<.+>$", - "^(alloc::([a-z_]+::)+)Rc<.+>$", - "^(alloc::([a-z_]+::)+)Arc<.+>$", - "^(core::([a-z_]+::)+)Cell<.+>$", - "^(core::([a-z_]+::)+)Ref<.+>$", - "^(core::([a-z_]+::)+)RefMut<.+>$", - "^(core::([a-z_]+::)+)RefCell<.+>$", - "^(core::([a-z_]+::)+)NonZero<.+>$", - ]; + let rust_pp_module_rel_path = Path::new("./src/etc"); + let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path); // In newer versions of lldb, persistent results (the `$N =` part at the start of // expressions you have evaluated that let you re-use the result) aren't printed, but lots @@ -1507,16 +1486,13 @@ impl<'test> TestCx<'test> { script_str.push_str("command unalias p\n"); script_str.push_str("command alias p expr --\n"); - script_str - .push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[..]); - script_str.push_str("type synthetic add -l lldb_lookup.synthetic_lookup -x '.*' "); - script_str.push_str("--category Rust\n"); - for type_regex in rust_type_regexes { - script_str.push_str("type summary add -F lldb_lookup.summary_lookup -e -x -h "); - script_str.push_str(&format!("'{}' ", type_regex)); - script_str.push_str("--category Rust\n"); - } - script_str.push_str("type category enable Rust\n"); + script_str.push_str(&format!( + "command script import {}/lldb_lookup.py\n", + rust_pp_module_abs_path.to_str().unwrap() + )); + File::open(rust_pp_module_abs_path.join("lldb_commands")) + .and_then(|mut file| file.read_to_string(&mut script_str)) + .expect("Failed to read lldb_commands"); // Set breakpoints on every line that contains the string "#break" let source_file_name = self.testpaths.file.file_name().unwrap().to_string_lossy(); From 75fba9d574dfd85d9046ddda67d2da2da86ce61c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 10 Mar 2024 14:55:58 +0100 Subject: [PATCH 09/14] Remove LLDB persistent results in `compiletest`. --- src/tools/compiletest/src/runtest.rs | 9 -- tests/debuginfo/associated-types.rs | 18 ++-- tests/debuginfo/basic-types.rs | 26 ++--- tests/debuginfo/borrowed-basic.rs | 26 ++--- tests/debuginfo/borrowed-c-style-enum.rs | 6 +- tests/debuginfo/borrowed-struct.rs | 14 +-- tests/debuginfo/borrowed-tuple.rs | 6 +- tests/debuginfo/borrowed-unique-basic.rs | 26 ++--- tests/debuginfo/box.rs | 4 +- tests/debuginfo/boxed-struct.rs | 4 +- .../by-value-non-immediate-argument.rs | 14 +-- .../by-value-self-argument-in-trait-impl.rs | 6 +- tests/debuginfo/c-style-enum-in-composite.rs | 14 +-- tests/debuginfo/c-style-enum.rs | 14 +-- tests/debuginfo/captured-fields-1.rs | 12 +-- tests/debuginfo/captured-fields-2.rs | 4 +- .../debuginfo/closure-in-generic-function.rs | 8 +- tests/debuginfo/coroutine-locals.rs | 16 +-- tests/debuginfo/coroutine-objects.rs | 8 +- tests/debuginfo/cross-crate-spans.rs | 12 +-- tests/debuginfo/destructured-fn-argument.rs | 98 +++++++++---------- .../destructured-for-loop-variable.rs | 48 ++++----- tests/debuginfo/destructured-local.rs | 86 ++++++++-------- tests/debuginfo/drop-locations.rs | 12 +-- tests/debuginfo/empty-string.rs | 4 +- tests/debuginfo/enum-thinlto.rs | 2 +- tests/debuginfo/evec-in-struct.rs | 10 +- tests/debuginfo/extern-c-fn.rs | 8 +- .../debuginfo/function-arg-initialization.rs | 64 ++++++------ tests/debuginfo/function-arguments.rs | 8 +- .../function-prologue-stepping-regular.rs | 64 ++++++------ .../generic-enum-with-different-disr-sizes.rs | 16 +-- tests/debuginfo/generic-function.rs | 12 +-- tests/debuginfo/generic-functions-nested.rs | 16 +-- .../generic-method-on-generic-struct.rs | 30 +++--- tests/debuginfo/generic-struct.rs | 8 +- tests/debuginfo/include_string.rs | 6 +- tests/debuginfo/issue-22656.rs | 4 +- tests/debuginfo/issue-57822.rs | 4 +- tests/debuginfo/lexical-scope-in-for-loop.rs | 14 +-- tests/debuginfo/lexical-scope-in-if.rs | 32 +++--- tests/debuginfo/lexical-scope-in-match.rs | 36 +++---- .../lexical-scope-in-stack-closure.rs | 12 +-- .../lexical-scope-in-unconditional-loop.rs | 26 ++--- .../lexical-scope-in-unique-closure.rs | 12 +-- tests/debuginfo/lexical-scope-in-while.rs | 26 ++--- tests/debuginfo/lexical-scope-with-macro.rs | 30 +++--- .../lexical-scopes-in-block-expression.rs | 96 +++++++++--------- tests/debuginfo/macro-stepping.rs | 20 ++-- tests/debuginfo/method-on-enum.rs | 30 +++--- tests/debuginfo/method-on-generic-struct.rs | 30 +++--- tests/debuginfo/method-on-struct.rs | 30 +++--- tests/debuginfo/method-on-trait.rs | 30 +++--- tests/debuginfo/method-on-tuple-struct.rs | 30 +++--- tests/debuginfo/multi-cgu.rs | 4 +- .../multiple-functions-equal-var-names.rs | 6 +- tests/debuginfo/multiple-functions.rs | 6 +- .../name-shadowing-and-scope-nesting.rs | 24 ++--- tests/debuginfo/no_mangle-info.rs | 4 +- tests/debuginfo/numeric-types.rs | 26 +++-- tests/debuginfo/option-like-enum.rs | 20 ++-- .../packed-struct-with-destructor.rs | 16 +-- tests/debuginfo/packed-struct.rs | 12 +-- tests/debuginfo/pretty-slices.rs | 8 +- tests/debuginfo/pretty-std-collections.rs | 8 +- tests/debuginfo/pretty-std.rs | 14 +-- tests/debuginfo/rc_arc.rs | 4 +- tests/debuginfo/reference-debuginfo.rs | 28 +++--- .../regression-bad-location-list-67992.rs | 2 +- tests/debuginfo/self-in-default-method.rs | 30 +++--- .../self-in-generic-default-method.rs | 30 +++--- tests/debuginfo/shadowed-argument.rs | 12 +-- tests/debuginfo/shadowed-variable.rs | 20 ++-- tests/debuginfo/should-fail.rs | 2 +- tests/debuginfo/simple-lexical-scope.rs | 14 +-- tests/debuginfo/simple-struct.rs | 12 +-- tests/debuginfo/simple-tuple.rs | 14 +-- .../static-method-on-struct-and-enum.rs | 10 +- tests/debuginfo/struct-in-enum.rs | 6 +- tests/debuginfo/struct-in-struct.rs | 16 +-- tests/debuginfo/struct-namespace.rs | 8 +- tests/debuginfo/struct-with-destructor.rs | 8 +- tests/debuginfo/tuple-in-tuple.rs | 14 +-- tests/debuginfo/tuple-struct.rs | 12 +-- tests/debuginfo/union-smoke.rs | 4 +- .../var-captured-in-nested-closure.rs | 24 ++--- .../var-captured-in-sendable-closure.rs | 6 +- .../var-captured-in-stack-closure.rs | 20 ++-- tests/debuginfo/vec-slices.rs | 12 +-- tests/debuginfo/vec.rs | 2 +- 90 files changed, 824 insertions(+), 835 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index e26e9df6f16bf..8655d3512e101 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1477,15 +1477,6 @@ impl<'test> TestCx<'test> { let rust_pp_module_rel_path = Path::new("./src/etc"); let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path); - // In newer versions of lldb, persistent results (the `$N =` part at the start of - // expressions you have evaluated that let you re-use the result) aren't printed, but lots - // of rustc's debuginfo tests rely on these, so re-enable this. - // See . - script_str.push_str("command unalias print\n"); - script_str.push_str("command alias print expr --\n"); - script_str.push_str("command unalias p\n"); - script_str.push_str("command alias p expr --\n"); - script_str.push_str(&format!( "command script import {}/lldb_lookup.py\n", rust_pp_module_abs_path.to_str().unwrap() diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs index ab41073b7c44f..182541b038a0f 100644 --- a/tests/debuginfo/associated-types.rs +++ b/tests/debuginfo/associated-types.rs @@ -43,41 +43,41 @@ // lldb-command:run // lldb-command:print arg -// lldbg-check:[...]$0 = { b = -1, b1 = 0 } +// lldbg-check:[...] { b = -1, b1 = 0 } // lldbr-check:(associated_types::Struct) arg = { b = -1, b1 = 0 } // lldb-command:continue // lldb-command:print inferred -// lldbg-check:[...]$1 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i64) inferred = 1 // lldb-command:print explicitly -// lldbg-check:[...]$2 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i64) explicitly = 1 // lldb-command:continue // lldb-command:print arg -// lldbg-check:[...]$3 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i64) arg = 2 // lldb-command:continue // lldb-command:print arg -// lldbg-check:[...]$4 = (4, 5) +// lldbg-check:[...] (4, 5) // lldbr-check:((i32, i64)) arg = { = 4 = 5 } // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$5 = 6 +// lldbg-check:[...] 6 // lldbr-check:(i32) a = 6 // lldb-command:print b -// lldbg-check:[...]$6 = 7 +// lldbg-check:[...] 7 // lldbr-check:(i64) b = 7 // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$7 = 8 +// lldbg-check:[...] 8 // lldbr-check:(i64) a = 8 // lldb-command:print b -// lldbg-check:[...]$8 = 9 +// lldbg-check:[...] 9 // lldbr-check:(i32) b = 9 // lldb-command:continue diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs index 8319b71bfcdaa..3a023a890f373 100644 --- a/tests/debuginfo/basic-types.rs +++ b/tests/debuginfo/basic-types.rs @@ -51,10 +51,10 @@ // lldb-command:run // lldb-command:print b -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) b = false // lldb-command:print i -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) i = -1 // NOTE: only rust-enabled lldb supports 32bit chars @@ -62,37 +62,37 @@ // lldbr-check:(char) c = 'a' // lldb-command:print i8 -// lldbg-check:[...]$2 = 'D' +// lldbg-check:[...] 'D' // lldbr-check:(i8) i8 = 68 // lldb-command:print i16 -// lldbg-check:[...]$3 = -16 +// lldbg-check:[...] -16 // lldbr-check:(i16) i16 = -16 // lldb-command:print i32 -// lldbg-check:[...]$4 = -32 +// lldbg-check:[...] -32 // lldbr-check:(i32) i32 = -32 // lldb-command:print i64 -// lldbg-check:[...]$5 = -64 +// lldbg-check:[...] -64 // lldbr-check:(i64) i64 = -64 // lldb-command:print u -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(usize) u = 1 // lldb-command:print u8 -// lldbg-check:[...]$7 = 'd' +// lldbg-check:[...] 'd' // lldbr-check:(u8) u8 = 100 // lldb-command:print u16 -// lldbg-check:[...]$8 = 16 +// lldbg-check:[...] 16 // lldbr-check:(u16) u16 = 16 // lldb-command:print u32 -// lldbg-check:[...]$9 = 32 +// lldbg-check:[...] 32 // lldbr-check:(u32) u32 = 32 // lldb-command:print u64 -// lldbg-check:[...]$10 = 64 +// lldbg-check:[...] 64 // lldbr-check:(u64) u64 = 64 // lldb-command:print f32 -// lldbg-check:[...]$11 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f32) f32 = 2.5 // lldb-command:print f64 -// lldbg-check:[...]$12 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) f64 = 3.5 // === CDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs index 52d61f33e7c0f..e30131190af5c 100644 --- a/tests/debuginfo/borrowed-basic.rs +++ b/tests/debuginfo/borrowed-basic.rs @@ -53,11 +53,11 @@ // lldb-command:run // lldb-command:print *bool_ref -// lldbg-check:[...]$0 = true +// lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true // lldb-command:print *int_ref -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 // NOTE: only rust-enabled lldb supports 32bit chars @@ -65,47 +65,47 @@ // lldbr-check:(char) *char_ref = 'a' // lldb-command:print *i8_ref -// lldbg-check:[...]$2 = 'D' +// lldbg-check:[...] 'D' // lldbr-check:(i8) *i8_ref = 68 // lldb-command:print *i16_ref -// lldbg-check:[...]$3 = -16 +// lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 // lldb-command:print *i32_ref -// lldbg-check:[...]$4 = -32 +// lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 // lldb-command:print *i64_ref -// lldbg-check:[...]$5 = -64 +// lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 // lldb-command:print *uint_ref -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 // lldb-command:print *u8_ref -// lldbg-check:[...]$7 = 'd' +// lldbg-check:[...] 'd' // lldbr-check:(u8) *u8_ref = 100 // lldb-command:print *u16_ref -// lldbg-check:[...]$8 = 16 +// lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 // lldb-command:print *u32_ref -// lldbg-check:[...]$9 = 32 +// lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 // lldb-command:print *u64_ref -// lldbg-check:[...]$10 = 64 +// lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 // lldb-command:print *f32_ref -// lldbg-check:[...]$11 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 // lldb-command:print *f64_ref -// lldbg-check:[...]$12 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs index 950a05a0992fa..c6a8bf953866b 100644 --- a/tests/debuginfo/borrowed-c-style-enum.rs +++ b/tests/debuginfo/borrowed-c-style-enum.rs @@ -23,15 +23,15 @@ // lldb-command:run // lldb-command:print *the_a_ref -// lldbg-check:[...]$0 = TheA +// lldbg-check:[...] TheA // lldbr-check:(borrowed_c_style_enum::ABC) *the_a_ref = borrowed_c_style_enum::ABC::TheA // lldb-command:print *the_b_ref -// lldbg-check:[...]$1 = TheB +// lldbg-check:[...] TheB // lldbr-check:(borrowed_c_style_enum::ABC) *the_b_ref = borrowed_c_style_enum::ABC::TheB // lldb-command:print *the_c_ref -// lldbg-check:[...]$2 = TheC +// lldbg-check:[...] TheC // lldbr-check:(borrowed_c_style_enum::ABC) *the_c_ref = borrowed_c_style_enum::ABC::TheC #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs index 467de7878ee76..96ceec42ab557 100644 --- a/tests/debuginfo/borrowed-struct.rs +++ b/tests/debuginfo/borrowed-struct.rs @@ -35,31 +35,31 @@ // lldb-command:run // lldb-command:print *stack_val_ref -// lldbg-check:[...]$0 = { x = 10 y = 23.5 } +// lldbg-check:[...] { x = 10 y = 23.5 } // lldbr-check:(borrowed_struct::SomeStruct) *stack_val_ref = (x = 10, y = 23.5) // lldb-command:print *stack_val_interior_ref_1 -// lldbg-check:[...]$1 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) *stack_val_interior_ref_1 = 10 // lldb-command:print *stack_val_interior_ref_2 -// lldbg-check:[...]$2 = 23.5 +// lldbg-check:[...] 23.5 // lldbr-check:(f64) *stack_val_interior_ref_2 = 23.5 // lldb-command:print *ref_to_unnamed -// lldbg-check:[...]$3 = { x = 11 y = 24.5 } +// lldbg-check:[...] { x = 11 y = 24.5 } // lldbr-check:(borrowed_struct::SomeStruct) *ref_to_unnamed = (x = 11, y = 24.5) // lldb-command:print *unique_val_ref -// lldbg-check:[...]$4 = { x = 13 y = 26.5 } +// lldbg-check:[...] { x = 13 y = 26.5 } // lldbr-check:(borrowed_struct::SomeStruct) *unique_val_ref = (x = 13, y = 26.5) // lldb-command:print *unique_val_interior_ref_1 -// lldbg-check:[...]$5 = 13 +// lldbg-check:[...] 13 // lldbr-check:(isize) *unique_val_interior_ref_1 = 13 // lldb-command:print *unique_val_interior_ref_2 -// lldbg-check:[...]$6 = 26.5 +// lldbg-check:[...] 26.5 // lldbr-check:(f64) *unique_val_interior_ref_2 = 26.5 #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs index 4fe1abbaba2c8..8d9c5e9fd2d43 100644 --- a/tests/debuginfo/borrowed-tuple.rs +++ b/tests/debuginfo/borrowed-tuple.rs @@ -24,15 +24,15 @@ // lldb-command:run // lldb-command:print *stack_val_ref -// lldbg-check:[...]$0 = { 0 = -14 1 = -19 } +// lldbg-check:[...] { 0 = -14 1 = -19 } // lldbr-check:((i16, f32)) *stack_val_ref = { 0 = -14 1 = -19 } // lldb-command:print *ref_to_unnamed -// lldbg-check:[...]$1 = { 0 = -15 1 = -20 } +// lldbg-check:[...] { 0 = -15 1 = -20 } // lldbr-check:((i16, f32)) *ref_to_unnamed = { 0 = -15 1 = -20 } // lldb-command:print *unique_val_ref -// lldbg-check:[...]$2 = { 0 = -17 1 = -22 } +// lldbg-check:[...] { 0 = -17 1 = -22 } // lldbr-check:((i16, f32)) *unique_val_ref = { 0 = -17 1 = -22 } diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs index ae843c355bc5b..38e6ce0a6ae54 100644 --- a/tests/debuginfo/borrowed-unique-basic.rs +++ b/tests/debuginfo/borrowed-unique-basic.rs @@ -56,11 +56,11 @@ // lldb-command:run // lldb-command:print *bool_ref -// lldbg-check:[...]$0 = true +// lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true // lldb-command:print *int_ref -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 // NOTE: only rust-enabled lldb supports 32bit chars @@ -68,47 +68,47 @@ // lldbr-check:(char) *char_ref = 97 // lldb-command:print *i8_ref -// lldbg-check:[...]$2 = 68 +// lldbg-check:[...] 68 // lldbr-check:(i8) *i8_ref = 68 // lldb-command:print *i16_ref -// lldbg-check:[...]$3 = -16 +// lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 // lldb-command:print *i32_ref -// lldbg-check:[...]$4 = -32 +// lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 // lldb-command:print *i64_ref -// lldbg-check:[...]$5 = -64 +// lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 // lldb-command:print *uint_ref -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 // lldb-command:print *u8_ref -// lldbg-check:[...]$7 = 100 +// lldbg-check:[...] 100 // lldbr-check:(u8) *u8_ref = 100 // lldb-command:print *u16_ref -// lldbg-check:[...]$8 = 16 +// lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 // lldb-command:print *u32_ref -// lldbg-check:[...]$9 = 32 +// lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 // lldb-command:print *u64_ref -// lldbg-check:[...]$10 = 64 +// lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 // lldb-command:print *f32_ref -// lldbg-check:[...]$11 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 // lldb-command:print *f64_ref -// lldbg-check:[...]$12 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 #![allow(unused_variables)] diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs index f2e744e87b914..2c309a4eb2877 100644 --- a/tests/debuginfo/box.rs +++ b/tests/debuginfo/box.rs @@ -17,10 +17,10 @@ // lldb-command:run // lldb-command:print *a -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) *a = 1 // lldb-command:print *b -// lldbg-check:[...]$1 = { 0 = 2 1 = 3.5 } +// lldbg-check:[...] { 0 = 2 1 = 3.5 } // lldbr-check:((i32, f64)) *b = { 0 = 2 1 = 3.5 } #![allow(unused_variables)] diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs index c47bffb3a384b..be2f1a7a8677c 100644 --- a/tests/debuginfo/boxed-struct.rs +++ b/tests/debuginfo/boxed-struct.rs @@ -20,11 +20,11 @@ // lldb-command:run // lldb-command:print *boxed_with_padding -// lldbg-check:[...]$0 = { x = 99 y = 999 z = 9999 w = 99999 } +// lldbg-check:[...] { x = 99 y = 999 z = 9999 w = 99999 } // lldbr-check:(boxed_struct::StructWithSomePadding) *boxed_with_padding = { x = 99 y = 999 z = 9999 w = 99999 } // lldb-command:print *boxed_with_dtor -// lldbg-check:[...]$1 = { x = 77 y = 777 z = 7777 w = 77777 } +// lldbg-check:[...] { x = 77 y = 777 z = 7777 w = 77777 } // lldbr-check:(boxed_struct::StructWithDestructor) *boxed_with_dtor = { x = 77 y = 777 z = 7777 w = 77777 } #![allow(unused_variables)] diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index 52e3dc9a76bc8..413eefa3f2ded 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -42,27 +42,27 @@ // lldb-command:run // lldb-command:print s -// lldb-check:[...]$0 = Struct { a: 1, b: 2.5 } +// lldb-check:[...] Struct { a: 1, b: 2.5 } // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$1 = Struct { a: 3, b: 4.5 } +// lldb-check:[...] Struct { a: 3, b: 4.5 } // lldb-command:print y -// lldb-check:[...]$2 = 5 +// lldb-check:[...] 5 // lldb-command:print z -// lldb-check:[...]$3 = 6.5 +// lldb-check:[...] 6.5 // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$4 = (7, 8, 9.5, 10.5) +// lldb-check:[...] (7, 8, 9.5, 10.5) // lldb-command:continue // lldb-command:print a -// lldb-check:[...]$5 = Newtype(11.5, 12.5, 13, 14) +// lldb-check:[...] Newtype(11.5, 12.5, 13, 14) // lldb-command:continue // lldb-command:print x -// lldb-check:[...]$6 = Case1 { x: 0, y: 8970181431921507452 } +// lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 } // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs index 247d6c27a06eb..7b52d054b3217 100644 --- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -26,17 +26,17 @@ // lldb-command:run // lldb-command:print self -// lldbg-check:[...]$0 = 1111 +// lldbg-check:[...] 1111 // lldbr-check:(isize) self = 1111 // lldb-command:continue // lldb-command:print self -// lldbg-check:[...]$1 = { x = 2222 y = 3333 } +// lldbg-check:[...] { x = 2222 y = 3333 } // lldbr-check:(by_value_self_argument_in_trait_impl::Struct) self = { x = 2222 y = 3333 } // lldb-command:continue // lldb-command:print self -// lldbg-check:[...] $2 = { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } +// lldbg-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } // lldbr-check:((f64, isize, isize, f64)) self = { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } // lldb-command:continue diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs index 3f0968f09afd3..82d38038eafa9 100644 --- a/tests/debuginfo/c-style-enum-in-composite.rs +++ b/tests/debuginfo/c-style-enum-in-composite.rs @@ -39,31 +39,31 @@ // lldb-command:run // lldb-command:print tuple_interior_padding -// lldbg-check:[...]$0 = { 0 = 0 1 = OneHundred } +// lldbg-check:[...] { 0 = 0 1 = OneHundred } // lldbr-check:((i16, c_style_enum_in_composite::AnEnum)) tuple_interior_padding = { 0 = 0 1 = OneHundred } // lldb-command:print tuple_padding_at_end -// lldbg-check:[...]$1 = { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } +// lldbg-check:[...] { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } // lldbr-check:(((u64, c_style_enum_in_composite::AnEnum), u64)) tuple_padding_at_end = { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } // lldb-command:print tuple_different_enums -// lldbg-check:[...]$2 = { 0 = OneThousand 1 = MountainView 2 = OneMillion 3 = Vienna } +// lldbg-check:[...] { 0 = OneThousand 1 = MountainView 2 = OneMillion 3 = 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 = { 0 = c_style_enum_in_composite::AnEnum::OneThousand 1 = c_style_enum_in_composite::AnotherEnum::MountainView 2 = c_style_enum_in_composite::AnEnum::OneMillion 3 = c_style_enum_in_composite::AnotherEnum::Vienna } // lldb-command:print padded_struct -// lldbg-check:[...]$3 = { a = 3 b = OneMillion c = 4 d = Toronto e = 5 } +// lldbg-check:[...] { a = 3 b = OneMillion c = 4 d = Toronto e = 5 } // lldbr-check:(c_style_enum_in_composite::PaddedStruct) padded_struct = { a = 3 b = c_style_enum_in_composite::AnEnum::OneMillion c = 4 d = Toronto e = 5 } // lldb-command:print packed_struct -// lldbg-check:[...]$4 = { a = 6 b = OneHundred c = 7 d = Vienna e = 8 } +// lldbg-check:[...] { a = 6 b = OneHundred c = 7 d = Vienna e = 8 } // lldbr-check:(c_style_enum_in_composite::PackedStruct) packed_struct = { a = 6 b = c_style_enum_in_composite::AnEnum::OneHundred c = 7 d = Vienna e = 8 } // lldb-command:print non_padded_struct -// lldbg-check:[...]$5 = { a = OneMillion b = MountainView c = OneThousand d = Toronto } +// lldbg-check:[...] { a = OneMillion b = MountainView c = OneThousand d = Toronto } // lldbr-check:(c_style_enum_in_composite::NonPaddedStruct) non_padded_struct = { 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 -// lldbg-check:[...]$6 = { 0 = { a = OneHundred b = Vienna } 1 = 9 } +// lldbg-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 } // lldbr-check:((c_style_enum_in_composite::StructWithDrop, i64)) struct_with_drop = { 0 = { a = c_style_enum_in_composite::AnEnum::OneHundred b = c_style_enum_in_composite::AnotherEnum::Vienna } 1 = 9 } #![allow(unused_variables)] diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs index 2794575d3287b..4d84324df2cf3 100644 --- a/tests/debuginfo/c-style-enum.rs +++ b/tests/debuginfo/c-style-enum.rs @@ -97,31 +97,31 @@ // lldb-command:run // lldb-command:print auto_one -// lldbg-check:[...]$0 = One +// lldbg-check:[...] One // lldbr-check:(c_style_enum::AutoDiscriminant) auto_one = c_style_enum::AutoDiscriminant::One // lldb-command:print auto_two -// lldbg-check:[...]$1 = Two +// lldbg-check:[...] Two // lldbr-check:(c_style_enum::AutoDiscriminant) auto_two = c_style_enum::AutoDiscriminant::Two // lldb-command:print auto_three -// lldbg-check:[...]$2 = Three +// lldbg-check:[...] Three // lldbr-check:(c_style_enum::AutoDiscriminant) auto_three = c_style_enum::AutoDiscriminant::Three // lldb-command:print manual_one_hundred -// lldbg-check:[...]$3 = OneHundred +// lldbg-check:[...] OneHundred // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_hundred = c_style_enum::ManualDiscriminant::OneHundred // lldb-command:print manual_one_thousand -// lldbg-check:[...]$4 = OneThousand +// lldbg-check:[...] OneThousand // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_thousand = c_style_enum::ManualDiscriminant::OneThousand // lldb-command:print manual_one_million -// lldbg-check:[...]$5 = OneMillion +// lldbg-check:[...] OneMillion // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_million = c_style_enum::ManualDiscriminant::OneMillion // lldb-command:print single_variant -// lldbg-check:[...]$6 = TheOnlyVariant +// lldbg-check:[...] TheOnlyVariant // lldbr-check:(c_style_enum::SingleVariant) single_variant = c_style_enum::SingleVariant::TheOnlyVariant #![allow(unused_variables)] diff --git a/tests/debuginfo/captured-fields-1.rs b/tests/debuginfo/captured-fields-1.rs index f5fdf4fb3d9c6..bcc5a17968768 100644 --- a/tests/debuginfo/captured-fields-1.rs +++ b/tests/debuginfo/captured-fields-1.rs @@ -26,22 +26,22 @@ // lldb-command:run // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#0}) $0 = { _ref__my_ref__my_field1 = 0x[...] } +// lldbg-check:(captured_fields_1::main::{closure_env#0}) { _ref__my_ref__my_field1 = 0x[...] } // lldb-command:continue // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#1}) $1 = { _ref__my_ref__my_field2 = 0x[...] } +// lldbg-check:(captured_fields_1::main::{closure_env#1}) { _ref__my_ref__my_field2 = 0x[...] } // lldb-command:continue // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#2}) $2 = { _ref__my_ref = 0x[...] } +// lldbg-check:(captured_fields_1::main::{closure_env#2}) { _ref__my_ref = 0x[...] } // lldb-command:continue // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#3}) $3 = { my_ref = 0x[...] } +// lldbg-check:(captured_fields_1::main::{closure_env#3}) { my_ref = 0x[...] } // lldb-command:continue // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#4}) $4 = { my_var__my_field2 = 22 } +// lldbg-check:(captured_fields_1::main::{closure_env#4}) { my_var__my_field2 = 22 } // lldb-command:continue // lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#5}) $5 = { my_var = { my_field1 = 11 my_field2 = 22 } } +// lldbg-check:(captured_fields_1::main::{closure_env#5}) { my_var = { my_field1 = 11 my_field2 = 22 } } // lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/captured-fields-2.rs b/tests/debuginfo/captured-fields-2.rs index aaf4fa1bc4546..7191d3f84d2a7 100644 --- a/tests/debuginfo/captured-fields-2.rs +++ b/tests/debuginfo/captured-fields-2.rs @@ -14,10 +14,10 @@ // lldb-command:run // lldb-command:print my_ref__my_field1 -// lldbg-check:(unsigned int) $0 = 11 +// lldbg-check:(unsigned int) 11 // lldb-command:continue // lldb-command:print my_var__my_field2 -// lldbg-check:(unsigned int) $1 = 22 +// lldbg-check:(unsigned int) 22 // lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs index 676a624191c2f..c48858e4a0a55 100644 --- a/tests/debuginfo/closure-in-generic-function.rs +++ b/tests/debuginfo/closure-in-generic-function.rs @@ -24,18 +24,18 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = 0.5 +// lldbg-check:[...] 0.5 // lldbr-check:(f64) x = 0.5 // lldb-command:print y -// lldbg-check:[...]$1 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) y = 10 // lldb-command:continue // lldb-command:print *x -// lldbg-check:[...]$2 = 29 +// lldbg-check:[...] 29 // lldbr-check:(i32) *x = 29 // lldb-command:print *y -// lldbg-check:[...]$3 = 110 +// lldbg-check:[...] 110 // lldbr-check:(i32) *y = 110 // lldb-command:continue diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs index 0430e1d313bd7..80a68434dab58 100644 --- a/tests/debuginfo/coroutine-locals.rs +++ b/tests/debuginfo/coroutine-locals.rs @@ -28,30 +28,30 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:(int) $0 = 5 +// lldbg-check:(int) 5 // lldbr-check:(int) a = 5 // lldb-command:print c -// lldbg-check:(int) $1 = 6 +// lldbg-check:(int) 6 // lldbr-check:(int) c = 6 // lldb-command:print d -// lldbg-check:(int) $2 = 7 +// lldbg-check:(int) 7 // lldbr-check:(int) d = 7 // lldb-command:continue // lldb-command:print a -// lldbg-check:(int) $3 = 7 +// lldbg-check:(int) 7 // lldbr-check:(int) a = 7 // lldb-command:print c -// lldbg-check:(int) $4 = 6 +// lldbg-check:(int) 6 // lldbr-check:(int) c = 6 // lldb-command:print e -// lldbg-check:(int) $5 = 8 +// lldbg-check:(int) 8 // lldbr-check:(int) e = 8 // lldb-command:continue // lldb-command:print a -// lldbg-check:(int) $6 = 8 +// lldbg-check:(int) 8 // lldbr-check:(int) a = 8 // lldb-command:print c -// lldbg-check:(int) $7 = 6 +// lldbg-check:(int) 6 // lldbr-check:(int) c = 6 #![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)] diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs index 98b37ac2001d4..9f14cb3f8ec43 100644 --- a/tests/debuginfo/coroutine-objects.rs +++ b/tests/debuginfo/coroutine-objects.rs @@ -26,16 +26,16 @@ // lldb-command:run // lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $0 = +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) // lldb-command:continue // lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $1 = +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) // lldb-command:continue // lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $2 = +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) // lldb-command:continue // lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $3 = +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) // === CDB TESTS =================================================================================== diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs index 75550e1794cc6..9f3538c4e1d49 100644 --- a/tests/debuginfo/cross-crate-spans.rs +++ b/tests/debuginfo/cross-crate-spans.rs @@ -44,24 +44,24 @@ extern crate cross_crate_spans; // lldb-command:run // lldb-command:print result -// lldbg-check:[...]$0 = { 0 = 17 1 = 17 } +// lldbg-check:[...] { 0 = 17 1 = 17 } // lldbr-check:((u32, u32)) result = { 0 = 17 1 = 17 } // lldb-command:print a_variable -// lldbg-check:[...]$1 = 123456789 +// lldbg-check:[...] 123456789 // lldbr-check:(u32) a_variable = 123456789 // lldb-command:print another_variable -// lldbg-check:[...]$2 = 123456789.5 +// lldbg-check:[...] 123456789.5 // lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue // lldb-command:print result -// lldbg-check:[...]$3 = { 0 = 1212 1 = 1212 } +// lldbg-check:[...] { 0 = 1212 1 = 1212 } // lldbr-check:((i16, i16)) result = { 0 = 1212 1 = 1212 } // lldb-command:print a_variable -// lldbg-check:[...]$4 = 123456789 +// lldbg-check:[...] 123456789 // lldbr-check:(u32) a_variable = 123456789 // lldb-command:print another_variable -// lldbg-check:[...]$5 = 123456789.5 +// lldbg-check:[...] 123456789.5 // lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs index e6e697c518a19..2748bdb08b964 100644 --- a/tests/debuginfo/destructured-fn-argument.rs +++ b/tests/debuginfo/destructured-fn-argument.rs @@ -164,195 +164,195 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) a = 1 // lldb-command:print b -// lldbg-check:[...]$1 = false +// lldbg-check:[...] false // lldbr-check:(bool) b = false // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$2 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) a = 2 // lldb-command:print b -// lldbg-check:[...]$3 = 3 +// lldbg-check:[...] 3 // lldbr-check:(u16) b = 3 // lldb-command:print c -// lldbg-check:[...]$4 = 4 +// lldbg-check:[...] 4 // lldbr-check:(u16) c = 4 // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$5 = 5 +// lldbg-check:[...] 5 // lldbr-check:(isize) a = 5 // lldb-command:print b -// lldbg-check:[...]$6 = { 0 = 6 1 = 7 } +// lldbg-check:[...] { 0 = 6 1 = 7 } // lldbr-check:((u32, u32)) b = { 0 = 6 1 = 7 } // lldb-command:continue // lldb-command:print h -// lldbg-check:[...]$7 = 8 +// lldbg-check:[...] 8 // lldbr-check:(i16) h = 8 // lldb-command:print i -// lldbg-check:[...]$8 = { a = 9 b = 10 } +// lldbg-check:[...] { a = 9 b = 10 } // lldbr-check:(destructured_fn_argument::Struct) i = { a = 9 b = 10 } // lldb-command:print j -// lldbg-check:[...]$9 = 11 +// lldbg-check:[...] 11 // lldbr-check:(i16) j = 11 // lldb-command:continue // lldb-command:print k -// lldbg-check:[...]$10 = 12 +// lldbg-check:[...] 12 // lldbr-check:(i64) k = 12 // lldb-command:print l -// lldbg-check:[...]$11 = 13 +// lldbg-check:[...] 13 // lldbr-check:(i32) l = 13 // lldb-command:continue // lldb-command:print m -// lldbg-check:[...]$12 = 14 +// lldbg-check:[...] 14 // lldbr-check:(isize) m = 14 // lldb-command:print n -// lldbg-check:[...]$13 = 16 +// lldbg-check:[...] 16 // lldbr-check:(i32) n = 16 // lldb-command:continue // lldb-command:print o -// lldbg-check:[...]$14 = 18 +// lldbg-check:[...] 18 // lldbr-check:(i32) o = 18 // lldb-command:continue // lldb-command:print p -// lldbg-check:[...]$15 = 19 +// lldbg-check:[...] 19 // lldbr-check:(i64) p = 19 // lldb-command:print q -// lldbg-check:[...]$16 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) q = 20 // lldb-command:print r -// lldbg-check:[...]$17 = { a = 21 b = 22 } +// lldbg-check:[...] { a = 21 b = 22 } // lldbr-check:(destructured_fn_argument::Struct) r = { a = 21, b = 22 } // lldb-command:continue // lldb-command:print s -// lldbg-check:[...]$18 = 24 +// lldbg-check:[...] 24 // lldbr-check:(i32) s = 24 // lldb-command:print t -// lldbg-check:[...]$19 = 23 +// lldbg-check:[...] 23 // lldbr-check:(i64) t = 23 // lldb-command:continue // lldb-command:print u -// lldbg-check:[...]$20 = 25 +// lldbg-check:[...] 25 // lldbr-check:(i16) u = 25 // lldb-command:print v -// lldbg-check:[...]$21 = 26 +// lldbg-check:[...] 26 // lldbr-check:(i32) v = 26 // lldb-command:print w -// lldbg-check:[...]$22 = 27 +// lldbg-check:[...] 27 // lldbr-check:(i64) w = 27 // lldb-command:print x -// lldbg-check:[...]$23 = 28 +// lldbg-check:[...] 28 // lldbr-check:(i32) x = 28 // lldb-command:print y -// lldbg-check:[...]$24 = 29 +// lldbg-check:[...] 29 // lldbr-check:(i64) y = 29 // lldb-command:print z -// lldbg-check:[...]$25 = 30 +// lldbg-check:[...] 30 // lldbr-check:(i32) z = 30 // lldb-command:print ae -// lldbg-check:[...]$26 = 31 +// lldbg-check:[...] 31 // lldbr-check:(i64) ae = 31 // lldb-command:print oe -// lldbg-check:[...]$27 = 32 +// lldbg-check:[...] 32 // lldbr-check:(i32) oe = 32 // lldb-command:print ue -// lldbg-check:[...]$28 = 33 +// lldbg-check:[...] 33 // lldbr-check:(u16) ue = 33 // lldb-command:continue // lldb-command:print aa -// lldbg-check:[...]$29 = { 0 = 34 1 = 35 } +// lldbg-check:[...] { 0 = 34 1 = 35 } // lldbr-check:((isize, isize)) aa = { 0 = 34 1 = 35 } // lldb-command:continue // lldb-command:print bb -// lldbg-check:[...]$30 = { 0 = 36 1 = 37 } +// lldbg-check:[...] { 0 = 36 1 = 37 } // lldbr-check:((isize, isize)) bb = { 0 = 36 1 = 37 } // lldb-command:continue // lldb-command:print cc -// lldbg-check:[...]$31 = 38 +// lldbg-check:[...] 38 // lldbr-check:(isize) cc = 38 // lldb-command:continue // lldb-command:print dd -// lldbg-check:[...]$32 = { 0 = 40 1 = 41 2 = 42 } +// lldbg-check:[...] { 0 = 40 1 = 41 2 = 42 } // lldbr-check:((isize, isize, isize)) dd = { 0 = 40 1 = 41 2 = 42 } // lldb-command:continue // lldb-command:print *ee -// lldbg-check:[...]$33 = { 0 = 43 1 = 44 2 = 45 } +// lldbg-check:[...] { 0 = 43 1 = 44 2 = 45 } // lldbr-check:((isize, isize, isize)) *ee = { 0 = 43 1 = 44 2 = 45 } // lldb-command:continue // lldb-command:print *ff -// lldbg-check:[...]$34 = 46 +// lldbg-check:[...] 46 // lldbr-check:(isize) *ff = 46 // lldb-command:print gg -// lldbg-check:[...]$35 = { 0 = 47 1 = 48 } +// lldbg-check:[...] { 0 = 47 1 = 48 } // lldbr-check:((isize, isize)) gg = { 0 = 47 1 = 48 } // lldb-command:continue // lldb-command:print *hh -// lldbg-check:[...]$36 = 50 +// lldbg-check:[...] 50 // lldbr-check:(i32) *hh = 50 // lldb-command:continue // lldb-command:print ii -// lldbg-check:[...]$37 = 51 +// lldbg-check:[...] 51 // lldbr-check:(i32) ii = 51 // lldb-command:continue // lldb-command:print *jj -// lldbg-check:[...]$38 = 52 +// lldbg-check:[...] 52 // lldbr-check:(i32) *jj = 52 // lldb-command:continue // lldb-command:print kk -// lldbg-check:[...]$39 = 53 +// lldbg-check:[...] 53 // lldbr-check:(f64) kk = 53 // lldb-command:print ll -// lldbg-check:[...]$40 = 54 +// lldbg-check:[...] 54 // lldbr-check:(isize) ll = 54 // lldb-command:continue // lldb-command:print mm -// lldbg-check:[...]$41 = 55 +// lldbg-check:[...] 55 // lldbr-check:(f64) mm = 55 // lldb-command:print *nn -// lldbg-check:[...]$42 = 56 +// lldbg-check:[...] 56 // lldbr-check:(isize) *nn = 56 // lldb-command:continue // lldb-command:print oo -// lldbg-check:[...]$43 = 57 +// lldbg-check:[...] 57 // lldbr-check:(isize) oo = 57 // lldb-command:print pp -// lldbg-check:[...]$44 = 58 +// lldbg-check:[...] 58 // lldbr-check:(isize) pp = 58 // lldb-command:print qq -// lldbg-check:[...]$45 = 59 +// lldbg-check:[...] 59 // lldbr-check:(isize) qq = 59 // lldb-command:continue // lldb-command:print rr -// lldbg-check:[...]$46 = 60 +// lldbg-check:[...] 60 // lldbr-check:(isize) rr = 60 // lldb-command:print ss -// lldbg-check:[...]$47 = 61 +// lldbg-check:[...] 61 // lldbr-check:(isize) ss = 61 // lldb-command:print tt -// lldbg-check:[...]$48 = 62 +// lldbg-check:[...] 62 // lldbr-check:(isize) tt = 62 // lldb-command:continue diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs index 3e27d122c4beb..e583804cb1e9e 100644 --- a/tests/debuginfo/destructured-for-loop-variable.rs +++ b/tests/debuginfo/destructured-for-loop-variable.rs @@ -85,89 +85,89 @@ // DESTRUCTURED STRUCT // lldb-command:print x -// lldbg-check:[...]$0 = 400 +// lldbg-check:[...] 400 // lldbr-check:(i16) x = 400 // lldb-command:print y -// lldbg-check:[...]$1 = 401.5 +// lldbg-check:[...] 401.5 // lldbr-check:(f32) y = 401.5 // lldb-command:print z -// lldbg-check:[...]$2 = true +// lldbg-check:[...] true // lldbr-check:(bool) z = true // lldb-command:continue // DESTRUCTURED TUPLE // lldb-command:print _i8 -// lldbg-check:[...]$3 = 0x6f +// lldbg-check:[...] 0x6f // lldbr-check:(i8) _i8 = 111 // lldb-command:print _u8 -// lldbg-check:[...]$4 = 0x70 +// lldbg-check:[...] 0x70 // lldbr-check:(u8) _u8 = 112 // lldb-command:print _i16 -// lldbg-check:[...]$5 = -113 +// lldbg-check:[...] -113 // lldbr-check:(i16) _i16 = -113 // lldb-command:print _u16 -// lldbg-check:[...]$6 = 114 +// lldbg-check:[...] 114 // lldbr-check:(u16) _u16 = 114 // lldb-command:print _i32 -// lldbg-check:[...]$7 = -115 +// lldbg-check:[...] -115 // lldbr-check:(i32) _i32 = -115 // lldb-command:print _u32 -// lldbg-check:[...]$8 = 116 +// lldbg-check:[...] 116 // lldbr-check:(u32) _u32 = 116 // lldb-command:print _i64 -// lldbg-check:[...]$9 = -117 +// lldbg-check:[...] -117 // lldbr-check:(i64) _i64 = -117 // lldb-command:print _u64 -// lldbg-check:[...]$10 = 118 +// lldbg-check:[...] 118 // lldbr-check:(u64) _u64 = 118 // lldb-command:print _f32 -// lldbg-check:[...]$11 = 119.5 +// lldbg-check:[...] 119.5 // lldbr-check:(f32) _f32 = 119.5 // lldb-command:print _f64 -// lldbg-check:[...]$12 = 120.5 +// lldbg-check:[...] 120.5 // lldbr-check:(f64) _f64 = 120.5 // lldb-command:continue // MORE COMPLEX CASE // lldb-command:print v1 -// lldbg-check:[...]$13 = 80000 +// lldbg-check:[...] 80000 // lldbr-check:(i32) v1 = 80000 // lldb-command:print x1 -// lldbg-check:[...]$14 = 8000 +// lldbg-check:[...] 8000 // lldbr-check:(i16) x1 = 8000 // lldb-command:print *y1 -// lldbg-check:[...]$15 = 80001.5 +// lldbg-check:[...] 80001.5 // lldbr-check:(f32) *y1 = 80001.5 // lldb-command:print z1 -// lldbg-check:[...]$16 = false +// lldbg-check:[...] false // lldbr-check:(bool) z1 = false // lldb-command:print *x2 -// lldbg-check:[...]$17 = -30000 +// lldbg-check:[...] -30000 // lldbr-check:(i16) *x2 = -30000 // lldb-command:print y2 -// lldbg-check:[...]$18 = -300001.5 +// lldbg-check:[...] -300001.5 // lldbr-check:(f32) y2 = -300001.5 // lldb-command:print *z2 -// lldbg-check:[...]$19 = true +// lldbg-check:[...] true // lldbr-check:(bool) *z2 = true // lldb-command:print v2 -// lldbg-check:[...]$20 = 854237.5 +// lldbg-check:[...] 854237.5 // lldbr-check:(f64) v2 = 854237.5 // lldb-command:continue // SIMPLE IDENTIFIER // lldb-command:print i -// lldbg-check:[...]$21 = 1234 +// lldbg-check:[...] 1234 // lldbr-check:(i32) i = 1234 // lldb-command:continue // lldb-command:print simple_struct_ident -// lldbg-check:[...]$22 = { x = 3537 y = 35437.5 z = true } +// lldbg-check:[...] { x = 3537 y = 35437.5 z = true } // lldbr-check:(destructured_for_loop_variable::Struct) simple_struct_ident = { x = 3537 y = 35437.5 z = true } // lldb-command:continue // lldb-command:print simple_tuple_ident -// lldbg-check:[...]$23 = { 0 = 34903493 1 = 232323 } +// lldbg-check:[...] { 0 = 34903493 1 = 232323 } // lldbr-check:((u32, i64)) simple_tuple_ident = { 0 = 34903493 1 = 232323 } // lldb-command:continue diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs index 3e0557382b3ca..9993407815e0a 100644 --- a/tests/debuginfo/destructured-local.rs +++ b/tests/debuginfo/destructured-local.rs @@ -130,156 +130,156 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) a = 1 // lldb-command:print b -// lldbg-check:[...]$1 = false +// lldbg-check:[...] false // lldbr-check:(bool) b = false // lldb-command:print c -// lldbg-check:[...]$2 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) c = 2 // lldb-command:print d -// lldbg-check:[...]$3 = 3 +// lldbg-check:[...] 3 // lldbr-check:(u16) d = 3 // lldb-command:print e -// lldbg-check:[...]$4 = 4 +// lldbg-check:[...] 4 // lldbr-check:(u16) e = 4 // lldb-command:print f -// lldbg-check:[...]$5 = 5 +// lldbg-check:[...] 5 // lldbr-check:(isize) f = 5 // lldb-command:print g -// lldbg-check:[...]$6 = { 0 = 6 1 = 7 } +// lldbg-check:[...] { 0 = 6 1 = 7 } // lldbr-check:((u32, u32)) g = { 0 = 6 1 = 7 } // lldb-command:print h -// lldbg-check:[...]$7 = 8 +// lldbg-check:[...] 8 // lldbr-check:(i16) h = 8 // lldb-command:print i -// lldbg-check:[...]$8 = { a = 9 b = 10 } +// lldbg-check:[...] { a = 9 b = 10 } // lldbr-check:(destructured_local::Struct) i = { a = 9 b = 10 } // lldb-command:print j -// lldbg-check:[...]$9 = 11 +// lldbg-check:[...] 11 // lldbr-check:(i16) j = 11 // lldb-command:print k -// lldbg-check:[...]$10 = 12 +// lldbg-check:[...] 12 // lldbr-check:(i64) k = 12 // lldb-command:print l -// lldbg-check:[...]$11 = 13 +// lldbg-check:[...] 13 // lldbr-check:(i32) l = 13 // lldb-command:print m -// lldbg-check:[...]$12 = 14 +// lldbg-check:[...] 14 // lldbr-check:(i32) m = 14 // lldb-command:print n -// lldbg-check:[...]$13 = 16 +// lldbg-check:[...] 16 // lldbr-check:(i32) n = 16 // lldb-command:print o -// lldbg-check:[...]$14 = 18 +// lldbg-check:[...] 18 // lldbr-check:(i32) o = 18 // lldb-command:print p -// lldbg-check:[...]$15 = 19 +// lldbg-check:[...] 19 // lldbr-check:(i64) p = 19 // lldb-command:print q -// lldbg-check:[...]$16 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) q = 20 // lldb-command:print r -// lldbg-check:[...]$17 = { a = 21 b = 22 } +// lldbg-check:[...] { a = 21 b = 22 } // lldbr-check:(destructured_local::Struct) r = { a = 21 b = 22 } // lldb-command:print s -// lldbg-check:[...]$18 = 24 +// lldbg-check:[...] 24 // lldbr-check:(i32) s = 24 // lldb-command:print t -// lldbg-check:[...]$19 = 23 +// lldbg-check:[...] 23 // lldbr-check:(i64) t = 23 // lldb-command:print u -// lldbg-check:[...]$20 = 25 +// lldbg-check:[...] 25 // lldbr-check:(i32) u = 25 // lldb-command:print v -// lldbg-check:[...]$21 = 26 +// lldbg-check:[...] 26 // lldbr-check:(i32) v = 26 // lldb-command:print w -// lldbg-check:[...]$22 = 27 +// lldbg-check:[...] 27 // lldbr-check:(i32) w = 27 // lldb-command:print x -// lldbg-check:[...]$23 = 28 +// lldbg-check:[...] 28 // lldbr-check:(i32) x = 28 // lldb-command:print y -// lldbg-check:[...]$24 = 29 +// lldbg-check:[...] 29 // lldbr-check:(i64) y = 29 // lldb-command:print z -// lldbg-check:[...]$25 = 30 +// lldbg-check:[...] 30 // lldbr-check:(i32) z = 30 // lldb-command:print ae -// lldbg-check:[...]$26 = 31 +// lldbg-check:[...] 31 // lldbr-check:(i64) ae = 31 // lldb-command:print oe -// lldbg-check:[...]$27 = 32 +// lldbg-check:[...] 32 // lldbr-check:(i32) oe = 32 // lldb-command:print ue -// lldbg-check:[...]$28 = 33 +// lldbg-check:[...] 33 // lldbr-check:(i32) ue = 33 // lldb-command:print aa -// lldbg-check:[...]$29 = { 0 = 34 1 = 35 } +// lldbg-check:[...] { 0 = 34 1 = 35 } // lldbr-check:((i32, i32)) aa = { 0 = 34 1 = 35 } // lldb-command:print bb -// lldbg-check:[...]$30 = { 0 = 36 1 = 37 } +// lldbg-check:[...] { 0 = 36 1 = 37 } // lldbr-check:((i32, i32)) bb = { 0 = 36 1 = 37 } // lldb-command:print cc -// lldbg-check:[...]$31 = 38 +// lldbg-check:[...] 38 // lldbr-check:(i32) cc = 38 // lldb-command:print dd -// lldbg-check:[...]$32 = { 0 = 40 1 = 41 2 = 42 } +// lldbg-check:[...] { 0 = 40 1 = 41 2 = 42 } // lldbr-check:((i32, i32, i32)) dd = { 0 = 40 1 = 41 2 = 42} // lldb-command:print *ee -// lldbg-check:[...]$33 = { 0 = 43 1 = 44 2 = 45 } +// lldbg-check:[...] { 0 = 43 1 = 44 2 = 45 } // lldbr-check:((i32, i32, i32)) *ee = { 0 = 43 1 = 44 2 = 45} // lldb-command:print *ff -// lldbg-check:[...]$34 = 46 +// lldbg-check:[...] 46 // lldbr-check:(i32) *ff = 46 // lldb-command:print gg -// lldbg-check:[...]$35 = { 0 = 47 1 = 48 } +// lldbg-check:[...] { 0 = 47 1 = 48 } // lldbr-check:((i32, i32)) gg = { 0 = 47 1 = 48 } // lldb-command:print *hh -// lldbg-check:[...]$36 = 50 +// lldbg-check:[...] 50 // lldbr-check:(i32) *hh = 50 // lldb-command:print ii -// lldbg-check:[...]$37 = 51 +// lldbg-check:[...] 51 // lldbr-check:(i32) ii = 51 // lldb-command:print *jj -// lldbg-check:[...]$38 = 52 +// lldbg-check:[...] 52 // lldbr-check:(i32) *jj = 52 // lldb-command:print kk -// lldbg-check:[...]$39 = 53 +// lldbg-check:[...] 53 // lldbr-check:(f64) kk = 53 // lldb-command:print ll -// lldbg-check:[...]$40 = 54 +// lldbg-check:[...] 54 // lldbr-check:(isize) ll = 54 // lldb-command:print mm -// lldbg-check:[...]$41 = 55 +// lldbg-check:[...] 55 // lldbr-check:(f64) mm = 55 // lldb-command:print *nn -// lldbg-check:[...]$42 = 56 +// lldbg-check:[...] 56 // lldbr-check:(isize) *nn = 56 diff --git a/tests/debuginfo/drop-locations.rs b/tests/debuginfo/drop-locations.rs index 6404bf9c3dad5..15b2d0de7fe99 100644 --- a/tests/debuginfo/drop-locations.rs +++ b/tests/debuginfo/drop-locations.rs @@ -43,22 +43,22 @@ // lldb-command:run // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc1[...] +// lldb-check:[...] #loc1 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc2[...] +// lldb-check:[...] #loc2 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc3[...] +// lldb-check:[...] #loc3 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc4[...] +// lldb-check:[...] #loc4 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc5[...] +// lldb-check:[...] #loc5 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc6[...] +// lldb-check:[...] #loc6 [...] fn main() { diff --git a/tests/debuginfo/empty-string.rs b/tests/debuginfo/empty-string.rs index 838e160e74ea6..2afdfc8ad04ba 100644 --- a/tests/debuginfo/empty-string.rs +++ b/tests/debuginfo/empty-string.rs @@ -20,10 +20,10 @@ // lldb-command: run // lldb-command: fr v empty_string -// lldb-check:[...]empty_string = "" { vec = size=0 } +// lldb-check:[...] empty_string = "" { vec = size=0 } // lldb-command: fr v empty_str -// lldb-check:[...]empty_str = "" { data_ptr = [...] length = 0 } +// lldb-check:[...] empty_str = "" { data_ptr = [...] length = 0 } fn main() { let empty_string = String::new(); diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index 5c27fe4271cad..2e541663147f9 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -15,7 +15,7 @@ // lldb-command:run // lldb-command:print *abc -// lldbg-check:(enum_thinlto::ABC) $0 = +// lldbg-check:(enum_thinlto::ABC) // lldbr-check:(enum_thinlto::ABC) *abc = (x = 0, y = 8970181431921507452) #![allow(unused_variables)] diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs index d238cc9eded18..0e6565830a9b7 100644 --- a/tests/debuginfo/evec-in-struct.rs +++ b/tests/debuginfo/evec-in-struct.rs @@ -31,22 +31,22 @@ // lldb-command:run // lldb-command:print no_padding1 -// lldbg-check:[...]$0 = { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } +// lldbg-check:[...] { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } // lldbr-check:(evec_in_struct::NoPadding1) no_padding1 = { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } // lldb-command:print no_padding2 -// lldbg-check:[...]$1 = { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } +// lldbg-check:[...] { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } // lldbr-check:(evec_in_struct::NoPadding2) no_padding2 = { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } // lldb-command:print struct_internal_padding -// lldbg-check:[...]$2 = { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } +// lldbg-check:[...] { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } // lldbr-check:(evec_in_struct::StructInternalPadding) struct_internal_padding = { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } // lldb-command:print single_vec -// lldbg-check:[...]$3 = { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } +// lldbg-check:[...] { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } // lldbr-check:(evec_in_struct::SingleVec) single_vec = { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } // lldb-command:print struct_padded_at_end -// lldbg-check:[...]$4 = { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } +// lldbg-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } // lldbr-check:(evec_in_struct::StructPaddedAtEnd) struct_padded_at_end = { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs index 62c2b60996927..0d2eb9e6daf00 100644 --- a/tests/debuginfo/extern-c-fn.rs +++ b/tests/debuginfo/extern-c-fn.rs @@ -22,16 +22,16 @@ // lldb-command:run // lldb-command:print len -// lldbg-check:[...]$0 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) len = 20 // lldb-command:print local0 -// lldbg-check:[...]$1 = 19 +// lldbg-check:[...] 19 // lldbr-check:(i32) local0 = 19 // lldb-command:print local1 -// lldbg-check:[...]$2 = true +// lldbg-check:[...] true // lldbr-check:(bool) local1 = true // lldb-command:print local2 -// lldbg-check:[...]$3 = 20.5 +// lldbg-check:[...] 20.5 // lldbr-check:(f64) local2 = 20.5 // lldb-command:continue diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs index 4bdaefd9bdd23..5288aa2e6f16a 100644 --- a/tests/debuginfo/function-arg-initialization.rs +++ b/tests/debuginfo/function-arg-initialization.rs @@ -120,99 +120,99 @@ // IMMEDIATE ARGS // lldb-command:print a -// lldb-check:[...]$0 = 1 +// lldb-check:[...] 1 // lldb-command:print b -// lldb-check:[...]$1 = true +// lldb-check:[...] true // lldb-command:print c -// lldb-check:[...]$2 = 2.5 +// lldb-check:[...] 2.5 // lldb-command:continue // NON IMMEDIATE ARGS // lldb-command:print a -// lldb-check:[...]$3 = BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 } +// lldb-check:[...] BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 } // lldb-command:print b -// lldb-check:[...]$4 = BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 } +// lldb-check:[...] BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 } // lldb-command:continue // BINDING // lldb-command:print a -// lldb-check:[...]$5 = 19 +// lldb-check:[...] 19 // lldb-command:print b -// lldb-check:[...]$6 = 20 +// lldb-check:[...] 20 // lldb-command:print c -// lldb-check:[...]$7 = 21.5 +// lldb-check:[...] 21.5 // lldb-command:continue // ASSIGNMENT // lldb-command:print a -// lldb-check:[...]$8 = 22 +// lldb-check:[...] 22 // lldb-command:print b -// lldb-check:[...]$9 = 23 +// lldb-check:[...] 23 // lldb-command:print c -// lldb-check:[...]$10 = 24.5 +// lldb-check:[...] 24.5 // lldb-command:continue // FUNCTION CALL // lldb-command:print x -// lldb-check:[...]$11 = 25 +// lldb-check:[...] 25 // lldb-command:print y -// lldb-check:[...]$12 = 26 +// lldb-check:[...] 26 // lldb-command:print z -// lldb-check:[...]$13 = 27.5 +// lldb-check:[...] 27.5 // lldb-command:continue // EXPR // lldb-command:print x -// lldb-check:[...]$14 = 28 +// lldb-check:[...] 28 // lldb-command:print y -// lldb-check:[...]$15 = 29 +// lldb-check:[...] 29 // lldb-command:print z -// lldb-check:[...]$16 = 30.5 +// lldb-check:[...] 30.5 // lldb-command:continue // RETURN EXPR // lldb-command:print x -// lldb-check:[...]$17 = 31 +// lldb-check:[...] 31 // lldb-command:print y -// lldb-check:[...]$18 = 32 +// lldb-check:[...] 32 // lldb-command:print z -// lldb-check:[...]$19 = 33.5 +// lldb-check:[...] 33.5 // lldb-command:continue // ARITHMETIC EXPR // lldb-command:print x -// lldb-check:[...]$20 = 34 +// lldb-check:[...] 34 // lldb-command:print y -// lldb-check:[...]$21 = 35 +// lldb-check:[...] 35 // lldb-command:print z -// lldb-check:[...]$22 = 36.5 +// lldb-check:[...] 36.5 // lldb-command:continue // IF EXPR // lldb-command:print x -// lldb-check:[...]$23 = 37 +// lldb-check:[...] 37 // lldb-command:print y -// lldb-check:[...]$24 = 38 +// lldb-check:[...] 38 // lldb-command:print z -// lldb-check:[...]$25 = 39.5 +// lldb-check:[...] 39.5 // lldb-command:continue // WHILE EXPR // lldb-command:print x -// lldb-check:[...]$26 = 40 +// lldb-check:[...] 40 // lldb-command:print y -// lldb-check:[...]$27 = 41 +// lldb-check:[...] 41 // lldb-command:print z -// lldb-check:[...]$28 = 42 +// lldb-check:[...] 42 // lldb-command:continue // LOOP EXPR // lldb-command:print x -// lldb-check:[...]$29 = 43 +// lldb-check:[...] 43 // lldb-command:print y -// lldb-check:[...]$30 = 44 +// lldb-check:[...] 44 // lldb-command:print z -// lldb-check:[...]$31 = 45 +// lldb-check:[...] 45 // lldb-command:continue diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs index c6b865bd458e1..84271d07b389f 100644 --- a/tests/debuginfo/function-arguments.rs +++ b/tests/debuginfo/function-arguments.rs @@ -23,18 +23,18 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = 111102 +// lldbg-check:[...] 111102 // lldbr-check:(isize) x = 111102 // lldb-command:print y -// lldbg-check:[...]$1 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$2 = 2000 +// lldbg-check:[...] 2000 // lldbr-check:(i32) a = 2000 // lldb-command:print b -// lldbg-check:[...]$3 = 3000 +// lldbg-check:[...] 3000 // lldbr-check:(i64) b = 3000 // lldb-command:continue diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs index e52d17a70bd7b..02567fd013e52 100644 --- a/tests/debuginfo/function-prologue-stepping-regular.rs +++ b/tests/debuginfo/function-prologue-stepping-regular.rs @@ -21,99 +21,99 @@ // IMMEDIATE ARGS // lldb-command:print a -// lldb-check:[...]$0 = 1 +// lldb-check:[...] 1 // lldb-command:print b -// lldb-check:[...]$1 = true +// lldb-check:[...] true // lldb-command:print c -// lldb-check:[...]$2 = 2.5 +// lldb-check:[...] 2.5 // lldb-command:continue // NON IMMEDIATE ARGS // lldb-command:print a -// lldb-check:[...]$3 = { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 } +// lldb-check:[...] { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 } // lldb-command:print b -// lldb-check:[...]$4 = { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 } +// lldb-check:[...] { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 } // lldb-command:continue // BINDING // lldb-command:print a -// lldb-check:[...]$5 = 19 +// lldb-check:[...] 19 // lldb-command:print b -// lldb-check:[...]$6 = 20 +// lldb-check:[...] 20 // lldb-command:print c -// lldb-check:[...]$7 = 21.5 +// lldb-check:[...] 21.5 // lldb-command:continue // ASSIGNMENT // lldb-command:print a -// lldb-check:[...]$8 = 22 +// lldb-check:[...] 22 // lldb-command:print b -// lldb-check:[...]$9 = 23 +// lldb-check:[...] 23 // lldb-command:print c -// lldb-check:[...]$10 = 24.5 +// lldb-check:[...] 24.5 // lldb-command:continue // FUNCTION CALL // lldb-command:print x -// lldb-check:[...]$11 = 25 +// lldb-check:[...] 25 // lldb-command:print y -// lldb-check:[...]$12 = 26 +// lldb-check:[...] 26 // lldb-command:print z -// lldb-check:[...]$13 = 27.5 +// lldb-check:[...] 27.5 // lldb-command:continue // EXPR // lldb-command:print x -// lldb-check:[...]$14 = 28 +// lldb-check:[...] 28 // lldb-command:print y -// lldb-check:[...]$15 = 29 +// lldb-check:[...] 29 // lldb-command:print z -// lldb-check:[...]$16 = 30.5 +// lldb-check:[...] 30.5 // lldb-command:continue // RETURN EXPR // lldb-command:print x -// lldb-check:[...]$17 = 31 +// lldb-check:[...] 31 // lldb-command:print y -// lldb-check:[...]$18 = 32 +// lldb-check:[...] 32 // lldb-command:print z -// lldb-check:[...]$19 = 33.5 +// lldb-check:[...] 33.5 // lldb-command:continue // ARITHMETIC EXPR // lldb-command:print x -// lldb-check:[...]$20 = 34 +// lldb-check:[...] 34 // lldb-command:print y -// lldb-check:[...]$21 = 35 +// lldb-check:[...] 35 // lldb-command:print z -// lldb-check:[...]$22 = 36.5 +// lldb-check:[...] 36.5 // lldb-command:continue // IF EXPR // lldb-command:print x -// lldb-check:[...]$23 = 37 +// lldb-check:[...] 37 // lldb-command:print y -// lldb-check:[...]$24 = 38 +// lldb-check:[...] 38 // lldb-command:print z -// lldb-check:[...]$25 = 39.5 +// lldb-check:[...] 39.5 // lldb-command:continue // WHILE EXPR // lldb-command:print x -// lldb-check:[...]$26 = 40 +// lldb-check:[...] 40 // lldb-command:print y -// lldb-check:[...]$27 = 41 +// lldb-check:[...] 41 // lldb-command:print z -// lldb-check:[...]$28 = 42 +// lldb-check:[...] 42 // lldb-command:continue // LOOP EXPR // lldb-command:print x -// lldb-check:[...]$29 = 43 +// lldb-check:[...] 43 // lldb-command:print y -// lldb-check:[...]$30 = 44 +// lldb-check:[...] 44 // lldb-command:print z -// lldb-check:[...]$31 = 45 +// lldb-check:[...] 45 // lldb-command:continue #![allow(unused_variables)] diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs index 6a8aa831c404d..a7e97194e5df0 100644 --- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -40,22 +40,22 @@ // lldb-command:run // lldb-command:print eight_bytes1 -// lldb-check:[...]$0 = Variant1(100) +// lldb-check:[...] Variant1(100) // lldb-command:print four_bytes1 -// lldb-check:[...]$1 = Variant1(101) +// lldb-check:[...] Variant1(101) // lldb-command:print two_bytes1 -// lldb-check:[...]$2 = Variant1(102) +// lldb-check:[...] Variant1(102) // lldb-command:print one_byte1 -// lldb-check:[...]$3 = Variant1('A') +// lldb-check:[...] Variant1('A') // lldb-command:print eight_bytes2 -// lldb-check:[...]$4 = Variant2(100) +// lldb-check:[...] Variant2(100) // lldb-command:print four_bytes2 -// lldb-check:[...]$5 = Variant2(101) +// lldb-check:[...] Variant2(101) // lldb-command:print two_bytes2 -// lldb-check:[...]$6 = Variant2(102) +// lldb-check:[...] Variant2(102) // lldb-command:print one_byte2 -// lldb-check:[...]$7 = Variant2('A') +// lldb-check:[...] Variant2('A') // lldb-command:continue diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs index eab781d2150d3..5c33d0d8520bb 100644 --- a/tests/debuginfo/generic-function.rs +++ b/tests/debuginfo/generic-function.rs @@ -30,26 +30,26 @@ // lldb-command:run // lldb-command:print *t0 -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) *t0 = 1 // lldb-command:print *t1 -// lldbg-check:[...]$1 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f64) *t1 = 2.5 // lldb-command:continue // lldb-command:print *t0 -// lldbg-check:[...]$2 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) *t0 = 3.5 // lldb-command:print *t1 -// lldbg-check:[...]$3 = 4 +// lldbg-check:[...] 4 // lldbr-check:(u16) *t1 = 4 // lldb-command:continue // lldb-command:print *t0 -// lldbg-check:[...]$4 = 5 +// lldbg-check:[...] 5 // lldbr-check:(i32) *t0 = 5 // lldb-command:print *t1 -// lldbg-check:[...]$5 = { a = 6 b = 7.5 } +// lldbg-check:[...] { a = 6 b = 7.5 } // lldbr-check:(generic_function::Struct) *t1 = { a = 6 b = 7.5 } // lldb-command:continue diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs index a146015246e86..4be0ab80f650f 100644 --- a/tests/debuginfo/generic-functions-nested.rs +++ b/tests/debuginfo/generic-functions-nested.rs @@ -36,34 +36,34 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 // lldb-command:print y -// lldbg-check:[...]$1 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) y = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 // lldb-command:print y -// lldbg-check:[...]$3 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f64) y = 2.5 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = -2.5 +// lldbg-check:[...] -2.5 // lldbr-check:(f64) x = -2.5 // lldb-command:print y -// lldbg-check:[...]$5 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) y = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$6 = -2.5 +// lldbg-check:[...] -2.5 // lldbr-check:(f64) x = -2.5 // lldb-command:print y -// lldbg-check:[...]$7 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f64) y = 2.5 // lldb-command:continue diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs index dd1f482f3fa66..dea1c17ad416b 100644 --- a/tests/debuginfo/generic-method-on-generic-struct.rs +++ b/tests/debuginfo/generic-method-on-generic-struct.rs @@ -65,61 +65,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { x = { 0 = 8888, 1 = -8888 } } +// lldbg-check:[...] { x = { 0 = 8888, 1 = -8888 } } // lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { 0 = 8888 1 = -8888 } } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = 2 +// lldbg-check:[...] 2 // lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { x = { 0 = 8888, 1 = -8888 } } +// lldbg-check:[...] { x = { 0 = 8888, 1 = -8888 } } // lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) self = { x = { 0 = 8888, 1 = -8888 } } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { x = 1234.5 } +// lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) *self = { x = 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { x = 1234.5 } +// lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) self = { x = 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { x = 1234.5 } +// lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) *self = { x = 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10.5 +// lldbg-check:[...] -10.5 // lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs index 82ed17618aaac..4c442feec6ac1 100644 --- a/tests/debuginfo/generic-struct.rs +++ b/tests/debuginfo/generic-struct.rs @@ -26,17 +26,17 @@ // lldb-command:run // lldb-command:print int_int -// lldbg-check:[...]$0 = AGenericStruct { key: 0, value: 1 } +// lldbg-check:[...] AGenericStruct { key: 0, value: 1 } // lldbr-check:(generic_struct::AGenericStruct) int_int = AGenericStruct { key: 0, value: 1 } // lldb-command:print int_float -// lldbg-check:[...]$1 = AGenericStruct { key: 2, value: 3.5 } +// lldbg-check:[...] AGenericStruct { key: 2, value: 3.5 } // lldbr-check:(generic_struct::AGenericStruct) int_float = AGenericStruct { key: 2, value: 3.5 } // lldb-command:print float_int -// lldbg-check:[...]$2 = AGenericStruct { key: 4.5, value: 5 } +// lldbg-check:[...] 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 -// lldbg-check:[...]$3 = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } +// lldbg-check:[...] 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 } } // === CDB TESTS =================================================================================== diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 6f7d2b28b4186..77b2d7dec5f9b 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -16,13 +16,13 @@ // lldb-command:run // lldb-command:print string1.length -// lldbg-check:[...]$0 = 48 +// lldbg-check:[...] 48 // lldbr-check:(usize) length = 48 // lldb-command:print string2.length -// lldbg-check:[...]$1 = 49 +// lldbg-check:[...] 49 // lldbr-check:(usize) length = 49 // lldb-command:print string3.length -// lldbg-check:[...]$2 = 50 +// lldbg-check:[...] 50 // lldbr-check:(usize) length = 50 // lldb-command:continue diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs index acbe2b12a248a..375967f2072a5 100644 --- a/tests/debuginfo/issue-22656.rs +++ b/tests/debuginfo/issue-22656.rs @@ -11,10 +11,10 @@ // lldb-command:run // lldb-command:print v -// lldbg-check:[...]$0 = size=3 { [0] = 1 [1] = 2 [2] = 3 } +// lldbg-check:[...] size=3 { [0] = 1 [1] = 2 [2] = 3 } // lldbr-check:(alloc::vec::Vec) v = size=3 { [0] = 1 [1] = 2 [2] = 3 } // lldb-command:print zs -// lldbg-check:[...]$1 = { x = y = 123 z = w = 456 } +// lldbg-check:[...] { x = y = 123 z = w = 456 } // lldbr-check:(issue_22656::StructWithZeroSizedField) zs = { x = y = 123 z = w = 456 } // lldbr-command:continue diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs index f4ef45f1d74b7..5d0973c1d6b3a 100644 --- a/tests/debuginfo/issue-57822.rs +++ b/tests/debuginfo/issue-57822.rs @@ -21,10 +21,10 @@ // lldb-command:run // lldb-command:print g -// lldbg-check:(issue_57822::main::{closure_env#1}) $0 = { f = { x = 1 } } +// lldbg-check:(issue_57822::main::{closure_env#1}) { f = { x = 1 } } // lldb-command:print b -// lldbg-check:(issue_57822::main::{coroutine_env#3}) $1 = +// lldbg-check:(issue_57822::main::{coroutine_env#3}) #![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)] #![omit_gdb_pretty_printer_section] diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs index 93be5288a640a..6d8ff2970ef14 100644 --- a/tests/debuginfo/lexical-scope-in-for-loop.rs +++ b/tests/debuginfo/lexical-scope-in-for-loop.rs @@ -45,40 +45,40 @@ // FIRST ITERATION // lldb-command:print x -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldbg-check:[...]$2 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = -2 +// lldbg-check:[...] -2 // lldbr-check:(i32) x = -2 // lldb-command:continue // THIRD ITERATION // lldb-command:print x -// lldbg-check:[...]$4 = 3 +// lldbg-check:[...] 3 // lldbr-check:(i32) x = 3 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = -3 +// lldbg-check:[...] -3 // lldbr-check:(i32) x = -3 // lldb-command:continue // AFTER LOOP // lldb-command:print x -// lldbg-check:[...]$6 = 1000000 +// lldbg-check:[...] 1000000 // lldbr-check:(i32) x = 1000000 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs index 88b4244a503ea..3e473acbda25e 100644 --- a/tests/debuginfo/lexical-scope-in-if.rs +++ b/tests/debuginfo/lexical-scope-in-if.rs @@ -69,73 +69,73 @@ // BEFORE if // lldb-command:print x -// lldbg-check:[...]$0 = 999 +// lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 // lldb-command:print y -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AT BEGINNING of 'then' block // lldb-command:print x -// lldbg-check:[...]$2 = 999 +// lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 // lldb-command:print y -// lldbg-check:[...]$3 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 1st redeclaration of 'x' // lldb-command:print x -// lldbg-check:[...]$4 = 1001 +// lldbg-check:[...] 1001 // lldbr-check:(i32) x = 1001 // lldb-command:print y -// lldbg-check:[...]$5 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 2st redeclaration of 'x' // lldb-command:print x -// lldbg-check:[...]$6 = 1002 +// lldbg-check:[...] 1002 // lldbr-check:(i32) x = 1002 // lldb-command:print y -// lldbg-check:[...]$7 = 1003 +// lldbg-check:[...] 1003 // lldbr-check:(i32) y = 1003 // lldb-command:continue // AFTER 1st if expression // lldb-command:print x -// lldbg-check:[...]$8 = 999 +// lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 // lldb-command:print y -// lldbg-check:[...]$9 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldbg-check:[...]$10 = 999 +// lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 // lldb-command:print y -// lldbg-check:[...]$11 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldbg-check:[...]$12 = 1004 +// lldbg-check:[...] 1004 // lldbr-check:(i32) x = 1004 // lldb-command:print y -// lldbg-check:[...]$13 = 1005 +// lldbg-check:[...] 1005 // lldbr-check:(i32) y = 1005 // lldb-command:continue // BEGINNING of else branch // lldb-command:print x -// lldbg-check:[...]$14 = 999 +// lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 // lldb-command:print y -// lldbg-check:[...]$15 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs index 8a9ecfad249ed..0959f020ca315 100644 --- a/tests/debuginfo/lexical-scope-in-match.rs +++ b/tests/debuginfo/lexical-scope-in-match.rs @@ -64,72 +64,72 @@ // lldb-command:run // lldb-command:print shadowed -// lldbg-check:[...]$0 = 231 +// lldbg-check:[...] 231 // lldbr-check:(i32) shadowed = 231 // lldb-command:print not_shadowed -// lldbg-check:[...]$1 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$2 = 233 +// lldbg-check:[...] 233 // lldbr-check:(i32) shadowed = 233 // lldb-command:print not_shadowed -// lldbg-check:[...]$3 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:print local_to_arm -// lldbg-check:[...]$4 = 234 +// lldbg-check:[...] 234 // lldbr-check:(i32) local_to_arm = 234 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$5 = 236 +// lldbg-check:[...] 236 // lldbr-check:(i32) shadowed = 236 // lldb-command:print not_shadowed -// lldbg-check:[...]$6 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$7 = 237 +// lldbg-check:[...] 237 // lldbr-check:(isize) shadowed = 237 // lldb-command:print not_shadowed -// lldbg-check:[...]$8 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:print local_to_arm -// lldbg-check:[...]$9 = 238 +// lldbg-check:[...] 238 // lldbr-check:(isize) local_to_arm = 238 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$10 = 239 +// lldbg-check:[...] 239 // lldbr-check:(isize) shadowed = 239 // lldb-command:print not_shadowed -// lldbg-check:[...]$11 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$12 = 241 +// lldbg-check:[...] 241 // lldbr-check:(isize) shadowed = 241 // lldb-command:print not_shadowed -// lldbg-check:[...]$13 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$14 = 243 +// lldbg-check:[...] 243 // lldbr-check:(i32) shadowed = 243 // lldb-command:print *local_to_arm -// lldbg-check:[...]$15 = 244 +// lldbg-check:[...] 244 // lldbr-check:(i32) *local_to_arm = 244 // lldb-command:continue // lldb-command:print shadowed -// lldbg-check:[...]$16 = 231 +// lldbg-check:[...] 231 // lldbr-check:(i32) shadowed = 231 // lldb-command:print not_shadowed -// lldbg-check:[...]$17 = 232 +// lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs index eeafed9f4db12..4d26b2f5c9abe 100644 --- a/tests/debuginfo/lexical-scope-in-stack-closure.rs +++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs @@ -36,32 +36,32 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 1000 +// lldbg-check:[...] 1000 // lldbr-check:(isize) x = 1000 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f64) x = 2.5 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = true +// lldbg-check:[...] true // lldbr-check:(bool) x = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs index ec998975bc7c5..cf908b1a510a3 100644 --- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -68,69 +68,69 @@ // FIRST ITERATION // lldb-command:print x -// lldbg-check:[...]$0 = 0 +// lldbg-check:[...] 0 // lldbr-check:(i32) x = 0 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = -987 +// lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$7 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$8 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$9 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$10 = -987 +// lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$11 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$12 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs index 9376d0391875d..df8c2598e384c 100644 --- a/tests/debuginfo/lexical-scope-in-unique-closure.rs +++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs @@ -36,32 +36,32 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 1000 +// lldbg-check:[...] 1000 // lldbr-check:(isize) x = 1000 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f64) x = 2.5 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = true +// lldbg-check:[...] true // lldbr-check:(bool) x = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs index f70ef9c2dd17b..98c580e479c1a 100644 --- a/tests/debuginfo/lexical-scope-in-while.rs +++ b/tests/debuginfo/lexical-scope-in-while.rs @@ -68,69 +68,69 @@ // FIRST ITERATION // lldb-command:print x -// lldbg-check:[...]$0 = 0 +// lldbg-check:[...] 0 // lldbr-check:(i32) x = 0 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = -987 +// lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = 101 +// lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION // lldb-command:print x -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$7 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$8 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$9 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$10 = -987 +// lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$11 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$12 = 2 +// lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs index 400dde6af313b..a38aba8b16ab7 100644 --- a/tests/debuginfo/lexical-scope-with-macro.rs +++ b/tests/debuginfo/lexical-scope-with-macro.rs @@ -57,56 +57,56 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:[...]$0 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) a = 10 // lldb-command:print b -// lldbg-check:[...]$1 = 34 +// lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$2 = 890242 +// lldbg-check:[...] 890242 // lldbr-check:(i32) a = 10 // lldb-command:print b -// lldbg-check:[...]$3 = 34 +// lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$4 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) a = 10 // lldb-command:print b -// lldbg-check:[...]$5 = 34 +// lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue // lldb-command:print a -// lldbg-check:[...]$6 = 102 +// lldbg-check:[...] 102 // lldbr-check:(i32) a = 10 // lldb-command:print b -// lldbg-check:[...]$7 = 34 +// lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // 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-check:[...] 110 // lldbg-command:print b -// lldbg-check:[...]$9 = 34 +// lldbg-check:[...] 34 // lldbg-command:continue // lldbg-command:print a -// lldbg-check:[...]$10 = 10 +// lldbg-check:[...] 10 // lldbg-command:print b -// lldbg-check:[...]$11 = 34 +// lldbg-check:[...] 34 // lldbg-command:continue // lldbg-command:print a -// lldbg-check:[...]$12 = 10 +// lldbg-check:[...] 10 // lldbg-command:print b -// lldbg-check:[...]$13 = 34 +// lldbg-check:[...] 34 // lldbg-command:print c -// lldbg-check:[...]$14 = 400 +// lldbg-check:[...] 400 // lldbg-command:continue diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs index 09cb81424747f..5a82dc6e3f350 100644 --- a/tests/debuginfo/lexical-scopes-in-block-expression.rs +++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs @@ -195,202 +195,202 @@ // STRUCT EXPRESSION // lldb-command:print val -// lldbg-check:[...]$0 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$1 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$2 = 11 +// lldbg-check:[...] 11 // lldbr-check:(isize) val = 11 // lldb-command:print ten -// lldbg-check:[...]$3 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$4 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$5 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // FUNCTION CALL // lldb-command:print val -// lldbg-check:[...]$6 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$7 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$8 = 12 +// lldbg-check:[...] 12 // lldbr-check:(isize) val = 12 // lldb-command:print ten -// lldbg-check:[...]$9 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$10 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$11 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // TUPLE EXPRESSION // lldb-command:print val -// lldbg-check:[...]$12 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$13 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$14 = 13 +// lldbg-check:[...] 13 // lldbr-check:(isize) val = 13 // lldb-command:print ten -// lldbg-check:[...]$15 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$16 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$17 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // VEC EXPRESSION // lldb-command:print val -// lldbg-check:[...]$18 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$19 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$20 = 14 +// lldbg-check:[...] 14 // lldbr-check:(isize) val = 14 // lldb-command:print ten -// lldbg-check:[...]$21 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$22 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$23 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // REPEAT VEC EXPRESSION // lldb-command:print val -// lldbg-check:[...]$24 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$25 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$26 = 15 +// lldbg-check:[...] 15 // lldbr-check:(isize) val = 15 // lldb-command:print ten -// lldbg-check:[...]$27 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$28 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$29 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // ASSIGNMENT EXPRESSION // lldb-command:print val -// lldbg-check:[...]$30 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$31 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$32 = 16 +// lldbg-check:[...] 16 // lldbr-check:(isize) val = 16 // lldb-command:print ten -// lldbg-check:[...]$33 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$34 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$35 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // ARITHMETIC EXPRESSION // lldb-command:print val -// lldbg-check:[...]$36 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$37 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$38 = 17 +// lldbg-check:[...] 17 // lldbr-check:(isize) val = 17 // lldb-command:print ten -// lldbg-check:[...]$39 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$40 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$41 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // INDEX EXPRESSION // lldb-command:print val -// lldbg-check:[...]$42 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$43 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$44 = 18 +// lldbg-check:[...] 18 // lldbr-check:(isize) val = 18 // lldb-command:print ten -// lldbg-check:[...]$45 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // lldb-command:print val -// lldbg-check:[...]$46 = -1 +// lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 // lldb-command:print ten -// lldbg-check:[...]$47 = 10 +// lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue diff --git a/tests/debuginfo/macro-stepping.rs b/tests/debuginfo/macro-stepping.rs index 69cabd92298c9..71ff9798079fa 100644 --- a/tests/debuginfo/macro-stepping.rs +++ b/tests/debuginfo/macro-stepping.rs @@ -56,36 +56,36 @@ extern crate macro_stepping; // exports new_scope!() // lldb-command:run // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc1[...] +// lldb-check:[...] #loc1 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc2[...] +// lldb-check:[...] #loc2 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc3[...] +// lldb-check:[...] #loc3 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc4[...] +// lldb-check:[...] #loc4 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#loc5[...] +// lldb-check:[...] #loc5 [...] // lldb-command:continue // lldb-command:step // lldb-command:frame select -// lldb-check:[...]#inc-loc1[...] +// lldb-check:[...] #inc-loc1 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#inc-loc2[...] +// lldb-check:[...] #inc-loc2 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#inc-loc1[...] +// lldb-check:[...] #inc-loc1 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#inc-loc2[...] +// lldb-check:[...] #inc-loc2 [...] // lldb-command:next // lldb-command:frame select -// lldb-check:[...]#inc-loc3[...] +// lldb-check:[...] #inc-loc3 [...] macro_rules! foo { () => { diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs index 454967c6cb71b..f947ba350e7f9 100644 --- a/tests/debuginfo/method-on-enum.rs +++ b/tests/debuginfo/method-on-enum.rs @@ -64,47 +64,47 @@ // STACK BY REF // lldb-command:print *self -// lldb-check:[...]$0 = Variant2(117901063) +// lldb-check:[...] Variant2(117901063) // lldb-command:print arg1 -// lldb-check:[...]$1 = -1 +// lldb-check:[...] -1 // lldb-command:print arg2 -// lldb-check:[...]$2 = -2 +// lldb-check:[...] -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldb-check:[...]$3 = Variant2(117901063) +// lldb-check:[...] Variant2(117901063) // lldb-command:print arg1 -// lldb-check:[...]$4 = -3 +// lldb-check:[...] -3 // lldb-command:print arg2 -// lldb-check:[...]$5 = -4 +// lldb-check:[...] -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldb-check:[...]$6 = Variant1 { x: 1799, y: 1799 } +// lldb-check:[...] Variant1 { x: 1799, y: 1799 } // lldb-command:print arg1 -// lldb-check:[...]$7 = -5 +// lldb-check:[...] -5 // lldb-command:print arg2 -// lldb-check:[...]$8 = -6 +// lldb-check:[...] -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldb-check:[...]$9 = Variant1 { x: 1799, y: 1799 } +// lldb-check:[...] Variant1 { x: 1799, y: 1799 } // lldb-command:print arg1 -// lldb-check:[...]$10 = -7 +// lldb-check:[...] -7 // lldb-command:print arg2 -// lldb-check:[...]$11 = -8 +// lldb-check:[...] -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldb-check:[...]$12 = Variant1 { x: 1799, y: 1799 } +// lldb-check:[...] Variant1 { x: 1799, y: 1799 } // lldb-command:print arg1 -// lldb-check:[...]$13 = -9 +// lldb-check:[...] -9 // lldb-command:print arg2 -// lldb-check:[...]$14 = -10 +// lldb-check:[...] -10 // lldb-command:continue #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs index 562798c27daa8..16793fb9bc658 100644 --- a/tests/debuginfo/method-on-generic-struct.rs +++ b/tests/debuginfo/method-on-generic-struct.rs @@ -65,61 +65,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...] Struct<(u32, i32)> { x: (8888, -8888) } // lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = -2 +// lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldbg-check:[...] Struct<(u32, i32)> { x: (8888, -8888) } // lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) self = { x = { = 8888 = -8888 } } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = Struct { x: 1234.5 } +// lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = Struct { x: 1234.5 } +// lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = Struct { x: 1234.5 } +// lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10 +// lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs index bb94ced305d63..56bcb462cb36f 100644 --- a/tests/debuginfo/method-on-struct.rs +++ b/tests/debuginfo/method-on-struct.rs @@ -63,61 +63,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 100 } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = -2 +// lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_struct::Struct) self = Struct { x: 100 } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10 +// lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs index bc8def40105c7..0264ff68d1b02 100644 --- a/tests/debuginfo/method-on-trait.rs +++ b/tests/debuginfo/method-on-trait.rs @@ -63,61 +63,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_trait::Struct) *self = { x = 100 } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = -2 +// lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_trait::Struct) self = { x = 100 } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) *self = { x = 200 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) self = { x = 200 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) *self = { x = 200 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10 +// lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs index 7ac0a2d857483..872f6ea57c213 100644 --- a/tests/debuginfo/method-on-tuple-struct.rs +++ b/tests/debuginfo/method-on-tuple-struct.rs @@ -63,61 +63,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { 0 = 100 1 = -100.5 } +// lldbg-check:[...] { 0 = 100 1 = -100.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 100 1 = -100.5 } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = -2 +// lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { 0 = 100 1 = -100.5 } +// lldbg-check:[...] { 0 = 100 1 = -100.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 100 1 = -100.5 } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { 0 = 200 1 = -200.5 } +// lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { 0 = 200 1 = -200.5 } +// lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 200 1 = -200.5 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { 0 = 200 1 = -200.5 } +// lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10 +// lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs index b2ad1d3cd95c5..42aa25c14212f 100644 --- a/tests/debuginfo/multi-cgu.rs +++ b/tests/debuginfo/multi-cgu.rs @@ -24,12 +24,12 @@ // lldb-command:run // lldb-command:print xxx -// lldbg-check:[...]$0 = 12345 +// lldbg-check:[...] 12345 // lldbr-check:(u32) xxx = 12345 // lldb-command:continue // lldb-command:print yyy -// lldbg-check:[...]$1 = 67890 +// lldbg-check:[...] 67890 // lldbr-check:(u64) yyy = 67890 // lldb-command:continue diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs index 08446997b424e..113eac29256bd 100644 --- a/tests/debuginfo/multiple-functions-equal-var-names.rs +++ b/tests/debuginfo/multiple-functions-equal-var-names.rs @@ -23,17 +23,17 @@ // lldb-command:run // lldb-command:print abc -// lldbg-check:[...]$0 = 10101 +// lldbg-check:[...] 10101 // lldbr-check:(i32) abc = 10101 // lldb-command:continue // lldb-command:print abc -// lldbg-check:[...]$1 = 20202 +// lldbg-check:[...] 20202 // lldbr-check:(i32) abc = 20202 // lldb-command:continue // lldb-command:print abc -// lldbg-check:[...]$2 = 30303 +// lldbg-check:[...] 30303 // lldbr-check:(i32) abc = 30303 #![allow(unused_variables)] diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs index 2c4092fd5a33c..81fdc4f3d4033 100644 --- a/tests/debuginfo/multiple-functions.rs +++ b/tests/debuginfo/multiple-functions.rs @@ -23,17 +23,17 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:[...]$0 = 10101 +// lldbg-check:[...] 10101 // lldbr-check:(i32) a = 10101 // lldb-command:continue // lldb-command:print b -// lldbg-check:[...]$1 = 20202 +// lldbg-check:[...] 20202 // lldbr-check:(i32) b = 20202 // lldb-command:continue // lldb-command:print c -// lldbg-check:[...]$2 = 30303 +// lldbg-check:[...] 30303 // lldbr-check:(i32) c = 30303 #![allow(unused_variables)] diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs index e8860b2d1048e..42df966681062 100644 --- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs @@ -48,50 +48,50 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:print y -// lldbg-check:[...]$1 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:print y -// lldbg-check:[...]$3 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldbg-check:[...]$5 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$6 = true +// lldbg-check:[...] true // lldbr-check:(bool) x = true // lldb-command:print y -// lldbg-check:[...]$7 = 2220 +// lldbg-check:[...] 2220 // lldbr-check:(i32) y = 2220 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$8 = 203203.5 +// lldbg-check:[...] 203203.5 // lldbr-check:(f64) x = 203203.5 // lldb-command:print y -// lldbg-check:[...]$9 = 2220 +// lldbg-check:[...] 2220 // lldbr-check:(i32) y = 2220 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$10 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldbg-check:[...]$11 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/no_mangle-info.rs b/tests/debuginfo/no_mangle-info.rs index 15629d217ba76..9cb42656f2a44 100644 --- a/tests/debuginfo/no_mangle-info.rs +++ b/tests/debuginfo/no_mangle-info.rs @@ -11,9 +11,9 @@ // === LLDB TESTS ================================================================================== // lldb-command:run // lldb-command:p TEST -// lldb-check: (unsigned long) $0 = 3735928559 +// lldb-check: (unsigned long) 3735928559 // lldb-command:p OTHER_TEST -// lldb-check: (unsigned long) $1 = 42 +// lldb-check: (unsigned long) 42 // === CDB TESTS ================================================================================== // cdb-command: g diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index f662fa7ed5496..615f365173f53 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -203,42 +203,40 @@ // lldb-command:run // lldb-command:print/d nz_i8 -// lldb-check:[...]$0 = 11 { __0 = { 0 = 11 } } +// lldb-check:[...] 11 { __0 = { 0 = 11 } } // lldb-command:print nz_i16 -// lldb-check:[...]$1 = 22 { __0 = { 0 = 22 } } +// lldb-check:[...] 22 { __0 = { 0 = 22 } } // lldb-command:print nz_i32 -// lldb-check:[...]$2 = 33 { __0 = { 0 = 33 } } +// lldb-check:[...] 33 { __0 = { 0 = 33 } } // lldb-command:print nz_i64 -// lldb-check:[...]$3 = 44 { __0 = { 0 = 44 } } +// lldb-check:[...] 44 { __0 = { 0 = 44 } } // lldb-command:print nz_i128 -// lldb-check:[...]$4 = 55 { __0 = { 0 = 55 } } +// lldb-check:[...] 55 { __0 = { 0 = 55 } } // lldb-command:print nz_isize -// FIXME: `lldb_lookup.summary_lookup` is never called for `NonZero` for some reason. -// // lldb-check:[...]$5 = 66 { __0 = { 0 = 66 } } +// lldb-check:[...] 66 { __0 = { 0 = 66 } } // lldb-command:print/d nz_u8 -// lldb-check:[...]$6 = 77 { __0 = { 0 = 77 } } +// lldb-check:[...] 77 { __0 = { 0 = 77 } } // lldb-command:print nz_u16 -// lldb-check:[...]$7 = 88 { __0 = { 0 = 88 } } +// lldb-check:[...] 88 { __0 = { 0 = 88 } } // lldb-command:print nz_u32 -// lldb-check:[...]$8 = 99 { __0 = { 0 = 99 } } +// lldb-check:[...] 99 { __0 = { 0 = 99 } } // lldb-command:print nz_u64 -// lldb-check:[...]$9 = 100 { __0 = { 0 = 100 } } +// lldb-check:[...] 100 { __0 = { 0 = 100 } } // lldb-command:print nz_u128 -// lldb-check:[...]$10 = 111 { __0 = { 0 = 111 } } +// lldb-check:[...] 111 { __0 = { 0 = 111 } } // lldb-command:print nz_usize -// FIXME: `lldb_lookup.summary_lookup` is never called for `NonZero` for some reason. -// // lldb-check:[...]$11 = 122 { __0 = { 0 = 122 } } +// lldb-check:[...] 122 { __0 = { 0 = 122 } } #![feature(generic_nonzero)] use std::num::*; diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs index b2a8aa1c29a0d..03646c99f6484 100644 --- a/tests/debuginfo/option-like-enum.rs +++ b/tests/debuginfo/option-like-enum.rs @@ -48,34 +48,34 @@ // lldb-command:run // lldb-command:print some -// lldb-check:[...]$0 = Some(&0x12345678) +// lldb-check:[...] Some(&0x12345678) // lldb-command:print none -// lldb-check:[...]$1 = None +// lldb-check:[...] None // lldb-command:print full -// lldb-check:[...]$2 = Full(454545, &0x87654321, 9988) +// lldb-check:[...] Full(454545, &0x87654321, 9988) // lldb-command:print empty -// lldb-check:[...]$3 = Empty +// lldb-check:[...] Empty // lldb-command:print droid -// lldb-check:[...]$4 = Droid { id: 675675, range: 10000001, internals: &0x43218765 } +// lldb-check:[...] Droid { id: 675675, range: 10000001, internals: &0x43218765 } // lldb-command:print void_droid -// lldb-check:[...]$5 = Void +// lldb-check:[...] Void // lldb-command:print some_str -// lldb-check:[...]$6 = Some("abc") +// lldb-check:[...] Some("abc") // lldb-command:print none_str -// lldb-check:[...]$7 = None +// lldb-check:[...] None // lldb-command:print nested_non_zero_yep -// lldb-check:[...]$8 = Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] }) +// lldb-check:[...] Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] }) // lldb-command:print nested_non_zero_nope -// lldb-check:[...]$9 = Nope +// lldb-check:[...] Nope #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs index 19788339efa9a..b1f237db81489 100644 --- a/tests/debuginfo/packed-struct-with-destructor.rs +++ b/tests/debuginfo/packed-struct-with-destructor.rs @@ -45,35 +45,35 @@ // lldb-command:run // lldb-command:print packed -// lldbg-check:[...]$0 = { x = 123 y = 234 z = 345 } +// lldbg-check:[...] { x = 123 y = 234 z = 345 } // lldbr-check:(packed_struct_with_destructor::Packed) packed = { x = 123 y = 234 z = 345 } // lldb-command:print packedInPacked -// lldbg-check:[...]$1 = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } +// lldbg-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldbr-check:(packed_struct_with_destructor::PackedInPacked) packedInPacked = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldb-command:print packedInUnpacked -// lldbg-check:[...]$2 = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } +// lldbg-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldbr-check:(packed_struct_with_destructor::PackedInUnpacked) packedInUnpacked = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldb-command:print unpackedInPacked -// lldbg-check:[...]$3 = { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } +// lldbg-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } // lldbr-check:(packed_struct_with_destructor::UnpackedInPacked) unpackedInPacked = { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } // lldb-command:print packedInPackedWithDrop -// lldbg-check:[...]$4 = { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } +// lldbg-check:[...] { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } // lldbr-check:(packed_struct_with_destructor::PackedInPackedWithDrop) packedInPackedWithDrop = { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } // lldb-command:print packedInUnpackedWithDrop -// lldbg-check:[...]$5 = { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } +// lldbg-check:[...] { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } // lldbr-check:(packed_struct_with_destructor::PackedInUnpackedWithDrop) packedInUnpackedWithDrop = { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } // lldb-command:print unpackedInPackedWithDrop -// lldbg-check:[...]$6 = { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } +// lldbg-check:[...] { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } // lldbr-check:(packed_struct_with_destructor::UnpackedInPackedWithDrop) unpackedInPackedWithDrop = { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } // lldb-command:print deeplyNested -// lldbg-check:[...]$7 = { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } +// lldbg-check:[...] { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } // lldbr-check:(packed_struct_with_destructor::DeeplyNested) deeplyNested = { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index 0276a0ffb082a..b61da04124361 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -35,27 +35,27 @@ // lldb-command:run // lldb-command:print packed -// lldbg-check:[...]$0 = { x = 123 y = 234 z = 345 } +// lldbg-check:[...] { x = 123 y = 234 z = 345 } // lldbr-check:(packed_struct::Packed) packed = { x = 123 y = 234 z = 345 } // lldb-command:print packedInPacked -// lldbg-check:[...]$1 = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } +// lldbg-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldbr-check:(packed_struct::PackedInPacked) packedInPacked = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldb-command:print packedInUnpacked -// lldbg-check:[...]$2 = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } +// lldbg-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldbr-check:(packed_struct::PackedInUnpacked) packedInUnpacked = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldb-command:print unpackedInPacked -// lldbg-check:[...]$3 = { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } +// lldbg-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } // lldbr-check:(packed_struct::UnpackedInPacked) unpackedInPacked = { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } // lldb-command:print sizeof(packed) -// lldbg-check:[...]$4 = 14 +// lldbg-check:[...] 14 // lldbr-check:(usize) = 14 // lldb-command:print sizeof(packedInPacked) -// lldbg-check:[...]$5 = 40 +// lldbg-check:[...] 40 // lldbr-check:(usize) = 40 #![allow(unused_variables)] diff --git a/tests/debuginfo/pretty-slices.rs b/tests/debuginfo/pretty-slices.rs index 4faa317d6a19a..4507453a10704 100644 --- a/tests/debuginfo/pretty-slices.rs +++ b/tests/debuginfo/pretty-slices.rs @@ -21,16 +21,16 @@ // lldb-command: run // lldb-command: print slice -// lldb-check: (&[i32]) $0 = size=3 { [0] = 0 [1] = 1 [2] = 2 } +// lldb-check: (&[i32]) size=3 { [0] = 0 [1] = 1 [2] = 2 } // lldb-command: print mut_slice -// lldb-check: (&mut [i32]) $1 = size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } +// lldb-check: (&mut [i32]) size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } // lldb-command: print str_slice -// lldb-check: (&str) $2 = "string slice" { data_ptr = [...] length = 12 } +// lldb-check: (&str) "string slice" { data_ptr = [...] length = 12 } // lldb-command: print mut_str_slice -// lldb-check: (&mut str) $3 = "mutable string slice" { data_ptr = [...] length = 20 } +// lldb-check: (&mut str) "mutable string slice" { data_ptr = [...] length = 20 } fn b() {} diff --git a/tests/debuginfo/pretty-std-collections.rs b/tests/debuginfo/pretty-std-collections.rs index 6e7c8dfbbe826..903a9f9a27278 100644 --- a/tests/debuginfo/pretty-std-collections.rs +++ b/tests/debuginfo/pretty-std-collections.rs @@ -59,19 +59,19 @@ // lldb-command:run // lldb-command:print vec_deque -// lldbg-check:[...]$0 = size=3 { [0] = 5 [1] = 3 [2] = 7 } +// lldbg-check:[...] size=3 { [0] = 5 [1] = 3 [2] = 7 } // lldbr-check:(alloc::collections::vec_deque::VecDeque) vec_deque = size=3 = { [0] = 5 [1] = 3 [2] = 7 } // lldb-command:print vec_deque2 -// lldbg-check:[...]$1 = size=7 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } +// lldbg-check:[...] size=7 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } // lldbr-check:(alloc::collections::vec_deque::VecDeque) vec_deque2 = size=7 = { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } // lldb-command:print hash_map -// lldbg-check:[...]$2 = size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } +// lldbg-check:[...] size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } // lldbr-check:(std::collections::hash::map::HashMap) hash_map = size=4 size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } // lldb-command:print hash_set -// lldbg-check:[...]$3 = size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } +// lldbg-check:[...] size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } // lldbr-check:(std::collections::hash::set::HashSet) hash_set = size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } #![allow(unused_variables)] diff --git a/tests/debuginfo/pretty-std.rs b/tests/debuginfo/pretty-std.rs index 2c2795379c937..74eba9af78614 100644 --- a/tests/debuginfo/pretty-std.rs +++ b/tests/debuginfo/pretty-std.rs @@ -45,25 +45,25 @@ // lldb-command: run // lldb-command: print slice -// lldb-check:[...]$0 = &[0, 1, 2, 3] +// lldb-check:[...] &[0, 1, 2, 3] // lldb-command: print vec -// lldb-check:[...]$1 = vec![4, 5, 6, 7] +// lldb-check:[...] vec![4, 5, 6, 7] // lldb-command: print str_slice -// lldb-check:[...]$2 = "IAMA string slice!" +// lldb-check:[...] "IAMA string slice!" // lldb-command: print string -// lldb-check:[...]$3 = "IAMA string!" +// lldb-check:[...] "IAMA string!" // lldb-command: print some -// lldb-check:[...]$4 = Some(8) +// lldb-check:[...] Some(8) // lldb-command: print none -// lldb-check:[...]$5 = None +// lldb-check:[...] None // lldb-command: print os_string -// lldb-check:[...]$6 = "IAMA OS string 😃"[...] +// lldb-check:[...] "IAMA OS string 😃"[...] // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/rc_arc.rs b/tests/debuginfo/rc_arc.rs index 3cf6635a173b7..e340fe85e1d81 100644 --- a/tests/debuginfo/rc_arc.rs +++ b/tests/debuginfo/rc_arc.rs @@ -18,9 +18,9 @@ // lldb-command:run // lldb-command:print rc -// lldb-check:[...]$0 = strong=11, weak=1 { value = 111 } +// lldb-check:[...] strong=11, weak=1 { value = 111 } // lldb-command:print arc -// lldb-check:[...]$1 = strong=21, weak=1 { data = 222 } +// lldb-check:[...] strong=21, weak=1 { data = 222 } // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs index 1051cc7113c46..b1a6aef50cb9d 100644 --- a/tests/debuginfo/reference-debuginfo.rs +++ b/tests/debuginfo/reference-debuginfo.rs @@ -60,11 +60,11 @@ // lldb-command:run // lldb-command:print *bool_ref -// lldbg-check:[...]$0 = true +// lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true // lldb-command:print *int_ref -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 // NOTE: only rust-enabled lldb supports 32bit chars @@ -72,51 +72,51 @@ // lldbr-check:(char) *char_ref = 'a' // lldb-command:print *i8_ref -// lldbg-check:[...]$2 = 'D' +// lldbg-check:[...] 'D' // lldbr-check:(i8) *i8_ref = 68 // lldb-command:print *i16_ref -// lldbg-check:[...]$3 = -16 +// lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 // lldb-command:print *i32_ref -// lldbg-check:[...]$4 = -32 +// lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 // lldb-command:print *i64_ref -// lldbg-check:[...]$5 = -64 +// lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 // lldb-command:print *uint_ref -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 // lldb-command:print *u8_ref -// lldbg-check:[...]$7 = 'd' +// lldbg-check:[...] 'd' // lldbr-check:(u8) *u8_ref = 100 // lldb-command:print *u16_ref -// lldbg-check:[...]$8 = 16 +// lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 // lldb-command:print *u32_ref -// lldbg-check:[...]$9 = 32 +// lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 // lldb-command:print *u64_ref -// lldbg-check:[...]$10 = 64 +// lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 // lldb-command:print *f32_ref -// lldbg-check:[...]$11 = 2.5 +// lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 // lldb-command:print *f64_ref -// lldbg-check:[...]$12 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 // lldb-command:print *f64_double_ref -// lldbg-check:[...]$13 = 3.5 +// lldbg-check:[...] 3.5 // lldbr-check:(f64) **f64_double_ref = 3.5 #![allow(unused_variables)] diff --git a/tests/debuginfo/regression-bad-location-list-67992.rs b/tests/debuginfo/regression-bad-location-list-67992.rs index c397b403026d6..df1e9fb26fcea 100644 --- a/tests/debuginfo/regression-bad-location-list-67992.rs +++ b/tests/debuginfo/regression-bad-location-list-67992.rs @@ -11,7 +11,7 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:(regression_bad_location_list_67992::Foo) $0 = [...] +// lldbg-check:(regression_bad_location_list_67992::Foo) [...] // lldbr-check:(regression_bad_location_list_67992::Foo) a = [...] const ARRAY_SIZE: usize = 1024; diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs index eae1d58c12447..9a4ecee4bf6d3 100644 --- a/tests/debuginfo/self-in-default-method.rs +++ b/tests/debuginfo/self-in-default-method.rs @@ -63,61 +63,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 100 } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = -2 +// lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { x = 100 } +// lldbg-check:[...] { x = 100 } // lldbr-check:(self_in_default_method::Struct) self = Struct { x: 100 } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { x = 200 } +// lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10 +// lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs index 92be253e18aba..a21280620b5f3 100644 --- a/tests/debuginfo/self-in-generic-default-method.rs +++ b/tests/debuginfo/self-in-generic-default-method.rs @@ -63,61 +63,61 @@ // STACK BY REF // lldb-command:print *self -// lldbg-check:[...]$0 = { x = 987 } +// lldbg-check:[...] { x = 987 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 987 } // lldb-command:print arg1 -// lldbg-check:[...]$1 = -1 +// lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 // lldb-command:print arg2 -// lldbg-check:[...]$2 = 2 +// lldbg-check:[...] 2 // lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL // lldb-command:print self -// lldbg-check:[...]$3 = { x = 987 } +// lldbg-check:[...] { x = 987 } // lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 987 } // lldb-command:print arg1 -// lldbg-check:[...]$4 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$5 = -4 +// lldbg-check:[...] -4 // lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF // lldb-command:print *self -// lldbg-check:[...]$6 = { x = 879 } +// lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } // lldb-command:print arg1 -// lldbg-check:[...]$7 = -5 +// lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 // lldb-command:print arg2 -// lldbg-check:[...]$8 = -6 +// lldbg-check:[...] -6 // lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL // lldb-command:print self -// lldbg-check:[...]$9 = { x = 879 } +// lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 879 } // lldb-command:print arg1 -// lldbg-check:[...]$10 = -7 +// lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 // lldb-command:print arg2 -// lldbg-check:[...]$11 = -8 +// lldbg-check:[...] -8 // lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED // lldb-command:print *self -// lldbg-check:[...]$12 = { x = 879 } +// lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } // lldb-command:print arg1 -// lldbg-check:[...]$13 = -9 +// lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 // lldb-command:print arg2 -// lldbg-check:[...]$14 = -10.5 +// lldbg-check:[...] -10.5 // lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs index 33f73340a832c..2be8cbbdfebe4 100644 --- a/tests/debuginfo/shadowed-argument.rs +++ b/tests/debuginfo/shadowed-argument.rs @@ -30,26 +30,26 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:print y -// lldbg-check:[...]$1 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:print y -// lldbg-check:[...]$3 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldbg-check:[...]$5 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs index 60c392b15cb08..66cadf2913bbd 100644 --- a/tests/debuginfo/shadowed-variable.rs +++ b/tests/debuginfo/shadowed-variable.rs @@ -40,42 +40,42 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:print y -// lldbg-check:[...]$1 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:print y -// lldbg-check:[...]$3 = true +// lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldbg-check:[...]$5 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$6 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:print y -// lldbg-check:[...]$7 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$8 = 11.5 +// lldbg-check:[...] 11.5 // lldbr-check:(f64) x = 11.5 // lldb-command:print y -// lldbg-check:[...]$9 = 20 +// lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/should-fail.rs b/tests/debuginfo/should-fail.rs index f3a8f52e0fa5a..4211baeee22d8 100644 --- a/tests/debuginfo/should-fail.rs +++ b/tests/debuginfo/should-fail.rs @@ -17,7 +17,7 @@ // lldb-command:run // lldb-command:print x -// lldb-check:[...]$0 = 5 +// lldb-check:[...] 5 // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs index f4be2035d3cba..dfcd701017ecb 100644 --- a/tests/debuginfo/simple-lexical-scope.rs +++ b/tests/debuginfo/simple-lexical-scope.rs @@ -40,37 +40,37 @@ // lldb-command:run // lldb-command:print x -// lldbg-check:[...]$0 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$1 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$2 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$3 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$4 = 10.5 +// lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$5 = 10 +// lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue // lldb-command:print x -// lldbg-check:[...]$6 = false +// lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs index 100763f60b6fe..89c0cb491bfdf 100644 --- a/tests/debuginfo/simple-struct.rs +++ b/tests/debuginfo/simple-struct.rs @@ -98,27 +98,27 @@ // lldb-command:run // lldb-command:print no_padding16 -// lldbg-check:[...]$0 = { x = 10000 y = -10001 } +// lldbg-check:[...] { x = 10000 y = -10001 } // lldbr-check:(simple_struct::NoPadding16) no_padding16 = { x = 10000 y = -10001 } // lldb-command:print no_padding32 -// lldbg-check:[...]$1 = { x = -10002 y = -10003.5 z = 10004 } +// lldbg-check:[...] { x = -10002 y = -10003.5 z = 10004 } // lldbr-check:(simple_struct::NoPadding32) no_padding32 = { x = -10002 y = -10003.5 z = 10004 } // lldb-command:print no_padding64 -// lldbg-check:[...]$2 = { x = -10005.5 y = 10006 z = 10007 } +// lldbg-check:[...] { x = -10005.5 y = 10006 z = 10007 } // lldbr-check:(simple_struct::NoPadding64) no_padding64 = { x = -10005.5 y = 10006 z = 10007 } // lldb-command:print no_padding163264 -// lldbg-check:[...]$3 = { a = -10008 b = 10009 c = 10010 d = 10011 } +// lldbg-check:[...] { a = -10008 b = 10009 c = 10010 d = 10011 } // lldbr-check:(simple_struct::NoPadding163264) no_padding163264 = { a = -10008 b = 10009 c = 10010 d = 10011 } // lldb-command:print internal_padding -// lldbg-check:[...]$4 = { x = 10012 y = -10013 } +// lldbg-check:[...] { x = 10012 y = -10013 } // lldbr-check:(simple_struct::InternalPadding) internal_padding = { x = 10012 y = -10013 } // lldb-command:print padding_at_end -// lldbg-check:[...]$5 = { x = -10014 y = 10015 } +// lldbg-check:[...] { x = -10014 y = 10015 } // lldbr-check:(simple_struct::PaddingAtEnd) padding_at_end = { x = -10014 y = 10015 } #![allow(unused_variables)] diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs index 2d8905a77bf7f..93f56d117ad84 100644 --- a/tests/debuginfo/simple-tuple.rs +++ b/tests/debuginfo/simple-tuple.rs @@ -100,27 +100,27 @@ // lldb-command:run // lldb-command:print/d noPadding8 -// lldbg-check:[...]$0 = { 0 = -100 1 = 100 } +// lldbg-check:[...] { 0 = -100 1 = 100 } // lldbr-check:((i8, u8)) noPadding8 = { 0 = -100 1 = 100 } // lldb-command:print noPadding16 -// lldbg-check:[...]$1 = { 0 = 0 1 = 1 2 = 2 } +// lldbg-check:[...] { 0 = 0 1 = 1 2 = 2 } // lldbr-check:((i16, i16, u16)) noPadding16 = { 0 = 0 1 = 1 2 = 2 } // lldb-command:print noPadding32 -// lldbg-check:[...]$2 = { 0 = 3 1 = 4.5 2 = 5 } +// lldbg-check:[...] { 0 = 3 1 = 4.5 2 = 5 } // lldbr-check:((i32, f32, u32)) noPadding32 = { 0 = 3 1 = 4.5 2 = 5 } // lldb-command:print noPadding64 -// lldbg-check:[...]$3 = { 0 = 6 1 = 7.5 2 = 8 } +// lldbg-check:[...] { 0 = 6 1 = 7.5 2 = 8 } // lldbr-check:((i64, f64, u64)) noPadding64 = { 0 = 6 1 = 7.5 2 = 8 } // lldb-command:print internalPadding1 -// lldbg-check:[...]$4 = { 0 = 9 1 = 10 } +// lldbg-check:[...] { 0 = 9 1 = 10 } // lldbr-check:((i16, i32)) internalPadding1 = { 0 = 9 1 = 10 } // lldb-command:print internalPadding2 -// lldbg-check:[...]$5 = { 0 = 11 1 = 12 2 = 13 3 = 14 } +// lldbg-check:[...] { 0 = 11 1 = 12 2 = 13 3 = 14 } // lldbr-check:((i16, i32, u32, u64)) internalPadding2 = { 0 = 11 1 = 12 2 = 13 3 = 14 } // lldb-command:print paddingAtEnd -// lldbg-check:[...]$6 = { 0 = 15 1 = 16 } +// lldbg-check:[...] { 0 = 15 1 = 16 } // lldbr-check:((i32, i16)) paddingAtEnd = { 0 = 15 1 = 16 } diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs index ad078122ddebe..23384e0c33a7d 100644 --- a/tests/debuginfo/static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/static-method-on-struct-and-enum.rs @@ -29,22 +29,22 @@ // STRUCT // lldb-command:print arg1 -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) arg1 = 1 // lldb-command:print arg2 -// lldbg-check:[...]$1 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) arg2 = 2 // lldb-command:continue // ENUM // lldb-command:print arg1 -// lldbg-check:[...]$2 = -3 +// lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 // lldb-command:print arg2 -// lldbg-check:[...]$3 = 4.5 +// lldbg-check:[...] 4.5 // lldbr-check:(f64) arg2 = 4.5 // lldb-command:print arg3 -// lldbg-check:[...]$4 = 5 +// lldbg-check:[...] 5 // lldbr-check:(usize) arg3 = 5 // lldb-command:continue diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs index c340f71a6cc4f..a91f24a3f5c89 100644 --- a/tests/debuginfo/struct-in-enum.rs +++ b/tests/debuginfo/struct-in-enum.rs @@ -27,12 +27,12 @@ // lldb-command:run // lldb-command:print case1 -// lldb-check:[...]$0 = Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }) +// lldb-check:[...] Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }) // lldb-command:print case2 -// lldb-check:[...]$1 = Case2(0, 1229782938247303441, 4369) +// lldb-check:[...] Case2(0, 1229782938247303441, 4369) // lldb-command:print univariant -// lldb-check:[...]$2 = TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) +// lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs index 287564a36cd3f..e88d955b6e970 100644 --- a/tests/debuginfo/struct-in-struct.rs +++ b/tests/debuginfo/struct-in-struct.rs @@ -24,35 +24,35 @@ // lldb-command:run // lldb-command:print three_simple_structs -// lldbg-check:[...]$0 = { x = { x = 1 } y = { x = 2 } z = { x = 3 } } +// lldbg-check:[...] { x = { x = 1 } y = { x = 2 } z = { x = 3 } } // lldbr-check:(struct_in_struct::ThreeSimpleStructs) three_simple_structs = { x = { x = 1 } y = { x = 2 } z = { x = 3 } } // lldb-command:print internal_padding_parent -// lldbg-check:[...]$1 = { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } +// lldbg-check:[...] { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } // lldbr-check:(struct_in_struct::InternalPaddingParent) internal_padding_parent = { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } // lldb-command:print padding_at_end_parent -// lldbg-check:[...]$2 = { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } +// lldbg-check:[...] { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } // lldbr-check:(struct_in_struct::PaddingAtEndParent) padding_at_end_parent = { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } // lldb-command:print mixed -// lldbg-check:[...]$3 = { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } +// lldbg-check:[...] { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } // lldbr-check:(struct_in_struct::Mixed) mixed = { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } // lldb-command:print bag -// lldbg-check:[...]$4 = { x = { x = 22 } } +// lldbg-check:[...] { x = { x = 22 } } // lldbr-check:(struct_in_struct::Bag) bag = { x = { x = 22 } } // lldb-command:print bag_in_bag -// lldbg-check:[...]$5 = { x = { x = { x = 23 } } } +// lldbg-check:[...] { x = { x = { x = 23 } } } // lldbr-check:(struct_in_struct::BagInBag) bag_in_bag = { x = { x = { x = 23 } } } // lldb-command:print tjo -// lldbg-check:[...]$6 = { x = { x = { x = { x = 24 } } } } +// lldbg-check:[...] { x = { x = { x = { x = 24 } } } } // lldbr-check:(struct_in_struct::ThatsJustOverkill) tjo = { x = { x = { x = { x = 24 } } } } // lldb-command:print tree -// lldbg-check:[...]$7 = { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } +// lldbg-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } // lldbr-check:(struct_in_struct::Tree) tree = { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs index f9262a458d52b..d641a788a6fa6 100644 --- a/tests/debuginfo/struct-namespace.rs +++ b/tests/debuginfo/struct-namespace.rs @@ -6,17 +6,17 @@ // lldb-command:run // lldb-command:p struct1 -// lldbg-check:(struct_namespace::Struct1) $0 = [...] +// lldbg-check:(struct_namespace::Struct1)[...] // lldbr-check:(struct_namespace::Struct1) struct1 = Struct1 { a: 0, b: 1 } // lldb-command:p struct2 -// lldbg-check:(struct_namespace::Struct2) $1 = [...] +// lldbg-check:(struct_namespace::Struct2)[...] // lldbr-check:(struct_namespace::Struct2) struct2 = { = 2 } // lldb-command:p mod1_struct1 -// lldbg-check:(struct_namespace::mod1::Struct1) $2 = [...] +// lldbg-check:(struct_namespace::mod1::Struct1)[...] // lldbr-check:(struct_namespace::mod1::Struct1) mod1_struct1 = Struct1 { a: 3, b: 4 } // lldb-command:p mod1_struct2 -// lldbg-check:(struct_namespace::mod1::Struct2) $3 = [...] +// lldbg-check:(struct_namespace::mod1::Struct2)[...] // lldbr-check:(struct_namespace::mod1::Struct2) mod1_struct2 = { = 5 } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs index 9b81136e7a88f..d6686be662cd7 100644 --- a/tests/debuginfo/struct-with-destructor.rs +++ b/tests/debuginfo/struct-with-destructor.rs @@ -26,19 +26,19 @@ // lldb-command:run // lldb-command:print simple -// lldbg-check:[...]$0 = { x = 10 y = 20 } +// lldbg-check:[...] { x = 10 y = 20 } // lldbr-check:(struct_with_destructor::WithDestructor) simple = { x = 10 y = 20 } // lldb-command:print noDestructor -// lldbg-check:[...]$1 = { a = { x = 10 y = 20 } guard = -1 } +// lldbg-check:[...] { a = { x = 10 y = 20 } guard = -1 } // lldbr-check:(struct_with_destructor::NoDestructorGuarded) noDestructor = { a = { x = 10 y = 20 } guard = -1 } // lldb-command:print withDestructor -// lldbg-check:[...]$2 = { a = { x = 10 y = 20 } guard = -1 } +// lldbg-check:[...] { a = { x = 10 y = 20 } guard = -1 } // lldbr-check:(struct_with_destructor::WithDestructorGuarded) withDestructor = { a = { x = 10 y = 20 } guard = -1 } // lldb-command:print nested -// lldbg-check:[...]$3 = { a = { a = { x = 7890 y = 9870 } } } +// lldbg-check:[...] { a = { a = { x = 7890 y = 9870 } } } // lldbr-check:(struct_with_destructor::NestedOuter) nested = { a = { a = { x = 7890 y = 9870 } } } #![allow(unused_variables)] diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs index c1cfe64a52e96..b6b20cea9b629 100644 --- a/tests/debuginfo/tuple-in-tuple.rs +++ b/tests/debuginfo/tuple-in-tuple.rs @@ -36,27 +36,27 @@ // lldb-command:run // lldb-command:print no_padding1 -// lldbg-check:[...]$0 = { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } +// lldbg-check:[...] { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } // lldbr-check:(((u32, u32), u32, u32)) no_padding1 = { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } // lldb-command:print no_padding2 -// lldbg-check:[...]$1 = { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } +// lldbg-check:[...] { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } // lldbr-check:((u32, (u32, u32), u32)) no_padding2 = { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } // lldb-command:print no_padding3 -// lldbg-check:[...]$2 = { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } +// lldbg-check:[...] { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } // lldbr-check:((u32, u32, (u32, u32))) no_padding3 = { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } // lldb-command:print internal_padding1 -// lldbg-check:[...]$3 = { 0 = 12 1 = { 0 = 13 1 = 14 } } +// lldbg-check:[...] { 0 = 12 1 = { 0 = 13 1 = 14 } } // lldbr-check:((i16, (i32, i32))) internal_padding1 = { 0 = 12 1 = { 0 = 13 1 = 14 } } // lldb-command:print internal_padding2 -// lldbg-check:[...]$4 = { 0 = 15 1 = { 0 = 16 1 = 17 } } +// lldbg-check:[...] { 0 = 15 1 = { 0 = 16 1 = 17 } } // lldbr-check:((i16, (i16, i32))) internal_padding2 = { 0 = 15 1 = { 0 = 16 1 = 17 } } // lldb-command:print padding_at_end1 -// lldbg-check:[...]$5 = { 0 = 18 1 = { 0 = 19 1 = 20 } } +// lldbg-check:[...] { 0 = 18 1 = { 0 = 19 1 = 20 } } // lldbr-check:((i32, (i32, i16))) padding_at_end1 = { 0 = 18 1 = { 0 = 19 1 = 20 } } // lldb-command:print padding_at_end2 -// lldbg-check:[...]$6 = { 0 = { 0 = 21 1 = 22 } 1 = 23 } +// lldbg-check:[...] { 0 = { 0 = 21 1 = 22 } 1 = 23 } // lldbr-check:(((i32, i16), i32)) padding_at_end2 = { 0 = { 0 = 21 1 = 22 } 1 = 23 } diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs index 5eeb1a6eed4ec..e912f63a8b2d9 100644 --- a/tests/debuginfo/tuple-struct.rs +++ b/tests/debuginfo/tuple-struct.rs @@ -36,27 +36,27 @@ // lldb-command:run // lldb-command:print no_padding16 -// lldbg-check:[...]$0 = { 0 = 10000 1 = -10001 } +// lldbg-check:[...] { 0 = 10000 1 = -10001 } // lldbr-check:(tuple_struct::NoPadding16) no_padding16 = { 0 = 10000 1 = -10001 } // lldb-command:print no_padding32 -// lldbg-check:[...]$1 = { 0 = -10002 1 = -10003.5 2 = 10004 } +// lldbg-check:[...] { 0 = -10002 1 = -10003.5 2 = 10004 } // lldbr-check:(tuple_struct::NoPadding32) no_padding32 = { 0 = -10002 1 = -10003.5 2 = 10004 } // lldb-command:print no_padding64 -// lldbg-check:[...]$2 = { 0 = -10005.5 1 = 10006 2 = 10007 } +// lldbg-check:[...] { 0 = -10005.5 1 = 10006 2 = 10007 } // lldbr-check:(tuple_struct::NoPadding64) no_padding64 = { 0 = -10005.5 1 = 10006 2 = 10007 } // lldb-command:print no_padding163264 -// lldbg-check:[...]$3 = { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } +// lldbg-check:[...] { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } // lldbr-check:(tuple_struct::NoPadding163264) no_padding163264 = { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } // lldb-command:print internal_padding -// lldbg-check:[...]$4 = { 0 = 10012 1 = -10013 } +// lldbg-check:[...] { 0 = 10012 1 = -10013 } // lldbr-check:(tuple_struct::InternalPadding) internal_padding = { 0 = 10012 1 = -10013 } // lldb-command:print padding_at_end -// lldbg-check:[...]$5 = { 0 = -10014 1 = 10015 } +// lldbg-check:[...] { 0 = -10014 1 = 10015 } // lldbr-check:(tuple_struct::PaddingAtEnd) padding_at_end = { 0 = -10014 1 = 10015 } // This test case mainly makes sure that no field names are generated for tuple structs (as opposed diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs index aa57ebdc844c8..8df4c9dbf96a6 100644 --- a/tests/debuginfo/union-smoke.rs +++ b/tests/debuginfo/union-smoke.rs @@ -19,13 +19,13 @@ // lldb-command:run // lldb-command:print u -// lldbg-check:[...]$0 = { a = { 0 = '\x02' 1 = '\x02' } b = 514 } +// lldbg-check:[...] { a = { 0 = '\x02' 1 = '\x02' } b = 514 } // lldbr-check:(union_smoke::U) u = { a = { 0 = '\x02' 1 = '\x02' } 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 = { a = { 0 = '\x01' 1 = '\x01' } b = 257 } +// lldbg-check:[...] { a = { 0 = '\x01' 1 = '\x01' } b = 257 } #![allow(unused)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs index 75ab245e13e02..62cb87e4f994b 100644 --- a/tests/debuginfo/var-captured-in-nested-closure.rs +++ b/tests/debuginfo/var-captured-in-nested-closure.rs @@ -44,42 +44,42 @@ // lldb-command:run // lldb-command:print variable -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldbg-check:[...]$1 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldbg-check:[...]$2 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } // lldb-command:print *struct_ref -// lldbg-check:[...]$3 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } // lldb-command:print *owned -// lldbg-check:[...]$4 = 6 +// lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 // lldb-command:print closure_local -// lldbg-check:[...]$5 = 8 +// lldbg-check:[...] 8 // lldbr-check:(isize) closure_local = 8 // lldb-command:continue // lldb-command:print variable -// lldbg-check:[...]$6 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldbg-check:[...]$7 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldbg-check:[...]$8 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } // lldb-command:print *struct_ref -// lldbg-check:[...]$9 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } // lldb-command:print *owned -// lldbg-check:[...]$10 = 6 +// lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 // lldb-command:print closure_local -// lldbg-check:[...]$11 = 8 +// lldbg-check:[...] 8 // lldbr-check:(isize) closure_local = 8 // lldb-command:continue diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index b7992deef44cc..e2e154e91cb43 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -24,13 +24,13 @@ // lldb-command:run // lldb-command:print constant -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) constant = 1 // lldb-command:print a_struct -// lldbg-check:[...]$1 = { a = -2 b = 3.5 c = 4 } +// lldbg-check:[...] { a = -2 b = 3.5 c = 4 } // lldbr-check:(var_captured_in_sendable_closure::Struct) a_struct = { a = -2 b = 3.5 c = 4 } // lldb-command:print *owned -// lldbg-check:[...]$2 = 5 +// lldbg-check:[...] 5 // lldbr-check:(isize) *owned = 5 #![allow(unused_variables)] diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs index eb68b081a6d85..c704b53ef853a 100644 --- a/tests/debuginfo/var-captured-in-stack-closure.rs +++ b/tests/debuginfo/var-captured-in-stack-closure.rs @@ -40,37 +40,37 @@ // lldb-command:run // lldb-command:print variable -// lldbg-check:[...]$0 = 1 +// lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 // lldb-command:print constant -// lldbg-check:[...]$1 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldbg-check:[...]$2 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } // lldb-command:print *struct_ref -// lldbg-check:[...]$3 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } // lldb-command:print *owned -// lldbg-check:[...]$4 = 6 +// lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 // lldb-command:continue // lldb-command:print variable -// lldbg-check:[...]$5 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) variable = 2 // lldb-command:print constant -// lldbg-check:[...]$6 = 2 +// lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 // lldb-command:print a_struct -// lldbg-check:[...]$7 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } // lldb-command:print *struct_ref -// lldbg-check:[...]$8 = { a = -3 b = 4.5 c = 5 } +// lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } // lldb-command:print *owned -// lldbg-check:[...]$9 = 6 +// lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index b044110fc7892..bf3cad30faf92 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -71,27 +71,27 @@ // lldb-command:run // lldb-command:print empty -// lldbg-check:[...]$0 = size=0 +// lldbg-check:[...] size=0 // lldbr-check:(&[i64]) empty = size=0 // lldb-command:print singleton -// lldbg-check:[...]$1 = size=1 { [0] = 1 } +// lldbg-check:[...] size=1 { [0] = 1 } // lldbr-check:(&[i64]) singleton = &[1] // lldb-command:print multiple -// lldbg-check:[...]$2 = size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } +// lldbg-check:[...] size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } // lldbr-check:(&[i64]) multiple = size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } // lldb-command:print slice_of_slice -// lldbg-check:[...]$3 = size=2 { [0] = 3 [1] = 4 } +// lldbg-check:[...] size=2 { [0] = 3 [1] = 4 } // lldbr-check:(&[i64]) slice_of_slice = size=2 { [0] = 3 [1] = 4 } // lldb-command:print padded_tuple -// lldbg-check:[...]$4 = size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } +// lldbg-check:[...] size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } // lldbr-check:(&[(i32, i16)]) padded_tuple = size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } // lldb-command:print padded_struct -// lldbg-check:[...]$5 = size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } +// lldbg-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } // lldbr-check:(&[vec_slices::AStruct]) padded_struct = size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } #![allow(dead_code, unused_variables)] diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs index 27d04094e3c6d..0ac2f2acb596e 100644 --- a/tests/debuginfo/vec.rs +++ b/tests/debuginfo/vec.rs @@ -18,7 +18,7 @@ // lldb-command:run // lldb-command:print a -// lldbg-check:[...]$0 = { [0] = 1 [1] = 2 [2] = 3 } +// lldbg-check:[...] { [0] = 1 [1] = 2 [2] = 3 } // lldbr-check:([i32; 3]) a = { [0] = 1 [1] = 2 [2] = 3 } #![allow(unused_variables)] From 42c5eb88456fd8bee46ec5748a8f83b1df82f0d1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 10 Mar 2024 15:21:35 +0100 Subject: [PATCH 10/14] Add comment about `NonZero` printing as character literal. --- src/etc/lldb_providers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 319660f0ddc5f..5d2b6fd525c14 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -746,6 +746,8 @@ def StdNonZeroNumberSummaryProvider(valobj, _dict): inner = valobj.GetChildAtIndex(0) inner_inner = inner.GetChildAtIndex(0) + # FIXME: Avoid printing as character literal, + # see https://github.com/llvm/llvm-project/issues/65076. if inner_inner.GetTypeName() in ['char', 'unsigned char']: return str(inner_inner.GetValueAsSigned()) else: From 2047e847d7234117bf96583be3dcc4fb0f42d0bf Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 10 Mar 2024 17:04:53 +0100 Subject: [PATCH 11/14] Fix `StdNonZeroNumberProvider` for `gdb`. --- src/etc/gdb_providers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py index 7d7277d240877..227695cdadd58 100644 --- a/src/etc/gdb_providers.py +++ b/src/etc/gdb_providers.py @@ -245,7 +245,14 @@ def __init__(self, valobj): fields = valobj.type.fields() assert len(fields) == 1 field = list(fields)[0] - self._value = str(valobj[field.name]) + + inner_valobj = valobj[field.name] + + inner_fields = inner_valobj.type.fields() + assert len(inner_fields) == 1 + inner_field = list(inner_fields)[0] + + self._value = str(inner_valobj[inner_field.name]) def to_string(self): return self._value From 96431e4b822ff82268bf3f2bbbb7aacf2abc5761 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 15 Mar 2024 15:05:57 +0100 Subject: [PATCH 12/14] Use explicit LLDB commands instead of `print`/`p` aliases. --- tests/debuginfo/associated-types.rs | 18 ++-- tests/debuginfo/basic-types.rs | 26 ++--- tests/debuginfo/borrowed-basic.rs | 26 ++--- tests/debuginfo/borrowed-c-style-enum.rs | 6 +- tests/debuginfo/borrowed-enum.rs | 6 +- tests/debuginfo/borrowed-struct.rs | 14 +-- tests/debuginfo/borrowed-tuple.rs | 6 +- tests/debuginfo/borrowed-unique-basic.rs | 26 ++--- tests/debuginfo/box.rs | 4 +- tests/debuginfo/boxed-struct.rs | 4 +- .../by-value-non-immediate-argument.rs | 14 +-- .../by-value-self-argument-in-trait-impl.rs | 6 +- tests/debuginfo/c-style-enum-in-composite.rs | 14 +-- tests/debuginfo/c-style-enum.rs | 14 +-- tests/debuginfo/captured-fields-1.rs | 24 ++--- tests/debuginfo/captured-fields-2.rs | 8 +- .../debuginfo/closure-in-generic-function.rs | 8 +- tests/debuginfo/coroutine-locals.rs | 40 +++----- tests/debuginfo/coroutine-objects.rs | 16 +-- tests/debuginfo/cross-crate-spans.rs | 12 +-- tests/debuginfo/destructured-fn-argument.rs | 98 +++++++++---------- .../destructured-for-loop-variable.rs | 48 ++++----- tests/debuginfo/destructured-local.rs | 86 ++++++++-------- tests/debuginfo/enum-thinlto.rs | 4 +- tests/debuginfo/evec-in-struct.rs | 10 +- tests/debuginfo/extern-c-fn.rs | 8 +- .../debuginfo/function-arg-initialization.rs | 64 ++++++------ tests/debuginfo/function-arguments.rs | 8 +- .../function-prologue-stepping-regular.rs | 64 ++++++------ .../generic-enum-with-different-disr-sizes.rs | 16 +-- tests/debuginfo/generic-function.rs | 12 +-- tests/debuginfo/generic-functions-nested.rs | 16 +-- .../generic-method-on-generic-struct.rs | 30 +++--- tests/debuginfo/generic-struct.rs | 8 +- tests/debuginfo/generic-tuple-style-enum.rs | 8 +- tests/debuginfo/include_string.rs | 6 +- tests/debuginfo/issue-22656.rs | 4 +- tests/debuginfo/issue-57822.rs | 8 +- tests/debuginfo/lexical-scope-in-for-loop.rs | 14 +-- tests/debuginfo/lexical-scope-in-if.rs | 32 +++--- tests/debuginfo/lexical-scope-in-match.rs | 36 +++---- .../lexical-scope-in-stack-closure.rs | 12 +-- .../lexical-scope-in-unconditional-loop.rs | 26 ++--- .../lexical-scope-in-unique-closure.rs | 12 +-- tests/debuginfo/lexical-scope-in-while.rs | 26 ++--- tests/debuginfo/lexical-scope-with-macro.rs | 16 +-- .../lexical-scopes-in-block-expression.rs | 96 +++++++++--------- tests/debuginfo/method-on-enum.rs | 30 +++--- tests/debuginfo/method-on-generic-struct.rs | 30 +++--- tests/debuginfo/method-on-struct.rs | 30 +++--- tests/debuginfo/method-on-trait.rs | 30 +++--- tests/debuginfo/method-on-tuple-struct.rs | 30 +++--- tests/debuginfo/multi-cgu.rs | 4 +- .../multiple-functions-equal-var-names.rs | 6 +- tests/debuginfo/multiple-functions.rs | 6 +- .../name-shadowing-and-scope-nesting.rs | 24 ++--- tests/debuginfo/no_mangle-info.rs | 8 +- tests/debuginfo/numeric-types.rs | 24 ++--- tests/debuginfo/option-like-enum.rs | 20 ++-- .../packed-struct-with-destructor.rs | 16 +-- tests/debuginfo/packed-struct.rs | 12 +-- tests/debuginfo/pretty-std-collections.rs | 8 +- tests/debuginfo/rc_arc.rs | 4 +- tests/debuginfo/reference-debuginfo.rs | 28 +++--- .../regression-bad-location-list-67992.rs | 2 +- tests/debuginfo/self-in-default-method.rs | 30 +++--- .../self-in-generic-default-method.rs | 30 +++--- tests/debuginfo/shadowed-argument.rs | 12 +-- tests/debuginfo/shadowed-variable.rs | 20 ++-- tests/debuginfo/should-fail.rs | 2 +- tests/debuginfo/simple-lexical-scope.rs | 14 +-- tests/debuginfo/simple-struct.rs | 12 +-- tests/debuginfo/simple-tuple.rs | 14 +-- .../static-method-on-struct-and-enum.rs | 10 +- tests/debuginfo/struct-in-enum.rs | 6 +- tests/debuginfo/struct-in-struct.rs | 16 +-- tests/debuginfo/struct-namespace.rs | 8 +- tests/debuginfo/struct-style-enum.rs | 8 +- tests/debuginfo/struct-with-destructor.rs | 8 +- tests/debuginfo/tuple-in-tuple.rs | 14 +-- tests/debuginfo/tuple-struct.rs | 12 +-- tests/debuginfo/tuple-style-enum.rs | 8 +- tests/debuginfo/union-smoke.rs | 2 +- tests/debuginfo/unique-enum.rs | 6 +- .../var-captured-in-nested-closure.rs | 24 ++--- .../var-captured-in-sendable-closure.rs | 6 +- .../var-captured-in-stack-closure.rs | 20 ++-- tests/debuginfo/vec-slices.rs | 12 +-- tests/debuginfo/vec.rs | 2 +- 89 files changed, 830 insertions(+), 838 deletions(-) diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs index 182541b038a0f..d1d4e320b05d4 100644 --- a/tests/debuginfo/associated-types.rs +++ b/tests/debuginfo/associated-types.rs @@ -42,41 +42,41 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print arg +// lldb-command:v arg // lldbg-check:[...] { b = -1, b1 = 0 } // lldbr-check:(associated_types::Struct) arg = { b = -1, b1 = 0 } // lldb-command:continue -// lldb-command:print inferred +// lldb-command:v inferred // lldbg-check:[...] 1 // lldbr-check:(i64) inferred = 1 -// lldb-command:print explicitly +// lldb-command:v explicitly // lldbg-check:[...] 1 // lldbr-check:(i64) explicitly = 1 // lldb-command:continue -// lldb-command:print arg +// lldb-command:v arg // lldbg-check:[...] 2 // lldbr-check:(i64) arg = 2 // lldb-command:continue -// lldb-command:print arg +// lldb-command:v arg // lldbg-check:[...] (4, 5) // lldbr-check:((i32, i64)) arg = { = 4 = 5 } // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 6 // lldbr-check:(i32) a = 6 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 7 // lldbr-check:(i64) b = 7 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 8 // lldbr-check:(i64) a = 8 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 9 // lldbr-check:(i32) b = 9 // lldb-command:continue diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs index 3a023a890f373..13d85d326ee3d 100644 --- a/tests/debuginfo/basic-types.rs +++ b/tests/debuginfo/basic-types.rs @@ -50,10 +50,10 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] false // lldbr-check:(bool) b = false -// lldb-command:print i +// lldb-command:v i // lldbg-check:[...] -1 // lldbr-check:(isize) i = -1 @@ -61,37 +61,37 @@ // lldbr-command:print c // lldbr-check:(char) c = 'a' -// lldb-command:print i8 +// lldb-command:v i8 // lldbg-check:[...] 'D' // lldbr-check:(i8) i8 = 68 -// lldb-command:print i16 +// lldb-command:v i16 // lldbg-check:[...] -16 // lldbr-check:(i16) i16 = -16 -// lldb-command:print i32 +// lldb-command:v i32 // lldbg-check:[...] -32 // lldbr-check:(i32) i32 = -32 -// lldb-command:print i64 +// lldb-command:v i64 // lldbg-check:[...] -64 // lldbr-check:(i64) i64 = -64 -// lldb-command:print u +// lldb-command:v u // lldbg-check:[...] 1 // lldbr-check:(usize) u = 1 -// lldb-command:print u8 +// lldb-command:v u8 // lldbg-check:[...] 'd' // lldbr-check:(u8) u8 = 100 -// lldb-command:print u16 +// lldb-command:v u16 // lldbg-check:[...] 16 // lldbr-check:(u16) u16 = 16 -// lldb-command:print u32 +// lldb-command:v u32 // lldbg-check:[...] 32 // lldbr-check:(u32) u32 = 32 -// lldb-command:print u64 +// lldb-command:v u64 // lldbg-check:[...] 64 // lldbr-check:(u64) u64 = 64 -// lldb-command:print f32 +// lldb-command:v f32 // lldbg-check:[...] 2.5 // lldbr-check:(f32) f32 = 2.5 -// lldb-command:print f64 +// lldb-command:v f64 // lldbg-check:[...] 3.5 // lldbr-check:(f64) f64 = 3.5 diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs index e30131190af5c..e48e3dd055e43 100644 --- a/tests/debuginfo/borrowed-basic.rs +++ b/tests/debuginfo/borrowed-basic.rs @@ -52,11 +52,11 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print *bool_ref +// lldb-command:v *bool_ref // lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true -// lldb-command:print *int_ref +// lldb-command:v *int_ref // lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 @@ -64,47 +64,47 @@ // lldbr-command:print *char_ref // lldbr-check:(char) *char_ref = 'a' -// lldb-command:print *i8_ref +// lldb-command:v *i8_ref // lldbg-check:[...] 'D' // lldbr-check:(i8) *i8_ref = 68 -// lldb-command:print *i16_ref +// lldb-command:v *i16_ref // lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 -// lldb-command:print *i32_ref +// lldb-command:v *i32_ref // lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 -// lldb-command:print *i64_ref +// lldb-command:v *i64_ref // lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 -// lldb-command:print *uint_ref +// lldb-command:v *uint_ref // lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 -// lldb-command:print *u8_ref +// lldb-command:v *u8_ref // lldbg-check:[...] 'd' // lldbr-check:(u8) *u8_ref = 100 -// lldb-command:print *u16_ref +// lldb-command:v *u16_ref // lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 -// lldb-command:print *u32_ref +// lldb-command:v *u32_ref // lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 -// lldb-command:print *u64_ref +// lldb-command:v *u64_ref // lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 -// lldb-command:print *f32_ref +// lldb-command:v *f32_ref // lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 -// lldb-command:print *f64_ref +// lldb-command:v *f64_ref // lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs index c6a8bf953866b..1a582e8a6d9a5 100644 --- a/tests/debuginfo/borrowed-c-style-enum.rs +++ b/tests/debuginfo/borrowed-c-style-enum.rs @@ -22,15 +22,15 @@ // lldb-command:run -// lldb-command:print *the_a_ref +// lldb-command:v *the_a_ref // lldbg-check:[...] TheA // lldbr-check:(borrowed_c_style_enum::ABC) *the_a_ref = borrowed_c_style_enum::ABC::TheA -// lldb-command:print *the_b_ref +// lldb-command:v *the_b_ref // lldbg-check:[...] TheB // lldbr-check:(borrowed_c_style_enum::ABC) *the_b_ref = borrowed_c_style_enum::ABC::TheB -// lldb-command:print *the_c_ref +// lldb-command:v *the_c_ref // lldbg-check:[...] TheC // lldbr-check:(borrowed_c_style_enum::ABC) *the_c_ref = borrowed_c_style_enum::ABC::TheC diff --git a/tests/debuginfo/borrowed-enum.rs b/tests/debuginfo/borrowed-enum.rs index aee4631a8b3d2..39883ffd0b6ab 100644 --- a/tests/debuginfo/borrowed-enum.rs +++ b/tests/debuginfo/borrowed-enum.rs @@ -22,11 +22,11 @@ // lldb-command:run -// lldb-command:print *the_a_ref +// lldb-command:v *the_a_ref // lldbr-check:(borrowed_enum::ABC::TheA) *the_a_ref = TheA { TheA: 0, TheB: 8970181431921507452 } -// lldb-command:print *the_b_ref +// lldb-command:v *the_b_ref // lldbr-check:(borrowed_enum::ABC::TheB) *the_b_ref = { = 0 = 286331153 = 286331153 } -// lldb-command:print *univariant_ref +// lldb-command:v *univariant_ref // lldbr-check:(borrowed_enum::Univariant) *univariant_ref = { TheOnlyCase = { = 4820353753753434 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs index 96ceec42ab557..d108a29592bc6 100644 --- a/tests/debuginfo/borrowed-struct.rs +++ b/tests/debuginfo/borrowed-struct.rs @@ -34,31 +34,31 @@ // lldb-command:run -// lldb-command:print *stack_val_ref +// lldb-command:v *stack_val_ref // lldbg-check:[...] { x = 10 y = 23.5 } // lldbr-check:(borrowed_struct::SomeStruct) *stack_val_ref = (x = 10, y = 23.5) -// lldb-command:print *stack_val_interior_ref_1 +// lldb-command:v *stack_val_interior_ref_1 // lldbg-check:[...] 10 // lldbr-check:(isize) *stack_val_interior_ref_1 = 10 -// lldb-command:print *stack_val_interior_ref_2 +// lldb-command:v *stack_val_interior_ref_2 // lldbg-check:[...] 23.5 // lldbr-check:(f64) *stack_val_interior_ref_2 = 23.5 -// lldb-command:print *ref_to_unnamed +// lldb-command:v *ref_to_unnamed // lldbg-check:[...] { x = 11 y = 24.5 } // lldbr-check:(borrowed_struct::SomeStruct) *ref_to_unnamed = (x = 11, y = 24.5) -// lldb-command:print *unique_val_ref +// lldb-command:v *unique_val_ref // lldbg-check:[...] { x = 13 y = 26.5 } // lldbr-check:(borrowed_struct::SomeStruct) *unique_val_ref = (x = 13, y = 26.5) -// lldb-command:print *unique_val_interior_ref_1 +// lldb-command:v *unique_val_interior_ref_1 // lldbg-check:[...] 13 // lldbr-check:(isize) *unique_val_interior_ref_1 = 13 -// lldb-command:print *unique_val_interior_ref_2 +// lldb-command:v *unique_val_interior_ref_2 // lldbg-check:[...] 26.5 // lldbr-check:(f64) *unique_val_interior_ref_2 = 26.5 diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs index 8d9c5e9fd2d43..4c5643deb9d0a 100644 --- a/tests/debuginfo/borrowed-tuple.rs +++ b/tests/debuginfo/borrowed-tuple.rs @@ -23,15 +23,15 @@ // lldb-command:run -// lldb-command:print *stack_val_ref +// lldb-command:v *stack_val_ref // lldbg-check:[...] { 0 = -14 1 = -19 } // lldbr-check:((i16, f32)) *stack_val_ref = { 0 = -14 1 = -19 } -// lldb-command:print *ref_to_unnamed +// lldb-command:v *ref_to_unnamed // lldbg-check:[...] { 0 = -15 1 = -20 } // lldbr-check:((i16, f32)) *ref_to_unnamed = { 0 = -15 1 = -20 } -// lldb-command:print *unique_val_ref +// lldb-command:v *unique_val_ref // lldbg-check:[...] { 0 = -17 1 = -22 } // lldbr-check:((i16, f32)) *unique_val_ref = { 0 = -17 1 = -22 } diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs index 38e6ce0a6ae54..d6948a12851a5 100644 --- a/tests/debuginfo/borrowed-unique-basic.rs +++ b/tests/debuginfo/borrowed-unique-basic.rs @@ -55,11 +55,11 @@ // lldb-command:type format add -f decimal 'unsigned char' // lldb-command:run -// lldb-command:print *bool_ref +// lldb-command:v *bool_ref // lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true -// lldb-command:print *int_ref +// lldb-command:v *int_ref // lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 @@ -67,47 +67,47 @@ // lldbr-command:print *char_ref // lldbr-check:(char) *char_ref = 97 -// lldb-command:print *i8_ref +// lldb-command:v *i8_ref // lldbg-check:[...] 68 // lldbr-check:(i8) *i8_ref = 68 -// lldb-command:print *i16_ref +// lldb-command:v *i16_ref // lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 -// lldb-command:print *i32_ref +// lldb-command:v *i32_ref // lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 -// lldb-command:print *i64_ref +// lldb-command:v *i64_ref // lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 -// lldb-command:print *uint_ref +// lldb-command:v *uint_ref // lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 -// lldb-command:print *u8_ref +// lldb-command:v *u8_ref // lldbg-check:[...] 100 // lldbr-check:(u8) *u8_ref = 100 -// lldb-command:print *u16_ref +// lldb-command:v *u16_ref // lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 -// lldb-command:print *u32_ref +// lldb-command:v *u32_ref // lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 -// lldb-command:print *u64_ref +// lldb-command:v *u64_ref // lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 -// lldb-command:print *f32_ref +// lldb-command:v *f32_ref // lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 -// lldb-command:print *f64_ref +// lldb-command:v *f64_ref // lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs index 2c309a4eb2877..46019bcb1a764 100644 --- a/tests/debuginfo/box.rs +++ b/tests/debuginfo/box.rs @@ -16,10 +16,10 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print *a +// lldb-command:v *a // lldbg-check:[...] 1 // lldbr-check:(i32) *a = 1 -// lldb-command:print *b +// lldb-command:v *b // lldbg-check:[...] { 0 = 2 1 = 3.5 } // lldbr-check:((i32, f64)) *b = { 0 = 2 1 = 3.5 } diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs index be2f1a7a8677c..1ee639690eab9 100644 --- a/tests/debuginfo/boxed-struct.rs +++ b/tests/debuginfo/boxed-struct.rs @@ -19,11 +19,11 @@ // lldb-command:run -// lldb-command:print *boxed_with_padding +// lldb-command:v *boxed_with_padding // lldbg-check:[...] { x = 99 y = 999 z = 9999 w = 99999 } // lldbr-check:(boxed_struct::StructWithSomePadding) *boxed_with_padding = { x = 99 y = 999 z = 9999 w = 99999 } -// lldb-command:print *boxed_with_dtor +// lldb-command:v *boxed_with_dtor // lldbg-check:[...] { x = 77 y = 777 z = 7777 w = 77777 } // lldbr-check:(boxed_struct::StructWithDestructor) *boxed_with_dtor = { x = 77 y = 777 z = 7777 w = 77777 } diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index 413eefa3f2ded..e0ae4458d03e5 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -41,27 +41,27 @@ // lldb-command:run -// lldb-command:print s +// lldb-command:v s // lldb-check:[...] Struct { a: 1, b: 2.5 } // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] Struct { a: 3, b: 4.5 } -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 5 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 6.5 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] (7, 8, 9.5, 10.5) // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] Newtype(11.5, 12.5, 13, 14) // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 } // lldb-command:continue diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs index 7b52d054b3217..5276ec827333d 100644 --- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -25,17 +25,17 @@ // lldb-command:run -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] 1111 // lldbr-check:(isize) self = 1111 // lldb-command:continue -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 2222 y = 3333 } // lldbr-check:(by_value_self_argument_in_trait_impl::Struct) self = { x = 2222 y = 3333 } // lldb-command:continue -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } // lldbr-check:((f64, isize, isize, f64)) self = { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } // lldb-command:continue diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs index 82d38038eafa9..ec11d5f465558 100644 --- a/tests/debuginfo/c-style-enum-in-composite.rs +++ b/tests/debuginfo/c-style-enum-in-composite.rs @@ -38,31 +38,31 @@ // lldb-command:run -// lldb-command:print tuple_interior_padding +// lldb-command:v tuple_interior_padding // lldbg-check:[...] { 0 = 0 1 = OneHundred } // lldbr-check:((i16, c_style_enum_in_composite::AnEnum)) tuple_interior_padding = { 0 = 0 1 = OneHundred } -// lldb-command:print tuple_padding_at_end +// lldb-command:v tuple_padding_at_end // lldbg-check:[...] { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } // lldbr-check:(((u64, c_style_enum_in_composite::AnEnum), u64)) tuple_padding_at_end = { 0 = { 0 = 1 1 = OneThousand } 1 = 2 } -// lldb-command:print tuple_different_enums +// lldb-command:v tuple_different_enums // lldbg-check:[...] { 0 = OneThousand 1 = MountainView 2 = OneMillion 3 = 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 = { 0 = c_style_enum_in_composite::AnEnum::OneThousand 1 = c_style_enum_in_composite::AnotherEnum::MountainView 2 = c_style_enum_in_composite::AnEnum::OneMillion 3 = c_style_enum_in_composite::AnotherEnum::Vienna } -// lldb-command:print padded_struct +// lldb-command:v padded_struct // lldbg-check:[...] { a = 3 b = OneMillion c = 4 d = Toronto e = 5 } // lldbr-check:(c_style_enum_in_composite::PaddedStruct) padded_struct = { a = 3 b = c_style_enum_in_composite::AnEnum::OneMillion c = 4 d = Toronto e = 5 } -// lldb-command:print packed_struct +// lldb-command:v packed_struct // lldbg-check:[...] { a = 6 b = OneHundred c = 7 d = Vienna e = 8 } // lldbr-check:(c_style_enum_in_composite::PackedStruct) packed_struct = { a = 6 b = c_style_enum_in_composite::AnEnum::OneHundred c = 7 d = Vienna e = 8 } -// lldb-command:print non_padded_struct +// lldb-command:v non_padded_struct // lldbg-check:[...] { a = OneMillion b = MountainView c = OneThousand d = Toronto } // lldbr-check:(c_style_enum_in_composite::NonPaddedStruct) non_padded_struct = { 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-command:v struct_with_drop // lldbg-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 } // lldbr-check:((c_style_enum_in_composite::StructWithDrop, i64)) struct_with_drop = { 0 = { a = c_style_enum_in_composite::AnEnum::OneHundred b = c_style_enum_in_composite::AnotherEnum::Vienna } 1 = 9 } diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs index 4d84324df2cf3..395b94c59a445 100644 --- a/tests/debuginfo/c-style-enum.rs +++ b/tests/debuginfo/c-style-enum.rs @@ -96,31 +96,31 @@ // lldb-command:run -// lldb-command:print auto_one +// lldb-command:v auto_one // lldbg-check:[...] One // lldbr-check:(c_style_enum::AutoDiscriminant) auto_one = c_style_enum::AutoDiscriminant::One -// lldb-command:print auto_two +// lldb-command:v auto_two // lldbg-check:[...] Two // lldbr-check:(c_style_enum::AutoDiscriminant) auto_two = c_style_enum::AutoDiscriminant::Two -// lldb-command:print auto_three +// lldb-command:v auto_three // lldbg-check:[...] Three // lldbr-check:(c_style_enum::AutoDiscriminant) auto_three = c_style_enum::AutoDiscriminant::Three -// lldb-command:print manual_one_hundred +// lldb-command:v manual_one_hundred // lldbg-check:[...] OneHundred // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_hundred = c_style_enum::ManualDiscriminant::OneHundred -// lldb-command:print manual_one_thousand +// lldb-command:v manual_one_thousand // lldbg-check:[...] OneThousand // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_thousand = c_style_enum::ManualDiscriminant::OneThousand -// lldb-command:print manual_one_million +// lldb-command:v manual_one_million // lldbg-check:[...] OneMillion // lldbr-check:(c_style_enum::ManualDiscriminant) manual_one_million = c_style_enum::ManualDiscriminant::OneMillion -// lldb-command:print single_variant +// lldb-command:v single_variant // lldbg-check:[...] TheOnlyVariant // lldbr-check:(c_style_enum::SingleVariant) single_variant = c_style_enum::SingleVariant::TheOnlyVariant diff --git a/tests/debuginfo/captured-fields-1.rs b/tests/debuginfo/captured-fields-1.rs index bcc5a17968768..d96f2590570bc 100644 --- a/tests/debuginfo/captured-fields-1.rs +++ b/tests/debuginfo/captured-fields-1.rs @@ -25,23 +25,23 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#0}) { _ref__my_ref__my_field1 = 0x[...] } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#0}) test = { _ref__my_ref__my_field1 = 0x[...] } // lldb-command:continue -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#1}) { _ref__my_ref__my_field2 = 0x[...] } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#1}) test = { _ref__my_ref__my_field2 = 0x[...] } // lldb-command:continue -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#2}) { _ref__my_ref = 0x[...] } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#2}) test = { _ref__my_ref = 0x[...] } // lldb-command:continue -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#3}) { my_ref = 0x[...] } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#3}) test = { my_ref = 0x[...] } // lldb-command:continue -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#4}) { my_var__my_field2 = 22 } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#4}) test = { my_var__my_field2 = 22 } // lldb-command:continue -// lldb-command:print test -// lldbg-check:(captured_fields_1::main::{closure_env#5}) { my_var = { my_field1 = 11 my_field2 = 22 } } +// lldb-command:v test +// lldbg-check:(captured_fields_1::main::{closure_env#5}) test = { my_var = { my_field1 = 11 my_field2 = 22 } } // lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/captured-fields-2.rs b/tests/debuginfo/captured-fields-2.rs index 7191d3f84d2a7..446c5c70fefb3 100644 --- a/tests/debuginfo/captured-fields-2.rs +++ b/tests/debuginfo/captured-fields-2.rs @@ -13,11 +13,11 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print my_ref__my_field1 -// lldbg-check:(unsigned int) 11 +// lldb-command:v my_ref__my_field1 +// lldbg-check:(unsigned int) my_ref__my_field1 = 11 // lldb-command:continue -// lldb-command:print my_var__my_field2 -// lldbg-check:(unsigned int) 22 +// lldb-command:v my_var__my_field2 +// lldbg-check:(unsigned int) my_var__my_field2 = 22 // lldb-command:continue #![allow(unused)] diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs index c48858e4a0a55..ef0f2b0b464b4 100644 --- a/tests/debuginfo/closure-in-generic-function.rs +++ b/tests/debuginfo/closure-in-generic-function.rs @@ -23,18 +23,18 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 0.5 // lldbr-check:(f64) x = 0.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 10 // lldbr-check:(i32) y = 10 // lldb-command:continue -// lldb-command:print *x +// lldb-command:v *x // lldbg-check:[...] 29 // lldbr-check:(i32) *x = 29 -// lldb-command:print *y +// lldb-command:v *y // lldbg-check:[...] 110 // lldbr-check:(i32) *y = 110 // lldb-command:continue diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs index 80a68434dab58..54b5cd577c8b9 100644 --- a/tests/debuginfo/coroutine-locals.rs +++ b/tests/debuginfo/coroutine-locals.rs @@ -27,32 +27,24 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print a -// lldbg-check:(int) 5 -// lldbr-check:(int) a = 5 -// lldb-command:print c -// lldbg-check:(int) 6 -// lldbr-check:(int) c = 6 -// lldb-command:print d -// lldbg-check:(int) 7 -// lldbr-check:(int) d = 7 +// lldb-command:v a +// lldb-check:(int) a = 5 +// lldb-command:v c +// lldb-check:(int) c = 6 +// lldb-command:v d +// lldb-check:(int) d = 7 // lldb-command:continue -// lldb-command:print a -// lldbg-check:(int) 7 -// lldbr-check:(int) a = 7 -// lldb-command:print c -// lldbg-check:(int) 6 -// lldbr-check:(int) c = 6 -// lldb-command:print e -// lldbg-check:(int) 8 -// lldbr-check:(int) e = 8 +// lldb-command:v a +// lldb-check:(int) a = 7 +// lldb-command:v c +// lldb-check:(int) c = 6 +// lldb-command:v e +// lldb-check:(int) e = 8 // lldb-command:continue -// lldb-command:print a -// lldbg-check:(int) 8 -// lldbr-check:(int) a = 8 -// lldb-command:print c -// lldbg-check:(int) 6 -// lldbr-check:(int) c = 6 +// lldb-command:v a +// lldb-check:(int) a = 8 +// lldb-command:v c +// lldb-check:(int) c = 6 #![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)] #![omit_gdb_pretty_printer_section] diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs index 9f14cb3f8ec43..9e1bd5d62e7a1 100644 --- a/tests/debuginfo/coroutine-objects.rs +++ b/tests/debuginfo/coroutine-objects.rs @@ -25,17 +25,17 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) +// lldb-command:v b +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) b = // lldb-command:continue -// lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) +// lldb-command:v b +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) b = // lldb-command:continue -// lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) +// lldb-command:v b +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) b = // lldb-command:continue -// lldb-command:print b -// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) +// lldb-command:v b +// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) b = // === CDB TESTS =================================================================================== diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs index 9f3538c4e1d49..cf3f8e1eadf40 100644 --- a/tests/debuginfo/cross-crate-spans.rs +++ b/tests/debuginfo/cross-crate-spans.rs @@ -43,24 +43,24 @@ extern crate cross_crate_spans; // lldb-command:b cross_crate_spans.rs:14 // lldb-command:run -// lldb-command:print result +// lldb-command:v result // lldbg-check:[...] { 0 = 17 1 = 17 } // lldbr-check:((u32, u32)) result = { 0 = 17 1 = 17 } -// lldb-command:print a_variable +// lldb-command:v a_variable // lldbg-check:[...] 123456789 // lldbr-check:(u32) a_variable = 123456789 -// lldb-command:print another_variable +// lldb-command:v another_variable // lldbg-check:[...] 123456789.5 // lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue -// lldb-command:print result +// lldb-command:v result // lldbg-check:[...] { 0 = 1212 1 = 1212 } // lldbr-check:((i16, i16)) result = { 0 = 1212 1 = 1212 } -// lldb-command:print a_variable +// lldb-command:v a_variable // lldbg-check:[...] 123456789 // lldbr-check:(u32) a_variable = 123456789 -// lldb-command:print another_variable +// lldb-command:v another_variable // lldbg-check:[...] 123456789.5 // lldbr-check:(f64) another_variable = 123456789.5 // lldb-command:continue diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs index 2748bdb08b964..74e18a594d789 100644 --- a/tests/debuginfo/destructured-fn-argument.rs +++ b/tests/debuginfo/destructured-fn-argument.rs @@ -163,195 +163,195 @@ // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 1 // lldbr-check:(isize) a = 1 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] false // lldbr-check:(bool) b = false // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 2 // lldbr-check:(isize) a = 2 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 3 // lldbr-check:(u16) b = 3 -// lldb-command:print c +// lldb-command:v c // lldbg-check:[...] 4 // lldbr-check:(u16) c = 4 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 5 // lldbr-check:(isize) a = 5 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] { 0 = 6 1 = 7 } // lldbr-check:((u32, u32)) b = { 0 = 6 1 = 7 } // lldb-command:continue -// lldb-command:print h +// lldb-command:v h // lldbg-check:[...] 8 // lldbr-check:(i16) h = 8 -// lldb-command:print i +// lldb-command:v i // lldbg-check:[...] { a = 9 b = 10 } // lldbr-check:(destructured_fn_argument::Struct) i = { a = 9 b = 10 } -// lldb-command:print j +// lldb-command:v j // lldbg-check:[...] 11 // lldbr-check:(i16) j = 11 // lldb-command:continue -// lldb-command:print k +// lldb-command:v k // lldbg-check:[...] 12 // lldbr-check:(i64) k = 12 -// lldb-command:print l +// lldb-command:v l // lldbg-check:[...] 13 // lldbr-check:(i32) l = 13 // lldb-command:continue -// lldb-command:print m +// lldb-command:v m // lldbg-check:[...] 14 // lldbr-check:(isize) m = 14 -// lldb-command:print n +// lldb-command:v n // lldbg-check:[...] 16 // lldbr-check:(i32) n = 16 // lldb-command:continue -// lldb-command:print o +// lldb-command:v o // lldbg-check:[...] 18 // lldbr-check:(i32) o = 18 // lldb-command:continue -// lldb-command:print p +// lldb-command:v p // lldbg-check:[...] 19 // lldbr-check:(i64) p = 19 -// lldb-command:print q +// lldb-command:v q // lldbg-check:[...] 20 // lldbr-check:(i32) q = 20 -// lldb-command:print r +// lldb-command:v r // lldbg-check:[...] { a = 21 b = 22 } // lldbr-check:(destructured_fn_argument::Struct) r = { a = 21, b = 22 } // lldb-command:continue -// lldb-command:print s +// lldb-command:v s // lldbg-check:[...] 24 // lldbr-check:(i32) s = 24 -// lldb-command:print t +// lldb-command:v t // lldbg-check:[...] 23 // lldbr-check:(i64) t = 23 // lldb-command:continue -// lldb-command:print u +// lldb-command:v u // lldbg-check:[...] 25 // lldbr-check:(i16) u = 25 -// lldb-command:print v +// lldb-command:v v // lldbg-check:[...] 26 // lldbr-check:(i32) v = 26 -// lldb-command:print w +// lldb-command:v w // lldbg-check:[...] 27 // lldbr-check:(i64) w = 27 -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 28 // lldbr-check:(i32) x = 28 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 29 // lldbr-check:(i64) y = 29 -// lldb-command:print z +// lldb-command:v z // lldbg-check:[...] 30 // lldbr-check:(i32) z = 30 -// lldb-command:print ae +// lldb-command:v ae // lldbg-check:[...] 31 // lldbr-check:(i64) ae = 31 -// lldb-command:print oe +// lldb-command:v oe // lldbg-check:[...] 32 // lldbr-check:(i32) oe = 32 -// lldb-command:print ue +// lldb-command:v ue // lldbg-check:[...] 33 // lldbr-check:(u16) ue = 33 // lldb-command:continue -// lldb-command:print aa +// lldb-command:v aa // lldbg-check:[...] { 0 = 34 1 = 35 } // lldbr-check:((isize, isize)) aa = { 0 = 34 1 = 35 } // lldb-command:continue -// lldb-command:print bb +// lldb-command:v bb // lldbg-check:[...] { 0 = 36 1 = 37 } // lldbr-check:((isize, isize)) bb = { 0 = 36 1 = 37 } // lldb-command:continue -// lldb-command:print cc +// lldb-command:v cc // lldbg-check:[...] 38 // lldbr-check:(isize) cc = 38 // lldb-command:continue -// lldb-command:print dd +// lldb-command:v dd // lldbg-check:[...] { 0 = 40 1 = 41 2 = 42 } // lldbr-check:((isize, isize, isize)) dd = { 0 = 40 1 = 41 2 = 42 } // lldb-command:continue -// lldb-command:print *ee +// lldb-command:v *ee // lldbg-check:[...] { 0 = 43 1 = 44 2 = 45 } // lldbr-check:((isize, isize, isize)) *ee = { 0 = 43 1 = 44 2 = 45 } // lldb-command:continue -// lldb-command:print *ff +// lldb-command:v *ff // lldbg-check:[...] 46 // lldbr-check:(isize) *ff = 46 -// lldb-command:print gg +// lldb-command:v gg // lldbg-check:[...] { 0 = 47 1 = 48 } // lldbr-check:((isize, isize)) gg = { 0 = 47 1 = 48 } // lldb-command:continue -// lldb-command:print *hh +// lldb-command:v *hh // lldbg-check:[...] 50 // lldbr-check:(i32) *hh = 50 // lldb-command:continue -// lldb-command:print ii +// lldb-command:v ii // lldbg-check:[...] 51 // lldbr-check:(i32) ii = 51 // lldb-command:continue -// lldb-command:print *jj +// lldb-command:v *jj // lldbg-check:[...] 52 // lldbr-check:(i32) *jj = 52 // lldb-command:continue -// lldb-command:print kk +// lldb-command:v kk // lldbg-check:[...] 53 // lldbr-check:(f64) kk = 53 -// lldb-command:print ll +// lldb-command:v ll // lldbg-check:[...] 54 // lldbr-check:(isize) ll = 54 // lldb-command:continue -// lldb-command:print mm +// lldb-command:v mm // lldbg-check:[...] 55 // lldbr-check:(f64) mm = 55 -// lldb-command:print *nn +// lldb-command:v *nn // lldbg-check:[...] 56 // lldbr-check:(isize) *nn = 56 // lldb-command:continue -// lldb-command:print oo +// lldb-command:v oo // lldbg-check:[...] 57 // lldbr-check:(isize) oo = 57 -// lldb-command:print pp +// lldb-command:v pp // lldbg-check:[...] 58 // lldbr-check:(isize) pp = 58 -// lldb-command:print qq +// lldb-command:v qq // lldbg-check:[...] 59 // lldbr-check:(isize) qq = 59 // lldb-command:continue -// lldb-command:print rr +// lldb-command:v rr // lldbg-check:[...] 60 // lldbr-check:(isize) rr = 60 -// lldb-command:print ss +// lldb-command:v ss // lldbg-check:[...] 61 // lldbr-check:(isize) ss = 61 -// lldb-command:print tt +// lldb-command:v tt // lldbg-check:[...] 62 // lldbr-check:(isize) tt = 62 // lldb-command:continue diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs index e583804cb1e9e..1cad8bcfacbe4 100644 --- a/tests/debuginfo/destructured-for-loop-variable.rs +++ b/tests/debuginfo/destructured-for-loop-variable.rs @@ -84,89 +84,89 @@ // lldb-command:run // DESTRUCTURED STRUCT -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 400 // lldbr-check:(i16) x = 400 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 401.5 // lldbr-check:(f32) y = 401.5 -// lldb-command:print z +// lldb-command:v z // lldbg-check:[...] true // lldbr-check:(bool) z = true // lldb-command:continue // DESTRUCTURED TUPLE -// lldb-command:print _i8 +// lldb-command:v _i8 // lldbg-check:[...] 0x6f // lldbr-check:(i8) _i8 = 111 -// lldb-command:print _u8 +// lldb-command:v _u8 // lldbg-check:[...] 0x70 // lldbr-check:(u8) _u8 = 112 -// lldb-command:print _i16 +// lldb-command:v _i16 // lldbg-check:[...] -113 // lldbr-check:(i16) _i16 = -113 -// lldb-command:print _u16 +// lldb-command:v _u16 // lldbg-check:[...] 114 // lldbr-check:(u16) _u16 = 114 -// lldb-command:print _i32 +// lldb-command:v _i32 // lldbg-check:[...] -115 // lldbr-check:(i32) _i32 = -115 -// lldb-command:print _u32 +// lldb-command:v _u32 // lldbg-check:[...] 116 // lldbr-check:(u32) _u32 = 116 -// lldb-command:print _i64 +// lldb-command:v _i64 // lldbg-check:[...] -117 // lldbr-check:(i64) _i64 = -117 -// lldb-command:print _u64 +// lldb-command:v _u64 // lldbg-check:[...] 118 // lldbr-check:(u64) _u64 = 118 -// lldb-command:print _f32 +// lldb-command:v _f32 // lldbg-check:[...] 119.5 // lldbr-check:(f32) _f32 = 119.5 -// lldb-command:print _f64 +// lldb-command:v _f64 // lldbg-check:[...] 120.5 // lldbr-check:(f64) _f64 = 120.5 // lldb-command:continue // MORE COMPLEX CASE -// lldb-command:print v1 +// lldb-command:v v1 // lldbg-check:[...] 80000 // lldbr-check:(i32) v1 = 80000 -// lldb-command:print x1 +// lldb-command:v x1 // lldbg-check:[...] 8000 // lldbr-check:(i16) x1 = 8000 -// lldb-command:print *y1 +// lldb-command:v *y1 // lldbg-check:[...] 80001.5 // lldbr-check:(f32) *y1 = 80001.5 -// lldb-command:print z1 +// lldb-command:v z1 // lldbg-check:[...] false // lldbr-check:(bool) z1 = false -// lldb-command:print *x2 +// lldb-command:v *x2 // lldbg-check:[...] -30000 // lldbr-check:(i16) *x2 = -30000 -// lldb-command:print y2 +// lldb-command:v y2 // lldbg-check:[...] -300001.5 // lldbr-check:(f32) y2 = -300001.5 -// lldb-command:print *z2 +// lldb-command:v *z2 // lldbg-check:[...] true // lldbr-check:(bool) *z2 = true -// lldb-command:print v2 +// lldb-command:v v2 // lldbg-check:[...] 854237.5 // lldbr-check:(f64) v2 = 854237.5 // lldb-command:continue // SIMPLE IDENTIFIER -// lldb-command:print i +// lldb-command:v i // lldbg-check:[...] 1234 // lldbr-check:(i32) i = 1234 // lldb-command:continue -// lldb-command:print simple_struct_ident +// lldb-command:v simple_struct_ident // lldbg-check:[...] { x = 3537 y = 35437.5 z = true } // lldbr-check:(destructured_for_loop_variable::Struct) simple_struct_ident = { x = 3537 y = 35437.5 z = true } // lldb-command:continue -// lldb-command:print simple_tuple_ident +// lldb-command:v simple_tuple_ident // lldbg-check:[...] { 0 = 34903493 1 = 232323 } // lldbr-check:((u32, i64)) simple_tuple_ident = { 0 = 34903493 1 = 232323 } // lldb-command:continue diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs index 9993407815e0a..8d62fe5db0311 100644 --- a/tests/debuginfo/destructured-local.rs +++ b/tests/debuginfo/destructured-local.rs @@ -129,156 +129,156 @@ // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 1 // lldbr-check:(isize) a = 1 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] false // lldbr-check:(bool) b = false -// lldb-command:print c +// lldb-command:v c // lldbg-check:[...] 2 // lldbr-check:(isize) c = 2 -// lldb-command:print d +// lldb-command:v d // lldbg-check:[...] 3 // lldbr-check:(u16) d = 3 -// lldb-command:print e +// lldb-command:v e // lldbg-check:[...] 4 // lldbr-check:(u16) e = 4 -// lldb-command:print f +// lldb-command:v f // lldbg-check:[...] 5 // lldbr-check:(isize) f = 5 -// lldb-command:print g +// lldb-command:v g // lldbg-check:[...] { 0 = 6 1 = 7 } // lldbr-check:((u32, u32)) g = { 0 = 6 1 = 7 } -// lldb-command:print h +// lldb-command:v h // lldbg-check:[...] 8 // lldbr-check:(i16) h = 8 -// lldb-command:print i +// lldb-command:v i // lldbg-check:[...] { a = 9 b = 10 } // lldbr-check:(destructured_local::Struct) i = { a = 9 b = 10 } -// lldb-command:print j +// lldb-command:v j // lldbg-check:[...] 11 // lldbr-check:(i16) j = 11 -// lldb-command:print k +// lldb-command:v k // lldbg-check:[...] 12 // lldbr-check:(i64) k = 12 -// lldb-command:print l +// lldb-command:v l // lldbg-check:[...] 13 // lldbr-check:(i32) l = 13 -// lldb-command:print m +// lldb-command:v m // lldbg-check:[...] 14 // lldbr-check:(i32) m = 14 -// lldb-command:print n +// lldb-command:v n // lldbg-check:[...] 16 // lldbr-check:(i32) n = 16 -// lldb-command:print o +// lldb-command:v o // lldbg-check:[...] 18 // lldbr-check:(i32) o = 18 -// lldb-command:print p +// lldb-command:v p // lldbg-check:[...] 19 // lldbr-check:(i64) p = 19 -// lldb-command:print q +// lldb-command:v q // lldbg-check:[...] 20 // lldbr-check:(i32) q = 20 -// lldb-command:print r +// lldb-command:v r // lldbg-check:[...] { a = 21 b = 22 } // lldbr-check:(destructured_local::Struct) r = { a = 21 b = 22 } -// lldb-command:print s +// lldb-command:v s // lldbg-check:[...] 24 // lldbr-check:(i32) s = 24 -// lldb-command:print t +// lldb-command:v t // lldbg-check:[...] 23 // lldbr-check:(i64) t = 23 -// lldb-command:print u +// lldb-command:v u // lldbg-check:[...] 25 // lldbr-check:(i32) u = 25 -// lldb-command:print v +// lldb-command:v v // lldbg-check:[...] 26 // lldbr-check:(i32) v = 26 -// lldb-command:print w +// lldb-command:v w // lldbg-check:[...] 27 // lldbr-check:(i32) w = 27 -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 28 // lldbr-check:(i32) x = 28 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 29 // lldbr-check:(i64) y = 29 -// lldb-command:print z +// lldb-command:v z // lldbg-check:[...] 30 // lldbr-check:(i32) z = 30 -// lldb-command:print ae +// lldb-command:v ae // lldbg-check:[...] 31 // lldbr-check:(i64) ae = 31 -// lldb-command:print oe +// lldb-command:v oe // lldbg-check:[...] 32 // lldbr-check:(i32) oe = 32 -// lldb-command:print ue +// lldb-command:v ue // lldbg-check:[...] 33 // lldbr-check:(i32) ue = 33 -// lldb-command:print aa +// lldb-command:v aa // lldbg-check:[...] { 0 = 34 1 = 35 } // lldbr-check:((i32, i32)) aa = { 0 = 34 1 = 35 } -// lldb-command:print bb +// lldb-command:v bb // lldbg-check:[...] { 0 = 36 1 = 37 } // lldbr-check:((i32, i32)) bb = { 0 = 36 1 = 37 } -// lldb-command:print cc +// lldb-command:v cc // lldbg-check:[...] 38 // lldbr-check:(i32) cc = 38 -// lldb-command:print dd +// lldb-command:v dd // lldbg-check:[...] { 0 = 40 1 = 41 2 = 42 } // lldbr-check:((i32, i32, i32)) dd = { 0 = 40 1 = 41 2 = 42} -// lldb-command:print *ee +// lldb-command:v *ee // lldbg-check:[...] { 0 = 43 1 = 44 2 = 45 } // lldbr-check:((i32, i32, i32)) *ee = { 0 = 43 1 = 44 2 = 45} -// lldb-command:print *ff +// lldb-command:v *ff // lldbg-check:[...] 46 // lldbr-check:(i32) *ff = 46 -// lldb-command:print gg +// lldb-command:v gg // lldbg-check:[...] { 0 = 47 1 = 48 } // lldbr-check:((i32, i32)) gg = { 0 = 47 1 = 48 } -// lldb-command:print *hh +// lldb-command:v *hh // lldbg-check:[...] 50 // lldbr-check:(i32) *hh = 50 -// lldb-command:print ii +// lldb-command:v ii // lldbg-check:[...] 51 // lldbr-check:(i32) ii = 51 -// lldb-command:print *jj +// lldb-command:v *jj // lldbg-check:[...] 52 // lldbr-check:(i32) *jj = 52 -// lldb-command:print kk +// lldb-command:v kk // lldbg-check:[...] 53 // lldbr-check:(f64) kk = 53 -// lldb-command:print ll +// lldb-command:v ll // lldbg-check:[...] 54 // lldbr-check:(isize) ll = 54 -// lldb-command:print mm +// lldb-command:v mm // lldbg-check:[...] 55 // lldbr-check:(f64) mm = 55 -// lldb-command:print *nn +// lldb-command:v *nn // lldbg-check:[...] 56 // lldbr-check:(isize) *nn = 56 diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index 2e541663147f9..f3f177589318c 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -14,8 +14,8 @@ // lldb-command:run -// lldb-command:print *abc -// lldbg-check:(enum_thinlto::ABC) +// lldb-command:v *abc +// lldbg-check:(enum_thinlto::ABC) *abc = // lldbr-check:(enum_thinlto::ABC) *abc = (x = 0, y = 8970181431921507452) #![allow(unused_variables)] diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs index 0e6565830a9b7..2283e96c0ad6b 100644 --- a/tests/debuginfo/evec-in-struct.rs +++ b/tests/debuginfo/evec-in-struct.rs @@ -30,22 +30,22 @@ // lldb-command:run -// lldb-command:print no_padding1 +// lldb-command:v no_padding1 // lldbg-check:[...] { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } // lldbr-check:(evec_in_struct::NoPadding1) no_padding1 = { x = { [0] = 0 [1] = 1 [2] = 2 } y = -3 z = { [0] = 4.5 [1] = 5.5 } } -// lldb-command:print no_padding2 +// lldb-command:v no_padding2 // lldbg-check:[...] { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } // lldbr-check:(evec_in_struct::NoPadding2) no_padding2 = { x = { [0] = 6 [1] = 7 [2] = 8 } y = { [0] = { [0] = 9 [1] = 10 } [1] = { [0] = 11 [1] = 12 } } } -// lldb-command:print struct_internal_padding +// lldb-command:v struct_internal_padding // lldbg-check:[...] { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } // lldbr-check:(evec_in_struct::StructInternalPadding) struct_internal_padding = { x = { [0] = 13 [1] = 14 } y = { [0] = 15 [1] = 16 } } -// lldb-command:print single_vec +// lldb-command:v single_vec // lldbg-check:[...] { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } // lldbr-check:(evec_in_struct::SingleVec) single_vec = { x = { [0] = 17 [1] = 18 [2] = 19 [3] = 20 [4] = 21 } } -// lldb-command:print struct_padded_at_end +// lldb-command:v struct_padded_at_end // lldbg-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } // lldbr-check:(evec_in_struct::StructPaddedAtEnd) struct_padded_at_end = { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs index 0d2eb9e6daf00..b45a073ed0503 100644 --- a/tests/debuginfo/extern-c-fn.rs +++ b/tests/debuginfo/extern-c-fn.rs @@ -21,16 +21,16 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print len +// lldb-command:v len // lldbg-check:[...] 20 // lldbr-check:(i32) len = 20 -// lldb-command:print local0 +// lldb-command:v local0 // lldbg-check:[...] 19 // lldbr-check:(i32) local0 = 19 -// lldb-command:print local1 +// lldb-command:v local1 // lldbg-check:[...] true // lldbr-check:(bool) local1 = true -// lldb-command:print local2 +// lldb-command:v local2 // lldbg-check:[...] 20.5 // lldbr-check:(f64) local2 = 20.5 diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs index 5288aa2e6f16a..05935c30bea5d 100644 --- a/tests/debuginfo/function-arg-initialization.rs +++ b/tests/debuginfo/function-arg-initialization.rs @@ -119,99 +119,99 @@ // lldb-command:run // IMMEDIATE ARGS -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 1 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] true -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 2.5 // lldb-command:continue // NON IMMEDIATE ARGS -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 } -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 } // lldb-command:continue // BINDING -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 19 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] 20 -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 21.5 // lldb-command:continue // ASSIGNMENT -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 22 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] 23 -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 24.5 // lldb-command:continue // FUNCTION CALL -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 25 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 26 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 27.5 // lldb-command:continue // EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 28 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 29 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 30.5 // lldb-command:continue // RETURN EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 31 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 32 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 33.5 // lldb-command:continue // ARITHMETIC EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 34 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 35 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 36.5 // lldb-command:continue // IF EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 37 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 38 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 39.5 // lldb-command:continue // WHILE EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 40 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 41 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 42 // lldb-command:continue // LOOP EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 43 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 44 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 45 // lldb-command:continue diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs index 84271d07b389f..b0afa1d077200 100644 --- a/tests/debuginfo/function-arguments.rs +++ b/tests/debuginfo/function-arguments.rs @@ -22,18 +22,18 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 111102 // lldbr-check:(isize) x = 111102 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 2000 // lldbr-check:(i32) a = 2000 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 3000 // lldbr-check:(i64) b = 3000 // lldb-command:continue diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs index 02567fd013e52..a1f44105bb94a 100644 --- a/tests/debuginfo/function-prologue-stepping-regular.rs +++ b/tests/debuginfo/function-prologue-stepping-regular.rs @@ -20,99 +20,99 @@ // lldb-command:run // IMMEDIATE ARGS -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 1 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] true -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 2.5 // lldb-command:continue // NON IMMEDIATE ARGS -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 } -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 } // lldb-command:continue // BINDING -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 19 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] 20 -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 21.5 // lldb-command:continue // ASSIGNMENT -// lldb-command:print a +// lldb-command:v a // lldb-check:[...] 22 -// lldb-command:print b +// lldb-command:v b // lldb-check:[...] 23 -// lldb-command:print c +// lldb-command:v c // lldb-check:[...] 24.5 // lldb-command:continue // FUNCTION CALL -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 25 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 26 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 27.5 // lldb-command:continue // EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 28 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 29 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 30.5 // lldb-command:continue // RETURN EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 31 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 32 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 33.5 // lldb-command:continue // ARITHMETIC EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 34 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 35 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 36.5 // lldb-command:continue // IF EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 37 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 38 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 39.5 // lldb-command:continue // WHILE EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 40 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 41 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 42 // lldb-command:continue // LOOP EXPR -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 43 -// lldb-command:print y +// lldb-command:v y // lldb-check:[...] 44 -// lldb-command:print z +// lldb-command:v z // lldb-check:[...] 45 // lldb-command:continue diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs index a7e97194e5df0..7b23221213a58 100644 --- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -39,22 +39,22 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print eight_bytes1 +// lldb-command:v eight_bytes1 // lldb-check:[...] Variant1(100) -// lldb-command:print four_bytes1 +// lldb-command:v four_bytes1 // lldb-check:[...] Variant1(101) -// lldb-command:print two_bytes1 +// lldb-command:v two_bytes1 // lldb-check:[...] Variant1(102) -// lldb-command:print one_byte1 +// lldb-command:v one_byte1 // lldb-check:[...] Variant1('A') -// lldb-command:print eight_bytes2 +// lldb-command:v eight_bytes2 // lldb-check:[...] Variant2(100) -// lldb-command:print four_bytes2 +// lldb-command:v four_bytes2 // lldb-check:[...] Variant2(101) -// lldb-command:print two_bytes2 +// lldb-command:v two_bytes2 // lldb-check:[...] Variant2(102) -// lldb-command:print one_byte2 +// lldb-command:v one_byte2 // lldb-check:[...] Variant2('A') // lldb-command:continue diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs index 5c33d0d8520bb..e131ebfa306ec 100644 --- a/tests/debuginfo/generic-function.rs +++ b/tests/debuginfo/generic-function.rs @@ -29,26 +29,26 @@ // lldb-command:run -// lldb-command:print *t0 +// lldb-command:v *t0 // lldbg-check:[...] 1 // lldbr-check:(i32) *t0 = 1 -// lldb-command:print *t1 +// lldb-command:v *t1 // lldbg-check:[...] 2.5 // lldbr-check:(f64) *t1 = 2.5 // lldb-command:continue -// lldb-command:print *t0 +// lldb-command:v *t0 // lldbg-check:[...] 3.5 // lldbr-check:(f64) *t0 = 3.5 -// lldb-command:print *t1 +// lldb-command:v *t1 // lldbg-check:[...] 4 // lldbr-check:(u16) *t1 = 4 // lldb-command:continue -// lldb-command:print *t0 +// lldb-command:v *t0 // lldbg-check:[...] 5 // lldbr-check:(i32) *t0 = 5 -// lldb-command:print *t1 +// lldb-command:v *t1 // lldbg-check:[...] { a = 6 b = 7.5 } // lldbr-check:(generic_function::Struct) *t1 = { a = 6 b = 7.5 } // lldb-command:continue diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs index 4be0ab80f650f..eee0c1511822e 100644 --- a/tests/debuginfo/generic-functions-nested.rs +++ b/tests/debuginfo/generic-functions-nested.rs @@ -35,34 +35,34 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 1 // lldbr-check:(i32) y = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 2.5 // lldbr-check:(f64) y = 2.5 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -2.5 // lldbr-check:(f64) x = -2.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 1 // lldbr-check:(i32) y = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -2.5 // lldbr-check:(f64) x = -2.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 2.5 // lldbr-check:(f64) y = 2.5 // lldb-command:continue diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs index dea1c17ad416b..0f70674041037 100644 --- a/tests/debuginfo/generic-method-on-generic-struct.rs +++ b/tests/debuginfo/generic-method-on-generic-struct.rs @@ -64,61 +64,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = { 0 = 8888, 1 = -8888 } } // lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { 0 = 8888 1 = -8888 } } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] 2 // lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = { 0 = 8888, 1 = -8888 } } // lldbr-check:(generic_method_on_generic_struct::Struct<(u32, i32)>) self = { x = { 0 = 8888, 1 = -8888 } } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) *self = { x = 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) self = { x = 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 1234.5 } // lldbr-check:(generic_method_on_generic_struct::Struct) *self = { x = 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10.5 // lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs index 4c442feec6ac1..8c74aa42d2ca6 100644 --- a/tests/debuginfo/generic-struct.rs +++ b/tests/debuginfo/generic-struct.rs @@ -25,17 +25,17 @@ // lldb-command:run -// lldb-command:print int_int +// lldb-command:v int_int // lldbg-check:[...] AGenericStruct { key: 0, value: 1 } // lldbr-check:(generic_struct::AGenericStruct) int_int = AGenericStruct { key: 0, value: 1 } -// lldb-command:print int_float +// lldb-command:v int_float // lldbg-check:[...] 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-command:v float_int // lldbg-check:[...] 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-command:v float_int_float // lldbg-check:[...] 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 } } diff --git a/tests/debuginfo/generic-tuple-style-enum.rs b/tests/debuginfo/generic-tuple-style-enum.rs index fb5deb9b19823..af90c6ce30ea6 100644 --- a/tests/debuginfo/generic-tuple-style-enum.rs +++ b/tests/debuginfo/generic-tuple-style-enum.rs @@ -26,16 +26,16 @@ // lldb-command:run -// lldb-command:print case1 +// lldb-command:v case1 // lldbr-check:(generic_tuple_style_enum::Regular::Case1) case1 = { __0 = 0 __1 = 31868 __2 = 31868 __3 = 31868 __4 = 31868 } -// lldb-command:print case2 +// lldb-command:v case2 // lldbr-check:(generic_tuple_style_enum::Regular::Case2) case2 = Regular::Case2 { Case1: 0, Case2: 286331153, Case3: 286331153 } -// lldb-command:print case3 +// lldb-command:v case3 // lldbr-check:(generic_tuple_style_enum::Regular::Case3) case3 = Regular::Case3 { Case1: 0, Case2: 6438275382588823897 } -// lldb-command:print univariant +// lldb-command:v univariant // lldbr-check:(generic_tuple_style_enum::Univariant) univariant = Univariant { TheOnlyCase: Univariant::TheOnlyCase(-1) } #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 77b2d7dec5f9b..75013ab5274ec 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -15,13 +15,13 @@ // lldb-command:run -// lldb-command:print string1.length +// lldb-command:v string1.length // lldbg-check:[...] 48 // lldbr-check:(usize) length = 48 -// lldb-command:print string2.length +// lldb-command:v string2.length // lldbg-check:[...] 49 // lldbr-check:(usize) length = 49 -// lldb-command:print string3.length +// lldb-command:v string3.length // lldbg-check:[...] 50 // lldbr-check:(usize) length = 50 diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs index 375967f2072a5..5a5442acd95f3 100644 --- a/tests/debuginfo/issue-22656.rs +++ b/tests/debuginfo/issue-22656.rs @@ -10,10 +10,10 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print v +// lldb-command:v v // lldbg-check:[...] size=3 { [0] = 1 [1] = 2 [2] = 3 } // lldbr-check:(alloc::vec::Vec) v = size=3 { [0] = 1 [1] = 2 [2] = 3 } -// lldb-command:print zs +// lldb-command:v zs // lldbg-check:[...] { x = y = 123 z = w = 456 } // lldbr-check:(issue_22656::StructWithZeroSizedField) zs = { x = y = 123 z = w = 456 } // lldbr-command:continue diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs index 5d0973c1d6b3a..93e1a2558f693 100644 --- a/tests/debuginfo/issue-57822.rs +++ b/tests/debuginfo/issue-57822.rs @@ -20,11 +20,11 @@ // lldb-command:run -// lldb-command:print g -// lldbg-check:(issue_57822::main::{closure_env#1}) { f = { x = 1 } } +// lldb-command:v g +// lldbg-check:(issue_57822::main::{closure_env#1}) g = { f = { x = 1 } } -// lldb-command:print b -// lldbg-check:(issue_57822::main::{coroutine_env#3}) +// lldb-command:v b +// lldbg-check:(issue_57822::main::{coroutine_env#3}) b = #![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)] #![omit_gdb_pretty_printer_section] diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs index 6d8ff2970ef14..1b1f106fecec7 100644 --- a/tests/debuginfo/lexical-scope-in-for-loop.rs +++ b/tests/debuginfo/lexical-scope-in-for-loop.rs @@ -44,40 +44,40 @@ // lldb-command:run // FIRST ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -1 // lldbr-check:(i32) x = -1 // lldb-command:continue // SECOND ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -2 // lldbr-check:(i32) x = -2 // lldb-command:continue // THIRD ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 3 // lldbr-check:(i32) x = 3 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -3 // lldbr-check:(i32) x = -3 // lldb-command:continue // AFTER LOOP -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1000000 // lldbr-check:(i32) x = 1000000 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs index 3e473acbda25e..d472a50f69774 100644 --- a/tests/debuginfo/lexical-scope-in-if.rs +++ b/tests/debuginfo/lexical-scope-in-if.rs @@ -68,73 +68,73 @@ // lldb-command:run // BEFORE if -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AT BEGINNING of 'then' block -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 1st redeclaration of 'x' -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1001 // lldbr-check:(i32) x = 1001 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // AFTER 2st redeclaration of 'x' -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1002 // lldbr-check:(i32) x = 1002 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 1003 // lldbr-check:(i32) y = 1003 // lldb-command:continue // AFTER 1st if expression -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue // BEGINNING of else branch -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1004 // lldbr-check:(i32) x = 1004 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 1005 // lldbr-check:(i32) y = 1005 // lldb-command:continue // BEGINNING of else branch -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 999 // lldbr-check:(i32) x = 999 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] -1 // lldbr-check:(i32) y = -1 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs index 0959f020ca315..d5f0fcbe89272 100644 --- a/tests/debuginfo/lexical-scope-in-match.rs +++ b/tests/debuginfo/lexical-scope-in-match.rs @@ -63,72 +63,72 @@ // lldb-command:run -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 231 // lldbr-check:(i32) shadowed = 231 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 233 // lldbr-check:(i32) shadowed = 233 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 -// lldb-command:print local_to_arm +// lldb-command:v local_to_arm // lldbg-check:[...] 234 // lldbr-check:(i32) local_to_arm = 234 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 236 // lldbr-check:(i32) shadowed = 236 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 237 // lldbr-check:(isize) shadowed = 237 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 -// lldb-command:print local_to_arm +// lldb-command:v local_to_arm // lldbg-check:[...] 238 // lldbr-check:(isize) local_to_arm = 238 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 239 // lldbr-check:(isize) shadowed = 239 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 241 // lldbr-check:(isize) shadowed = 241 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 243 // lldbr-check:(i32) shadowed = 243 -// lldb-command:print *local_to_arm +// lldb-command:v *local_to_arm // lldbg-check:[...] 244 // lldbr-check:(i32) *local_to_arm = 244 // lldb-command:continue -// lldb-command:print shadowed +// lldb-command:v shadowed // lldbg-check:[...] 231 // lldbr-check:(i32) shadowed = 231 -// lldb-command:print not_shadowed +// lldb-command:v not_shadowed // lldbg-check:[...] 232 // lldbr-check:(i32) not_shadowed = 232 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs index 4d26b2f5c9abe..92582e10c42d4 100644 --- a/tests/debuginfo/lexical-scope-in-stack-closure.rs +++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs @@ -35,32 +35,32 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1000 // lldbr-check:(isize) x = 1000 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2.5 // lldbr-check:(f64) x = 2.5 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] true // lldbr-check:(bool) x = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs index cf908b1a510a3..b1af018f3eb0a 100644 --- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -67,69 +67,69 @@ // lldb-command:run // FIRST ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 0 // lldbr-check:(i32) x = 0 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs index df8c2598e384c..a08c2af05ccbd 100644 --- a/tests/debuginfo/lexical-scope-in-unique-closure.rs +++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs @@ -35,32 +35,32 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1000 // lldbr-check:(isize) x = 1000 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2.5 // lldbr-check:(f64) x = 2.5 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] true // lldbr-check:(bool) x = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs index 98c580e479c1a..bd885b5b10c12 100644 --- a/tests/debuginfo/lexical-scope-in-while.rs +++ b/tests/debuginfo/lexical-scope-in-while.rs @@ -67,69 +67,69 @@ // lldb-command:run // FIRST ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 0 // lldbr-check:(i32) x = 0 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 101 // lldbr-check:(i32) x = 101 // lldb-command:continue // SECOND ITERATION -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 1 // lldbr-check:(i32) x = 1 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] -987 // lldbr-check:(i32) x = -987 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 102 // lldbr-check:(i32) x = 102 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 2 // lldbr-check:(i32) x = 2 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs index a38aba8b16ab7..76c923524fb58 100644 --- a/tests/debuginfo/lexical-scope-with-macro.rs +++ b/tests/debuginfo/lexical-scope-with-macro.rs @@ -56,34 +56,34 @@ // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 10 // lldbr-check:(i32) a = 10 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 890242 // lldbr-check:(i32) a = 10 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 10 // lldbr-check:(i32) a = 10 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 102 // lldbr-check:(i32) a = 10 -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 34 // lldbr-check:(i32) b = 34 // lldb-command:continue diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs index 5a82dc6e3f350..5ff70270ea62a 100644 --- a/tests/debuginfo/lexical-scopes-in-block-expression.rs +++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs @@ -194,202 +194,202 @@ // lldb-command:run // STRUCT EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 11 // lldbr-check:(isize) val = 11 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // FUNCTION CALL -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 12 // lldbr-check:(isize) val = 12 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // TUPLE EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 13 // lldbr-check:(isize) val = 13 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // VEC EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 14 // lldbr-check:(isize) val = 14 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // REPEAT VEC EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 15 // lldbr-check:(isize) val = 15 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // ASSIGNMENT EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 16 // lldbr-check:(isize) val = 16 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // ARITHMETIC EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 17 // lldbr-check:(isize) val = 17 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue // INDEX EXPRESSION -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] 18 // lldbr-check:(isize) val = 18 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue -// lldb-command:print val +// lldb-command:v val // lldbg-check:[...] -1 // lldbr-check:(i32) val = -1 -// lldb-command:print ten +// lldb-command:v ten // lldbg-check:[...] 10 // lldbr-check:(isize) ten = 10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs index f947ba350e7f9..8a57060717e47 100644 --- a/tests/debuginfo/method-on-enum.rs +++ b/tests/debuginfo/method-on-enum.rs @@ -63,47 +63,47 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldb-check:[...] Variant2(117901063) -// lldb-command:print arg1 +// lldb-command:v arg1 // lldb-check:[...] -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldb-check:[...] -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldb-check:[...] Variant2(117901063) -// lldb-command:print arg1 +// lldb-command:v arg1 // lldb-check:[...] -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldb-check:[...] -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldb-check:[...] -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldb-check:[...] -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldb-check:[...] -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldb-check:[...] -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldb-check:[...] Variant1 { x: 1799, y: 1799 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldb-check:[...] -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldb-check:[...] -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs index 16793fb9bc658..64ef0e6bb0c3b 100644 --- a/tests/debuginfo/method-on-generic-struct.rs +++ b/tests/debuginfo/method-on-generic-struct.rs @@ -64,61 +64,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] Struct<(u32, i32)> { x: (8888, -8888) } // lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) *self = { x = { = 8888 = -8888 } } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] Struct<(u32, i32)> { x: (8888, -8888) } // lldbr-check:(method_on_generic_struct::Struct<(u32, i32)>) self = { x = { = 8888 = -8888 } } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) self = Struct { x: 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] Struct { x: 1234.5 } // lldbr-check:(method_on_generic_struct::Struct) *self = Struct { x: 1234.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs index 56bcb462cb36f..a4129af542906 100644 --- a/tests/debuginfo/method-on-struct.rs +++ b/tests/debuginfo/method-on-struct.rs @@ -62,61 +62,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_struct::Struct) self = Struct { x: 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_struct::Struct) *self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs index 0264ff68d1b02..0934c267ab136 100644 --- a/tests/debuginfo/method-on-trait.rs +++ b/tests/debuginfo/method-on-trait.rs @@ -62,61 +62,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_trait::Struct) *self = { x = 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 100 } // lldbr-check:(method_on_trait::Struct) self = { x = 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) *self = { x = 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) self = { x = 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(method_on_trait::Struct) *self = { x = 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs index 872f6ea57c213..9cf9c6d7fbae9 100644 --- a/tests/debuginfo/method-on-tuple-struct.rs +++ b/tests/debuginfo/method-on-tuple-struct.rs @@ -62,61 +62,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { 0 = 100 1 = -100.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 100 1 = -100.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { 0 = 100 1 = -100.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 100 1 = -100.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 200 1 = -200.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { 0 = 200 1 = -200.5 } // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs index 42aa25c14212f..32fd68958773b 100644 --- a/tests/debuginfo/multi-cgu.rs +++ b/tests/debuginfo/multi-cgu.rs @@ -23,12 +23,12 @@ // lldb-command:run -// lldb-command:print xxx +// lldb-command:v xxx // lldbg-check:[...] 12345 // lldbr-check:(u32) xxx = 12345 // lldb-command:continue -// lldb-command:print yyy +// lldb-command:v yyy // lldbg-check:[...] 67890 // lldbr-check:(u64) yyy = 67890 // lldb-command:continue diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs index 113eac29256bd..2d9caf75290a3 100644 --- a/tests/debuginfo/multiple-functions-equal-var-names.rs +++ b/tests/debuginfo/multiple-functions-equal-var-names.rs @@ -22,17 +22,17 @@ // lldb-command:run -// lldb-command:print abc +// lldb-command:v abc // lldbg-check:[...] 10101 // lldbr-check:(i32) abc = 10101 // lldb-command:continue -// lldb-command:print abc +// lldb-command:v abc // lldbg-check:[...] 20202 // lldbr-check:(i32) abc = 20202 // lldb-command:continue -// lldb-command:print abc +// lldb-command:v abc // lldbg-check:[...] 30303 // lldbr-check:(i32) abc = 30303 diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs index 81fdc4f3d4033..5c01a42705110 100644 --- a/tests/debuginfo/multiple-functions.rs +++ b/tests/debuginfo/multiple-functions.rs @@ -22,17 +22,17 @@ // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] 10101 // lldbr-check:(i32) a = 10101 // lldb-command:continue -// lldb-command:print b +// lldb-command:v b // lldbg-check:[...] 20202 // lldbr-check:(i32) b = 20202 // lldb-command:continue -// lldb-command:print c +// lldb-command:v c // lldbg-check:[...] 30303 // lldbr-check:(i32) c = 30303 diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs index 42df966681062..8813793e59e48 100644 --- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs @@ -47,50 +47,50 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] true // lldbr-check:(bool) x = true -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 2220 // lldbr-check:(i32) y = 2220 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 203203.5 // lldbr-check:(f64) x = 203203.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 2220 // lldbr-check:(i32) y = 2220 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/no_mangle-info.rs b/tests/debuginfo/no_mangle-info.rs index 9cb42656f2a44..11b4902952838 100644 --- a/tests/debuginfo/no_mangle-info.rs +++ b/tests/debuginfo/no_mangle-info.rs @@ -10,10 +10,10 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:p TEST -// lldb-check: (unsigned long) 3735928559 -// lldb-command:p OTHER_TEST -// lldb-check: (unsigned long) 42 +// lldb-command:v TEST +// lldb-check: (unsigned long) TEST = 3735928559 +// lldb-command:v OTHER_TEST +// lldb-check: (unsigned long) no_mangle_info::namespace::OTHER_TEST::[...] = 42 // === CDB TESTS ================================================================================== // cdb-command: g diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 615f365173f53..1ff72d34fbdf2 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -202,40 +202,40 @@ // lldb-command:run -// lldb-command:print/d nz_i8 +// lldb-command:v/d nz_i8 // lldb-check:[...] 11 { __0 = { 0 = 11 } } -// lldb-command:print nz_i16 +// lldb-command:v nz_i16 // lldb-check:[...] 22 { __0 = { 0 = 22 } } -// lldb-command:print nz_i32 +// lldb-command:v nz_i32 // lldb-check:[...] 33 { __0 = { 0 = 33 } } -// lldb-command:print nz_i64 +// lldb-command:v nz_i64 // lldb-check:[...] 44 { __0 = { 0 = 44 } } -// lldb-command:print nz_i128 +// lldb-command:v nz_i128 // lldb-check:[...] 55 { __0 = { 0 = 55 } } -// lldb-command:print nz_isize +// lldb-command:v nz_isize // lldb-check:[...] 66 { __0 = { 0 = 66 } } -// lldb-command:print/d nz_u8 +// lldb-command:v/d nz_u8 // lldb-check:[...] 77 { __0 = { 0 = 77 } } -// lldb-command:print nz_u16 +// lldb-command:v nz_u16 // lldb-check:[...] 88 { __0 = { 0 = 88 } } -// lldb-command:print nz_u32 +// lldb-command:v nz_u32 // lldb-check:[...] 99 { __0 = { 0 = 99 } } -// lldb-command:print nz_u64 +// lldb-command:v nz_u64 // lldb-check:[...] 100 { __0 = { 0 = 100 } } -// lldb-command:print nz_u128 +// lldb-command:v nz_u128 // lldb-check:[...] 111 { __0 = { 0 = 111 } } -// lldb-command:print nz_usize +// lldb-command:v nz_usize // lldb-check:[...] 122 { __0 = { 0 = 122 } } #![feature(generic_nonzero)] diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs index 03646c99f6484..c782796f47316 100644 --- a/tests/debuginfo/option-like-enum.rs +++ b/tests/debuginfo/option-like-enum.rs @@ -47,34 +47,34 @@ // lldb-command:run -// lldb-command:print some +// lldb-command:v some // lldb-check:[...] Some(&0x12345678) -// lldb-command:print none +// lldb-command:v none // lldb-check:[...] None -// lldb-command:print full +// lldb-command:v full // lldb-check:[...] Full(454545, &0x87654321, 9988) -// lldb-command:print empty +// lldb-command:v empty // lldb-check:[...] Empty -// lldb-command:print droid +// lldb-command:v droid // lldb-check:[...] Droid { id: 675675, range: 10000001, internals: &0x43218765 } -// lldb-command:print void_droid +// lldb-command:v void_droid // lldb-check:[...] Void -// lldb-command:print some_str +// lldb-command:v some_str // lldb-check:[...] Some("abc") -// lldb-command:print none_str +// lldb-command:v none_str // lldb-check:[...] None -// lldb-command:print nested_non_zero_yep +// lldb-command:v nested_non_zero_yep // lldb-check:[...] Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] }) -// lldb-command:print nested_non_zero_nope +// lldb-command:v nested_non_zero_nope // lldb-check:[...] Nope diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs index b1f237db81489..f9bac84437629 100644 --- a/tests/debuginfo/packed-struct-with-destructor.rs +++ b/tests/debuginfo/packed-struct-with-destructor.rs @@ -44,35 +44,35 @@ // lldb-command:run -// lldb-command:print packed +// lldb-command:v packed // lldbg-check:[...] { x = 123 y = 234 z = 345 } // lldbr-check:(packed_struct_with_destructor::Packed) packed = { x = 123 y = 234 z = 345 } -// lldb-command:print packedInPacked +// lldb-command:v packedInPacked // lldbg-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldbr-check:(packed_struct_with_destructor::PackedInPacked) packedInPacked = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } -// lldb-command:print packedInUnpacked +// lldb-command:v packedInUnpacked // lldbg-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldbr-check:(packed_struct_with_destructor::PackedInUnpacked) packedInUnpacked = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } -// lldb-command:print unpackedInPacked +// lldb-command:v unpackedInPacked // lldbg-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } // lldbr-check:(packed_struct_with_destructor::UnpackedInPacked) unpackedInPacked = { a = 987 b = { x = 876 y = 765 z = 654 } c = { x = 543 y = 432 z = 321 } d = 210 } -// lldb-command:print packedInPackedWithDrop +// lldb-command:v packedInPackedWithDrop // lldbg-check:[...] { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } // lldbr-check:(packed_struct_with_destructor::PackedInPackedWithDrop) packedInPackedWithDrop = { a = 11 b = { x = 22 y = 33 z = 44 } c = 55 d = { x = 66 y = 77 z = 88 } } -// lldb-command:print packedInUnpackedWithDrop +// lldb-command:v packedInUnpackedWithDrop // lldbg-check:[...] { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } // lldbr-check:(packed_struct_with_destructor::PackedInUnpackedWithDrop) packedInUnpackedWithDrop = { a = -11 b = { x = -22 y = -33 z = -44 } c = -55 d = { x = -66 y = -77 z = -88 } } -// lldb-command:print unpackedInPackedWithDrop +// lldb-command:v unpackedInPackedWithDrop // lldbg-check:[...] { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } // lldbr-check:(packed_struct_with_destructor::UnpackedInPackedWithDrop) unpackedInPackedWithDrop = { a = 98 b = { x = 87 y = 76 z = 65 } c = { x = 54 y = 43 z = 32 } d = 21 } -// lldb-command:print deeplyNested +// lldb-command:v deeplyNested // lldbg-check:[...] { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } // lldbr-check:(packed_struct_with_destructor::DeeplyNested) deeplyNested = { a = { a = 1 b = { x = 2 y = 3 z = 4 } c = 5 d = { x = 6 y = 7 z = 8 } } b = { a = 9 b = { x = 10 y = 11 z = 12 } c = { x = 13 y = 14 z = 15 } d = 16 } c = { a = 17 b = { x = 18 y = 19 z = 20 } c = 21 d = { x = 22 y = 23 z = 24 } } d = { a = 25 b = { x = 26 y = 27 z = 28 } c = 29 d = { x = 30 y = 31 z = 32 } } e = { a = 33 b = { x = 34 y = 35 z = 36 } c = { x = 37 y = 38 z = 39 } d = 40 } f = { a = 41 b = { x = 42 y = 43 z = 44 } c = 45 d = { x = 46 y = 47 z = 48 } } } diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index b61da04124361..2eb5be875bc52 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -34,27 +34,27 @@ // lldb-command:run -// lldb-command:print packed +// lldb-command:v packed // lldbg-check:[...] { x = 123 y = 234 z = 345 } // lldbr-check:(packed_struct::Packed) packed = { x = 123 y = 234 z = 345 } -// lldb-command:print packedInPacked +// lldb-command:v packedInPacked // lldbg-check:[...] { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } // lldbr-check:(packed_struct::PackedInPacked) packedInPacked = { a = 1111 b = { x = 2222 y = 3333 z = 4444 } c = 5555 d = { x = 6666 y = 7777 z = 8888 } } -// lldb-command:print packedInUnpacked +// lldb-command:v packedInUnpacked // lldbg-check:[...] { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } // lldbr-check:(packed_struct::PackedInUnpacked) packedInUnpacked = { a = -1111 b = { x = -2222 y = -3333 z = -4444 } c = -5555 d = { x = -6666 y = -7777 z = -8888 } } -// lldb-command:print unpackedInPacked +// lldb-command:v unpackedInPacked // lldbg-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } // lldbr-check:(packed_struct::UnpackedInPacked) unpackedInPacked = { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } -// lldb-command:print sizeof(packed) +// lldb-command:dwim-print sizeof(packed) // lldbg-check:[...] 14 // lldbr-check:(usize) = 14 -// lldb-command:print sizeof(packedInPacked) +// lldb-command:dwim-print sizeof(packedInPacked) // lldbg-check:[...] 40 // lldbr-check:(usize) = 40 diff --git a/tests/debuginfo/pretty-std-collections.rs b/tests/debuginfo/pretty-std-collections.rs index 903a9f9a27278..e9c2c4f2a1dab 100644 --- a/tests/debuginfo/pretty-std-collections.rs +++ b/tests/debuginfo/pretty-std-collections.rs @@ -58,19 +58,19 @@ // lldb-command:run -// lldb-command:print vec_deque +// lldb-command:v vec_deque // lldbg-check:[...] size=3 { [0] = 5 [1] = 3 [2] = 7 } // lldbr-check:(alloc::collections::vec_deque::VecDeque) vec_deque = size=3 = { [0] = 5 [1] = 3 [2] = 7 } -// lldb-command:print vec_deque2 +// lldb-command:v vec_deque2 // lldbg-check:[...] size=7 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } // lldbr-check:(alloc::collections::vec_deque::VecDeque) vec_deque2 = size=7 = { [0] = 2 [1] = 3 [2] = 4 [3] = 5 [4] = 6 [5] = 7 [6] = 8 } -// lldb-command:print hash_map +// lldb-command:v hash_map // lldbg-check:[...] size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } // lldbr-check:(std::collections::hash::map::HashMap) hash_map = size=4 size=4 { [0] = { 0 = 1 1 = 10 } [1] = { 0 = 2 1 = 20 } [2] = { 0 = 3 1 = 30 } [3] = { 0 = 4 1 = 40 } } -// lldb-command:print hash_set +// lldb-command:v hash_set // lldbg-check:[...] size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } // lldbr-check:(std::collections::hash::set::HashSet) hash_set = size=4 { [0] = 1 [1] = 2 [2] = 3 [3] = 4 } diff --git a/tests/debuginfo/rc_arc.rs b/tests/debuginfo/rc_arc.rs index e340fe85e1d81..ca0feb1f465b6 100644 --- a/tests/debuginfo/rc_arc.rs +++ b/tests/debuginfo/rc_arc.rs @@ -17,9 +17,9 @@ // lldb-command:run -// lldb-command:print rc +// lldb-command:v rc // lldb-check:[...] strong=11, weak=1 { value = 111 } -// lldb-command:print arc +// lldb-command:v arc // lldb-check:[...] strong=21, weak=1 { data = 222 } // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs index b1a6aef50cb9d..339839f07cca9 100644 --- a/tests/debuginfo/reference-debuginfo.rs +++ b/tests/debuginfo/reference-debuginfo.rs @@ -59,11 +59,11 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print *bool_ref +// lldb-command:v *bool_ref // lldbg-check:[...] true // lldbr-check:(bool) *bool_ref = true -// lldb-command:print *int_ref +// lldb-command:v *int_ref // lldbg-check:[...] -1 // lldbr-check:(isize) *int_ref = -1 @@ -71,51 +71,51 @@ // lldbr-command:print *char_ref // lldbr-check:(char) *char_ref = 'a' -// lldb-command:print *i8_ref +// lldb-command:v *i8_ref // lldbg-check:[...] 'D' // lldbr-check:(i8) *i8_ref = 68 -// lldb-command:print *i16_ref +// lldb-command:v *i16_ref // lldbg-check:[...] -16 // lldbr-check:(i16) *i16_ref = -16 -// lldb-command:print *i32_ref +// lldb-command:v *i32_ref // lldbg-check:[...] -32 // lldbr-check:(i32) *i32_ref = -32 -// lldb-command:print *i64_ref +// lldb-command:v *i64_ref // lldbg-check:[...] -64 // lldbr-check:(i64) *i64_ref = -64 -// lldb-command:print *uint_ref +// lldb-command:v *uint_ref // lldbg-check:[...] 1 // lldbr-check:(usize) *uint_ref = 1 -// lldb-command:print *u8_ref +// lldb-command:v *u8_ref // lldbg-check:[...] 'd' // lldbr-check:(u8) *u8_ref = 100 -// lldb-command:print *u16_ref +// lldb-command:v *u16_ref // lldbg-check:[...] 16 // lldbr-check:(u16) *u16_ref = 16 -// lldb-command:print *u32_ref +// lldb-command:v *u32_ref // lldbg-check:[...] 32 // lldbr-check:(u32) *u32_ref = 32 -// lldb-command:print *u64_ref +// lldb-command:v *u64_ref // lldbg-check:[...] 64 // lldbr-check:(u64) *u64_ref = 64 -// lldb-command:print *f32_ref +// lldb-command:v *f32_ref // lldbg-check:[...] 2.5 // lldbr-check:(f32) *f32_ref = 2.5 -// lldb-command:print *f64_ref +// lldb-command:v *f64_ref // lldbg-check:[...] 3.5 // lldbr-check:(f64) *f64_ref = 3.5 -// lldb-command:print *f64_double_ref +// lldb-command:v *f64_double_ref // lldbg-check:[...] 3.5 // lldbr-check:(f64) **f64_double_ref = 3.5 diff --git a/tests/debuginfo/regression-bad-location-list-67992.rs b/tests/debuginfo/regression-bad-location-list-67992.rs index df1e9fb26fcea..fe410942d51ed 100644 --- a/tests/debuginfo/regression-bad-location-list-67992.rs +++ b/tests/debuginfo/regression-bad-location-list-67992.rs @@ -10,7 +10,7 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:(regression_bad_location_list_67992::Foo) [...] // lldbr-check:(regression_bad_location_list_67992::Foo) a = [...] diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs index 9a4ecee4bf6d3..374951475fc07 100644 --- a/tests/debuginfo/self-in-default-method.rs +++ b/tests/debuginfo/self-in-default-method.rs @@ -62,61 +62,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 100 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -2 // lldbr-check:(isize) arg2 = -2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 100 } // lldbr-check:(self_in_default_method::Struct) self = Struct { x: 100 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(isize) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(isize) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(isize) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 200 } // lldbr-check:(self_in_default_method::Struct) *self = Struct { x: 200 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10 // lldbr-check:(isize) arg2 = -10 // lldb-command:continue diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs index a21280620b5f3..4759ca3ecdc0a 100644 --- a/tests/debuginfo/self-in-generic-default-method.rs +++ b/tests/debuginfo/self-in-generic-default-method.rs @@ -62,61 +62,61 @@ // lldb-command:run // STACK BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 987 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 987 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -1 // lldbr-check:(isize) arg1 = -1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] 2 // lldbr-check:(u16) arg2 = 2 // lldb-command:continue // STACK BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 987 } // lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 987 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -4 // lldbr-check:(i16) arg2 = -4 // lldb-command:continue // OWNED BY REF -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -5 // lldbr-check:(isize) arg1 = -5 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -6 // lldbr-check:(i32) arg2 = -6 // lldb-command:continue // OWNED BY VAL -// lldb-command:print self +// lldb-command:v self // lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) self = Struct { x: 879 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -7 // lldbr-check:(isize) arg1 = -7 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -8 // lldbr-check:(i64) arg2 = -8 // lldb-command:continue // OWNED MOVED -// lldb-command:print *self +// lldb-command:v *self // lldbg-check:[...] { x = 879 } // lldbr-check:(self_in_generic_default_method::Struct) *self = Struct { x: 879 } -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -9 // lldbr-check:(isize) arg1 = -9 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] -10.5 // lldbr-check:(f32) arg2 = -10.5 // lldb-command:continue diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs index 2be8cbbdfebe4..e7bc731336e59 100644 --- a/tests/debuginfo/shadowed-argument.rs +++ b/tests/debuginfo/shadowed-argument.rs @@ -29,26 +29,26 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs index 66cadf2913bbd..3cc5fe14cb2b9 100644 --- a/tests/debuginfo/shadowed-variable.rs +++ b/tests/debuginfo/shadowed-variable.rs @@ -39,42 +39,42 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] true // lldbr-check:(bool) y = true // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 11.5 // lldbr-check:(f64) x = 11.5 -// lldb-command:print y +// lldb-command:v y // lldbg-check:[...] 20 // lldbr-check:(i32) y = 20 // lldb-command:continue diff --git a/tests/debuginfo/should-fail.rs b/tests/debuginfo/should-fail.rs index 4211baeee22d8..0f153394a4422 100644 --- a/tests/debuginfo/should-fail.rs +++ b/tests/debuginfo/should-fail.rs @@ -16,7 +16,7 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldb-check:[...] 5 // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs index dfcd701017ecb..4156e68f8b13c 100644 --- a/tests/debuginfo/simple-lexical-scope.rs +++ b/tests/debuginfo/simple-lexical-scope.rs @@ -39,37 +39,37 @@ // lldb-command:run -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10.5 // lldbr-check:(f64) x = 10.5 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] 10 // lldbr-check:(i32) x = 10 // lldb-command:continue -// lldb-command:print x +// lldb-command:v x // lldbg-check:[...] false // lldbr-check:(bool) x = false // lldb-command:continue diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs index 89c0cb491bfdf..968a5c63e89a3 100644 --- a/tests/debuginfo/simple-struct.rs +++ b/tests/debuginfo/simple-struct.rs @@ -97,27 +97,27 @@ // lldb-command:run -// lldb-command:print no_padding16 +// lldb-command:v no_padding16 // lldbg-check:[...] { x = 10000 y = -10001 } // lldbr-check:(simple_struct::NoPadding16) no_padding16 = { x = 10000 y = -10001 } -// lldb-command:print no_padding32 +// lldb-command:v no_padding32 // lldbg-check:[...] { x = -10002 y = -10003.5 z = 10004 } // lldbr-check:(simple_struct::NoPadding32) no_padding32 = { x = -10002 y = -10003.5 z = 10004 } -// lldb-command:print no_padding64 +// lldb-command:v no_padding64 // lldbg-check:[...] { x = -10005.5 y = 10006 z = 10007 } // lldbr-check:(simple_struct::NoPadding64) no_padding64 = { x = -10005.5 y = 10006 z = 10007 } -// lldb-command:print no_padding163264 +// lldb-command:v no_padding163264 // lldbg-check:[...] { a = -10008 b = 10009 c = 10010 d = 10011 } // lldbr-check:(simple_struct::NoPadding163264) no_padding163264 = { a = -10008 b = 10009 c = 10010 d = 10011 } -// lldb-command:print internal_padding +// lldb-command:v internal_padding // lldbg-check:[...] { x = 10012 y = -10013 } // lldbr-check:(simple_struct::InternalPadding) internal_padding = { x = 10012 y = -10013 } -// lldb-command:print padding_at_end +// lldb-command:v padding_at_end // lldbg-check:[...] { x = -10014 y = 10015 } // lldbr-check:(simple_struct::PaddingAtEnd) padding_at_end = { x = -10014 y = 10015 } diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs index 93f56d117ad84..86003105f360e 100644 --- a/tests/debuginfo/simple-tuple.rs +++ b/tests/debuginfo/simple-tuple.rs @@ -99,27 +99,27 @@ // lldb-command:run -// lldb-command:print/d noPadding8 +// lldb-command:v/d noPadding8 // lldbg-check:[...] { 0 = -100 1 = 100 } // lldbr-check:((i8, u8)) noPadding8 = { 0 = -100 1 = 100 } -// lldb-command:print noPadding16 +// lldb-command:v noPadding16 // lldbg-check:[...] { 0 = 0 1 = 1 2 = 2 } // lldbr-check:((i16, i16, u16)) noPadding16 = { 0 = 0 1 = 1 2 = 2 } -// lldb-command:print noPadding32 +// lldb-command:v noPadding32 // lldbg-check:[...] { 0 = 3 1 = 4.5 2 = 5 } // lldbr-check:((i32, f32, u32)) noPadding32 = { 0 = 3 1 = 4.5 2 = 5 } -// lldb-command:print noPadding64 +// lldb-command:v noPadding64 // lldbg-check:[...] { 0 = 6 1 = 7.5 2 = 8 } // lldbr-check:((i64, f64, u64)) noPadding64 = { 0 = 6 1 = 7.5 2 = 8 } -// lldb-command:print internalPadding1 +// lldb-command:v internalPadding1 // lldbg-check:[...] { 0 = 9 1 = 10 } // lldbr-check:((i16, i32)) internalPadding1 = { 0 = 9 1 = 10 } -// lldb-command:print internalPadding2 +// lldb-command:v internalPadding2 // lldbg-check:[...] { 0 = 11 1 = 12 2 = 13 3 = 14 } // lldbr-check:((i16, i32, u32, u64)) internalPadding2 = { 0 = 11 1 = 12 2 = 13 3 = 14 } -// lldb-command:print paddingAtEnd +// lldb-command:v paddingAtEnd // lldbg-check:[...] { 0 = 15 1 = 16 } // lldbr-check:((i32, i16)) paddingAtEnd = { 0 = 15 1 = 16 } diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs index 23384e0c33a7d..b4ec454357267 100644 --- a/tests/debuginfo/static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/static-method-on-struct-and-enum.rs @@ -28,22 +28,22 @@ // lldb-command:run // STRUCT -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] 1 // lldbr-check:(isize) arg1 = 1 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] 2 // lldbr-check:(isize) arg2 = 2 // lldb-command:continue // ENUM -// lldb-command:print arg1 +// lldb-command:v arg1 // lldbg-check:[...] -3 // lldbr-check:(isize) arg1 = -3 -// lldb-command:print arg2 +// lldb-command:v arg2 // lldbg-check:[...] 4.5 // lldbr-check:(f64) arg2 = 4.5 -// lldb-command:print arg3 +// lldb-command:v arg3 // lldbg-check:[...] 5 // lldbr-check:(usize) arg3 = 5 // lldb-command:continue diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs index a91f24a3f5c89..52e419e6b4745 100644 --- a/tests/debuginfo/struct-in-enum.rs +++ b/tests/debuginfo/struct-in-enum.rs @@ -26,12 +26,12 @@ // lldb-command:run -// lldb-command:print case1 +// lldb-command:v case1 // lldb-check:[...] Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }) -// lldb-command:print case2 +// lldb-command:v case2 // lldb-check:[...] Case2(0, 1229782938247303441, 4369) -// lldb-command:print univariant +// lldb-command:v univariant // lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs index e88d955b6e970..7ca0e3a5ef63c 100644 --- a/tests/debuginfo/struct-in-struct.rs +++ b/tests/debuginfo/struct-in-struct.rs @@ -23,35 +23,35 @@ // lldb-command:run -// lldb-command:print three_simple_structs +// lldb-command:v three_simple_structs // lldbg-check:[...] { x = { x = 1 } y = { x = 2 } z = { x = 3 } } // lldbr-check:(struct_in_struct::ThreeSimpleStructs) three_simple_structs = { x = { x = 1 } y = { x = 2 } z = { x = 3 } } -// lldb-command:print internal_padding_parent +// lldb-command:v internal_padding_parent // lldbg-check:[...] { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } // lldbr-check:(struct_in_struct::InternalPaddingParent) internal_padding_parent = { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } } -// lldb-command:print padding_at_end_parent +// lldb-command:v padding_at_end_parent // lldbg-check:[...] { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } // lldbr-check:(struct_in_struct::PaddingAtEndParent) padding_at_end_parent = { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } } -// lldb-command:print mixed +// lldb-command:v mixed // lldbg-check:[...] { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } // lldbr-check:(struct_in_struct::Mixed) mixed = { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 } -// lldb-command:print bag +// lldb-command:v bag // lldbg-check:[...] { x = { x = 22 } } // lldbr-check:(struct_in_struct::Bag) bag = { x = { x = 22 } } -// lldb-command:print bag_in_bag +// lldb-command:v bag_in_bag // lldbg-check:[...] { x = { x = { x = 23 } } } // lldbr-check:(struct_in_struct::BagInBag) bag_in_bag = { x = { x = { x = 23 } } } -// lldb-command:print tjo +// lldb-command:v tjo // lldbg-check:[...] { x = { x = { x = { x = 24 } } } } // lldbr-check:(struct_in_struct::ThatsJustOverkill) tjo = { x = { x = { x = { x = 24 } } } } -// lldb-command:print tree +// lldb-command:v tree // lldbg-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } // lldbr-check:(struct_in_struct::Tree) tree = { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs index d641a788a6fa6..3cae51e83ddbd 100644 --- a/tests/debuginfo/struct-namespace.rs +++ b/tests/debuginfo/struct-namespace.rs @@ -5,17 +5,17 @@ // Check that structs get placed in the correct namespace // lldb-command:run -// lldb-command:p struct1 +// lldb-command:v struct1 // lldbg-check:(struct_namespace::Struct1)[...] // lldbr-check:(struct_namespace::Struct1) struct1 = Struct1 { a: 0, b: 1 } -// lldb-command:p struct2 +// lldb-command:v struct2 // lldbg-check:(struct_namespace::Struct2)[...] // lldbr-check:(struct_namespace::Struct2) struct2 = { = 2 } -// lldb-command:p mod1_struct1 +// lldb-command:v mod1_struct1 // lldbg-check:(struct_namespace::mod1::Struct1)[...] // lldbr-check:(struct_namespace::mod1::Struct1) mod1_struct1 = Struct1 { a: 3, b: 4 } -// lldb-command:p mod1_struct2 +// lldb-command:v mod1_struct2 // lldbg-check:(struct_namespace::mod1::Struct2)[...] // lldbr-check:(struct_namespace::mod1::Struct2) mod1_struct2 = { = 5 } diff --git a/tests/debuginfo/struct-style-enum.rs b/tests/debuginfo/struct-style-enum.rs index 2f155d2b83ee6..517b76c14120b 100644 --- a/tests/debuginfo/struct-style-enum.rs +++ b/tests/debuginfo/struct-style-enum.rs @@ -26,16 +26,16 @@ // lldb-command:run -// lldb-command:print case1 +// lldb-command:v case1 // lldbr-check:(struct_style_enum::Regular::Case1) case1 = { a = 0 b = 31868 c = 31868 d = 31868 e = 31868 } -// lldb-command:print case2 +// lldb-command:v case2 // lldbr-check:(struct_style_enum::Regular::Case2) case2 = Case2 { Case1: 0, Case2: 286331153, Case3: 286331153 } -// lldb-command:print case3 +// lldb-command:v case3 // lldbr-check:(struct_style_enum::Regular::Case3) case3 = Case3 { Case1: 0, Case2: 6438275382588823897 } -// lldb-command:print univariant +// lldb-command:v univariant // lldbr-check:(struct_style_enum::Univariant) univariant = Univariant { TheOnlyCase: TheOnlyCase { a: -1 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs index d6686be662cd7..12e2ac4225c06 100644 --- a/tests/debuginfo/struct-with-destructor.rs +++ b/tests/debuginfo/struct-with-destructor.rs @@ -25,19 +25,19 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print simple +// lldb-command:v simple // lldbg-check:[...] { x = 10 y = 20 } // lldbr-check:(struct_with_destructor::WithDestructor) simple = { x = 10 y = 20 } -// lldb-command:print noDestructor +// lldb-command:v noDestructor // lldbg-check:[...] { a = { x = 10 y = 20 } guard = -1 } // lldbr-check:(struct_with_destructor::NoDestructorGuarded) noDestructor = { a = { x = 10 y = 20 } guard = -1 } -// lldb-command:print withDestructor +// lldb-command:v withDestructor // lldbg-check:[...] { a = { x = 10 y = 20 } guard = -1 } // lldbr-check:(struct_with_destructor::WithDestructorGuarded) withDestructor = { a = { x = 10 y = 20 } guard = -1 } -// lldb-command:print nested +// lldb-command:v nested // lldbg-check:[...] { a = { a = { x = 7890 y = 9870 } } } // lldbr-check:(struct_with_destructor::NestedOuter) nested = { a = { a = { x = 7890 y = 9870 } } } diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs index b6b20cea9b629..8ed0e1f9c13b7 100644 --- a/tests/debuginfo/tuple-in-tuple.rs +++ b/tests/debuginfo/tuple-in-tuple.rs @@ -35,27 +35,27 @@ // lldb-command:run -// lldb-command:print no_padding1 +// lldb-command:v no_padding1 // lldbg-check:[...] { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } // lldbr-check:(((u32, u32), u32, u32)) no_padding1 = { 0 = { 0 = 0 1 = 1 } 1 = 2 2 = 3 } -// lldb-command:print no_padding2 +// lldb-command:v no_padding2 // lldbg-check:[...] { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } // lldbr-check:((u32, (u32, u32), u32)) no_padding2 = { 0 = 4 1 = { 0 = 5 1 = 6 } 2 = 7 } -// lldb-command:print no_padding3 +// lldb-command:v no_padding3 // lldbg-check:[...] { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } // lldbr-check:((u32, u32, (u32, u32))) no_padding3 = { 0 = 8 1 = 9 2 = { 0 = 10 1 = 11 } } -// lldb-command:print internal_padding1 +// lldb-command:v internal_padding1 // lldbg-check:[...] { 0 = 12 1 = { 0 = 13 1 = 14 } } // lldbr-check:((i16, (i32, i32))) internal_padding1 = { 0 = 12 1 = { 0 = 13 1 = 14 } } -// lldb-command:print internal_padding2 +// lldb-command:v internal_padding2 // lldbg-check:[...] { 0 = 15 1 = { 0 = 16 1 = 17 } } // lldbr-check:((i16, (i16, i32))) internal_padding2 = { 0 = 15 1 = { 0 = 16 1 = 17 } } -// lldb-command:print padding_at_end1 +// lldb-command:v padding_at_end1 // lldbg-check:[...] { 0 = 18 1 = { 0 = 19 1 = 20 } } // lldbr-check:((i32, (i32, i16))) padding_at_end1 = { 0 = 18 1 = { 0 = 19 1 = 20 } } -// lldb-command:print padding_at_end2 +// lldb-command:v padding_at_end2 // lldbg-check:[...] { 0 = { 0 = 21 1 = 22 } 1 = 23 } // lldbr-check:(((i32, i16), i32)) padding_at_end2 = { 0 = { 0 = 21 1 = 22 } 1 = 23 } diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs index e912f63a8b2d9..88b1ae19e2959 100644 --- a/tests/debuginfo/tuple-struct.rs +++ b/tests/debuginfo/tuple-struct.rs @@ -35,27 +35,27 @@ // lldb-command:run -// lldb-command:print no_padding16 +// lldb-command:v no_padding16 // lldbg-check:[...] { 0 = 10000 1 = -10001 } // lldbr-check:(tuple_struct::NoPadding16) no_padding16 = { 0 = 10000 1 = -10001 } -// lldb-command:print no_padding32 +// lldb-command:v no_padding32 // lldbg-check:[...] { 0 = -10002 1 = -10003.5 2 = 10004 } // lldbr-check:(tuple_struct::NoPadding32) no_padding32 = { 0 = -10002 1 = -10003.5 2 = 10004 } -// lldb-command:print no_padding64 +// lldb-command:v no_padding64 // lldbg-check:[...] { 0 = -10005.5 1 = 10006 2 = 10007 } // lldbr-check:(tuple_struct::NoPadding64) no_padding64 = { 0 = -10005.5 1 = 10006 2 = 10007 } -// lldb-command:print no_padding163264 +// lldb-command:v no_padding163264 // lldbg-check:[...] { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } // lldbr-check:(tuple_struct::NoPadding163264) no_padding163264 = { 0 = -10008 1 = 10009 2 = 10010 3 = 10011 } -// lldb-command:print internal_padding +// lldb-command:v internal_padding // lldbg-check:[...] { 0 = 10012 1 = -10013 } // lldbr-check:(tuple_struct::InternalPadding) internal_padding = { 0 = 10012 1 = -10013 } -// lldb-command:print padding_at_end +// lldb-command:v padding_at_end // lldbg-check:[...] { 0 = -10014 1 = 10015 } // lldbr-check:(tuple_struct::PaddingAtEnd) padding_at_end = { 0 = -10014 1 = 10015 } diff --git a/tests/debuginfo/tuple-style-enum.rs b/tests/debuginfo/tuple-style-enum.rs index e3e1684cc28a4..883aa658eb2c7 100644 --- a/tests/debuginfo/tuple-style-enum.rs +++ b/tests/debuginfo/tuple-style-enum.rs @@ -26,16 +26,16 @@ // lldb-command:run -// lldb-command:print case1 +// lldb-command:v case1 // lldbr-check:(tuple_style_enum::Regular::Case1) case1 = { = 0 = 31868 = 31868 = 31868 = 31868 } -// lldb-command:print case2 +// lldb-command:v case2 // lldbr-check:(tuple_style_enum::Regular::Case2) case2 = Case2 { Case1: 0, Case2: 286331153, Case3: 286331153 } -// lldb-command:print case3 +// lldb-command:v case3 // lldbr-check:(tuple_style_enum::Regular::Case3) case3 = Case3 { Case1: 0, Case2: 6438275382588823897 } -// lldb-command:print univariant +// lldb-command:v univariant // lldbr-check:(tuple_style_enum::Univariant) univariant = { TheOnlyCase = { = -1 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs index 8df4c9dbf96a6..9b1cf6e1e95c9 100644 --- a/tests/debuginfo/union-smoke.rs +++ b/tests/debuginfo/union-smoke.rs @@ -18,7 +18,7 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print u +// lldb-command:v u // lldbg-check:[...] { a = { 0 = '\x02' 1 = '\x02' } b = 514 } // lldbr-check:(union_smoke::U) u = { a = { 0 = '\x02' 1 = '\x02' } b = 514 } diff --git a/tests/debuginfo/unique-enum.rs b/tests/debuginfo/unique-enum.rs index db2b4403ec660..b3879468e0a98 100644 --- a/tests/debuginfo/unique-enum.rs +++ b/tests/debuginfo/unique-enum.rs @@ -22,13 +22,13 @@ // lldb-command:run -// lldb-command:print *the_a +// lldb-command:v *the_a // lldbr-check:(unique_enum::ABC::TheA) *the_a = TheA { TheA: 0, TheB: 8970181431921507452 } -// lldb-command:print *the_b +// lldb-command:v *the_b // lldbr-check:(unique_enum::ABC::TheB) *the_b = { = 0 = 286331153 = 286331153 } -// lldb-command:print *univariant +// lldb-command:v *univariant // lldbr-check:(unique_enum::Univariant) *univariant = { TheOnlyCase = { = 123234 } } #![allow(unused_variables)] diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs index 62cb87e4f994b..7772ec0033782 100644 --- a/tests/debuginfo/var-captured-in-nested-closure.rs +++ b/tests/debuginfo/var-captured-in-nested-closure.rs @@ -43,42 +43,42 @@ // lldb-command:run -// lldb-command:print variable +// lldb-command:v variable // lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 -// lldb-command:print constant +// lldb-command:v constant // lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 -// lldb-command:print a_struct +// lldb-command:v a_struct // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *struct_ref +// lldb-command:v *struct_ref // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *owned +// lldb-command:v *owned // lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 -// lldb-command:print closure_local +// lldb-command:v closure_local // lldbg-check:[...] 8 // lldbr-check:(isize) closure_local = 8 // lldb-command:continue -// lldb-command:print variable +// lldb-command:v variable // lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 -// lldb-command:print constant +// lldb-command:v constant // lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 -// lldb-command:print a_struct +// lldb-command:v a_struct // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *struct_ref +// lldb-command:v *struct_ref // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_nested_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *owned +// lldb-command:v *owned // lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 -// lldb-command:print closure_local +// lldb-command:v closure_local // lldbg-check:[...] 8 // lldbr-check:(isize) closure_local = 8 // lldb-command:continue diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index e2e154e91cb43..782a7d1137381 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -23,13 +23,13 @@ // lldb-command:run -// lldb-command:print constant +// lldb-command:v constant // lldbg-check:[...] 1 // lldbr-check:(isize) constant = 1 -// lldb-command:print a_struct +// lldb-command:v a_struct // lldbg-check:[...] { a = -2 b = 3.5 c = 4 } // lldbr-check:(var_captured_in_sendable_closure::Struct) a_struct = { a = -2 b = 3.5 c = 4 } -// lldb-command:print *owned +// lldb-command:v *owned // lldbg-check:[...] 5 // lldbr-check:(isize) *owned = 5 diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs index c704b53ef853a..c9a93cd7b7f9a 100644 --- a/tests/debuginfo/var-captured-in-stack-closure.rs +++ b/tests/debuginfo/var-captured-in-stack-closure.rs @@ -39,37 +39,37 @@ // lldb-command:run -// lldb-command:print variable +// lldb-command:v variable // lldbg-check:[...] 1 // lldbr-check:(isize) variable = 1 -// lldb-command:print constant +// lldb-command:v constant // lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 -// lldb-command:print a_struct +// lldb-command:v a_struct // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *struct_ref +// lldb-command:v *struct_ref // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *owned +// lldb-command:v *owned // lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 // lldb-command:continue -// lldb-command:print variable +// lldb-command:v variable // lldbg-check:[...] 2 // lldbr-check:(isize) variable = 2 -// lldb-command:print constant +// lldb-command:v constant // lldbg-check:[...] 2 // lldbr-check:(isize) constant = 2 -// lldb-command:print a_struct +// lldb-command:v a_struct // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) a_struct = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *struct_ref +// lldb-command:v *struct_ref // lldbg-check:[...] { a = -3 b = 4.5 c = 5 } // lldbr-check:(var_captured_in_stack_closure::Struct) *struct_ref = { a = -3 b = 4.5 c = 5 } -// lldb-command:print *owned +// lldb-command:v *owned // lldbg-check:[...] 6 // lldbr-check:(isize) *owned = 6 diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index bf3cad30faf92..5a8481699b2ed 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -70,27 +70,27 @@ // lldb-command:run -// lldb-command:print empty +// lldb-command:v empty // lldbg-check:[...] size=0 // lldbr-check:(&[i64]) empty = size=0 -// lldb-command:print singleton +// lldb-command:v singleton // lldbg-check:[...] size=1 { [0] = 1 } // lldbr-check:(&[i64]) singleton = &[1] -// lldb-command:print multiple +// lldb-command:v multiple // lldbg-check:[...] size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } // lldbr-check:(&[i64]) multiple = size=4 { [0] = 2 [1] = 3 [2] = 4 [3] = 5 } -// lldb-command:print slice_of_slice +// lldb-command:v slice_of_slice // lldbg-check:[...] size=2 { [0] = 3 [1] = 4 } // lldbr-check:(&[i64]) slice_of_slice = size=2 { [0] = 3 [1] = 4 } -// lldb-command:print padded_tuple +// lldb-command:v padded_tuple // lldbg-check:[...] size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } // lldbr-check:(&[(i32, i16)]) padded_tuple = size=2 { [0] = { 0 = 6 1 = 7 } [1] = { 0 = 8 1 = 9 } } -// lldb-command:print padded_struct +// lldb-command:v padded_struct // lldbg-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } // lldbr-check:(&[vec_slices::AStruct]) padded_struct = size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs index 0ac2f2acb596e..cf7de0b9b5519 100644 --- a/tests/debuginfo/vec.rs +++ b/tests/debuginfo/vec.rs @@ -17,7 +17,7 @@ // === LLDB TESTS ================================================================================== // lldb-command:run -// lldb-command:print a +// lldb-command:v a // lldbg-check:[...] { [0] = 1 [1] = 2 [2] = 3 } // lldbr-check:([i32; 3]) a = { [0] = 1 [1] = 2 [2] = 3 } From 3ee1219088a17c911f91dabb8167e8f0de63f246 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 15 Mar 2024 20:30:45 +0100 Subject: [PATCH 13/14] Fix remaining LLDB commands. --- tests/debuginfo/empty-string.rs | 6 +++--- tests/debuginfo/no_mangle-info.rs | 4 ++-- tests/debuginfo/pretty-slices.rs | 18 +++++++++--------- tests/debuginfo/pretty-std.rs | 30 +++++++++++++++--------------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/debuginfo/empty-string.rs b/tests/debuginfo/empty-string.rs index 2afdfc8ad04ba..36240730e1986 100644 --- a/tests/debuginfo/empty-string.rs +++ b/tests/debuginfo/empty-string.rs @@ -17,12 +17,12 @@ // === LLDB TESTS ================================================================================== -// lldb-command: run +// lldb-command:run -// lldb-command: fr v empty_string +// lldb-command:fr v empty_string // lldb-check:[...] empty_string = "" { vec = size=0 } -// lldb-command: fr v empty_str +// lldb-command:fr v empty_str // lldb-check:[...] empty_str = "" { data_ptr = [...] length = 0 } fn main() { diff --git a/tests/debuginfo/no_mangle-info.rs b/tests/debuginfo/no_mangle-info.rs index 11b4902952838..06c65a71b2e91 100644 --- a/tests/debuginfo/no_mangle-info.rs +++ b/tests/debuginfo/no_mangle-info.rs @@ -11,9 +11,9 @@ // === LLDB TESTS ================================================================================== // lldb-command:run // lldb-command:v TEST -// lldb-check: (unsigned long) TEST = 3735928559 +// lldb-check:(unsigned long) TEST = 3735928559 // lldb-command:v OTHER_TEST -// lldb-check: (unsigned long) no_mangle_info::namespace::OTHER_TEST::[...] = 42 +// lldb-check:(unsigned long) no_mangle_info::namespace::OTHER_TEST::[...] = 42 // === CDB TESTS ================================================================================== // cdb-command: g diff --git a/tests/debuginfo/pretty-slices.rs b/tests/debuginfo/pretty-slices.rs index 4507453a10704..5d2086fa478ac 100644 --- a/tests/debuginfo/pretty-slices.rs +++ b/tests/debuginfo/pretty-slices.rs @@ -18,19 +18,19 @@ // gdb-command: print mut_str_slice // gdb-check: $4 = "mutable string slice" -// lldb-command: run +// lldb-command:run -// lldb-command: print slice -// lldb-check: (&[i32]) size=3 { [0] = 0 [1] = 1 [2] = 2 } +// lldb-command:v slice +// lldb-check:(&[i32]) slice = size=3 { [0] = 0 [1] = 1 [2] = 2 } -// lldb-command: print mut_slice -// lldb-check: (&mut [i32]) size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } +// lldb-command:v mut_slice +// lldb-check:(&mut [i32]) mut_slice = size=4 { [0] = 2 [1] = 3 [2] = 5 [3] = 7 } -// lldb-command: print str_slice -// lldb-check: (&str) "string slice" { data_ptr = [...] length = 12 } +// lldb-command:v str_slice +// lldb-check:(&str) str_slice = "string slice" { data_ptr = [...] length = 12 } -// lldb-command: print mut_str_slice -// lldb-check: (&mut str) "mutable string slice" { data_ptr = [...] length = 20 } +// lldb-command:v mut_str_slice +// lldb-check:(&mut str) mut_str_slice = "mutable string slice" { data_ptr = [...] length = 20 } fn b() {} diff --git a/tests/debuginfo/pretty-std.rs b/tests/debuginfo/pretty-std.rs index 74eba9af78614..70827d551ca39 100644 --- a/tests/debuginfo/pretty-std.rs +++ b/tests/debuginfo/pretty-std.rs @@ -42,28 +42,28 @@ // === LLDB TESTS ================================================================================== -// lldb-command: run +// lldb-command:run -// lldb-command: print slice -// lldb-check:[...] &[0, 1, 2, 3] +// lldb-command:v slice +// lldb-check:[...] slice = &[0, 1, 2, 3] -// lldb-command: print vec -// lldb-check:[...] vec![4, 5, 6, 7] +// lldb-command:v vec +// lldb-check:[...] vec = vec![4, 5, 6, 7] -// lldb-command: print str_slice -// lldb-check:[...] "IAMA string slice!" +// lldb-command:v str_slice +// lldb-check:[...] str_slice = "IAMA string slice!" -// lldb-command: print string -// lldb-check:[...] "IAMA string!" +// lldb-command:v string +// lldb-check:[...] string = "IAMA string!" -// lldb-command: print some -// lldb-check:[...] Some(8) +// lldb-command:v some +// lldb-check:[...] some = Some(8) -// lldb-command: print none -// lldb-check:[...] None +// lldb-command:v none +// lldb-check:[...] none = None -// lldb-command: print os_string -// lldb-check:[...] "IAMA OS string 😃"[...] +// lldb-command:v os_string +// lldb-check:[...] os_string = "IAMA OS string 😃"[...] // === CDB TESTS ================================================================================== From e4b27a2a5b16641f08176f0697ed9373ccaf9c21 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 15 Mar 2024 21:08:06 +0100 Subject: [PATCH 14/14] Fix unknown `dwim-print` command. --- tests/debuginfo/packed-struct.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index 2eb5be875bc52..ea9aa22ba5501 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -50,13 +50,13 @@ // lldbg-check:[...] { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } // lldbr-check:(packed_struct::UnpackedInPacked) unpackedInPacked = { a = 987 b = { x = 876 y = 765 z = 654 w = 543 } c = { x = 432 y = 321 z = 210 w = 109 } d = -98 } -// lldb-command:dwim-print sizeof(packed) +// lldb-command:expr sizeof(packed) // lldbg-check:[...] 14 -// lldbr-check:(usize) = 14 +// lldbr-check:(usize) [...] 14 -// lldb-command:dwim-print sizeof(packedInPacked) +// lldb-command:expr sizeof(packedInPacked) // lldbg-check:[...] 40 -// lldbr-check:(usize) = 40 +// lldbr-check:(usize) [...] 40 #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)]