]> git.proxmox.com Git - rustc.git/blobdiff - src/test/debuginfo/vec-slices.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / test / debuginfo / vec-slices.rs
index 0d396c885eb85f2efbad184cc3e3ee9846702d04..5553f8427e90fe97d5e2b78575a14c274614997a 100644 (file)
 
 // gdb-command:print singleton.length
 // gdb-check:$2 = 1
-// gdb-command:print *((int64_t[1]*)(singleton.data_ptr))
-// gdb-check:$3 = {1}
+// gdbg-command:print *((int64_t[1]*)(singleton.data_ptr))
+// gdbr-command:print *(singleton.data_ptr as &[i64; 1])
+// gdbg-check:$3 = {1}
+// gdbr-check:$3 = [1]
 
 // gdb-command:print multiple.length
 // gdb-check:$4 = 4
-// gdb-command:print *((int64_t[4]*)(multiple.data_ptr))
-// gdb-check:$5 = {2, 3, 4, 5}
+// gdbg-command:print *((int64_t[4]*)(multiple.data_ptr))
+// gdbr-command:print *(multiple.data_ptr as &[i64; 4])
+// gdbg-check:$5 = {2, 3, 4, 5}
+// gdbr-check:$5 = [2, 3, 4, 5]
 
 // gdb-command:print slice_of_slice.length
 // gdb-check:$6 = 2
-// gdb-command:print *((int64_t[2]*)(slice_of_slice.data_ptr))
-// gdb-check:$7 = {3, 4}
+// gdbg-command:print *((int64_t[2]*)(slice_of_slice.data_ptr))
+// gdbr-command:print *(slice_of_slice.data_ptr as &[i64; 2])
+// gdbg-check:$7 = {3, 4}
+// gdbr-check:$7 = [3, 4]
 
 // gdb-command:print padded_tuple.length
 // gdb-check:$8 = 2
 // gdb-command:print padded_tuple.data_ptr[0]
-// gdb-check:$9 = {__0 = 6, __1 = 7}
+// gdbg-check:$9 = {__0 = 6, __1 = 7}
+// gdbr-check:$9 = (6, 7)
 // gdb-command:print padded_tuple.data_ptr[1]
-// gdb-check:$10 = {__0 = 8, __1 = 9}
+// gdbg-check:$10 = {__0 = 8, __1 = 9}
+// gdbr-check:$10 = (8, 9)
 
 // gdb-command:print padded_struct.length
 // gdb-check:$11 = 2
 // gdb-command:print padded_struct.data_ptr[0]
-// gdb-check:$12 = {x = 10, y = 11, z = 12}
+// gdbg-check:$12 = {x = 10, y = 11, z = 12}
+// gdbr-check:$12 = vec_slices::AStruct {x: 10, y: 11, z: 12}
 // gdb-command:print padded_struct.data_ptr[1]
-// gdb-check:$13 = {x = 13, y = 14, z = 15}
+// gdbg-check:$13 = {x = 13, y = 14, z = 15}
+// gdbr-check:$13 = vec_slices::AStruct {x: 13, y: 14, z: 15}
 
-// gdb-command:print 'vec_slices::MUT_VECT_SLICE'.length
+// gdbg-command:print 'vec_slices::MUT_VECT_SLICE'.length
+// gdbr-command:print MUT_VECT_SLICE.length
 // gdb-check:$14 = 2
-// gdb-command:print *((int64_t[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr))
-// gdb-check:$15 = {64, 65}
+// gdbg-command:print *((int64_t[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr))
+// gdbr-command:print *(MUT_VECT_SLICE.data_ptr as &[i64; 2])
+// gdbg-check:$15 = {64, 65}
+// gdbr-check:$15 = [64, 65]
+
+//gdb-command:print mut_slice.length
+//gdb-check:$16 = 5
+//gdbg-command:print *((int64_t[5]*)(mut_slice.data_ptr))
+//gdbr-command:print *(mut_slice.data_ptr as &[i64; 5])
+//gdbg-check:$17 = {1, 2, 3, 4, 5}
+//gdbr-check:$17 = [1, 2, 3, 4, 5]
 
 
 // === LLDB TESTS ==================================================================================
@@ -106,6 +126,8 @@ fn main() {
         MUT_VECT_SLICE = VECT_SLICE;
     }
 
+    let mut_slice: &mut [i64] = &mut [1, 2, 3, 4, 5];
+
     zzz(); // #break
 }