Skip to content

Commit

Permalink
Use explicit LLDB commands instead of print/p aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Mar 15, 2024
1 parent 2047e84 commit 96431e4
Show file tree
Hide file tree
Showing 89 changed files with 830 additions and 838 deletions.
18 changes: 9 additions & 9 deletions tests/debuginfo/associated-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32>) 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
Expand Down
26 changes: 13 additions & 13 deletions tests/debuginfo/basic-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,48 +50,48 @@
// === 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

// NOTE: only rust-enabled lldb supports 32bit chars
// 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

Expand Down
26 changes: 13 additions & 13 deletions tests/debuginfo/borrowed-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,59 +52,59 @@
// === 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

// NOTE: only rust-enabled lldb supports 32bit chars
// lldbr-command:print *char_ref
// lldbr-check:(char) *char_ref = 'a'

// lldb-command:print *i8_ref
// lldb-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

Expand Down
6 changes: 3 additions & 3 deletions tests/debuginfo/borrowed-c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tests/debuginfo/borrowed-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
14 changes: 7 additions & 7 deletions tests/debuginfo/borrowed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tests/debuginfo/borrowed-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
26 changes: 13 additions & 13 deletions tests/debuginfo/borrowed-unique-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,59 +55,59 @@
// 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

// NOTE: only rust-enabled lldb supports 32bit chars
// lldbr-command:print *char_ref
// lldbr-check:(char) *char_ref = 97

// lldb-command:print *i8_ref
// lldb-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

Expand Down
4 changes: 2 additions & 2 deletions tests/debuginfo/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
4 changes: 2 additions & 2 deletions tests/debuginfo/boxed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
Loading

0 comments on commit 96431e4

Please sign in to comment.