summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.rust/simple.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.rust/simple.exp')
-rw-r--r--gdb/testsuite/gdb.rust/simple.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 1a463177800..b01841f1e02 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -85,6 +85,25 @@ gdb_test "print fromslice" " = 3"
gdb_test "print slice\[0\]" " = 3"
gdb_test "print slice as &\[i32\]\[0\]" " = 3"
+gdb_test_sequence "ptype slice" "" {
+ " = struct &\\\[i32\\\] \\{"
+ " data_ptr: i32 \\*,"
+ " length: usize,"
+ "\\}"
+}
+gdb_test_sequence "ptype &slice\[..\]" "" {
+ " = struct &\\\[i32\\\] \\{"
+ " data_ptr: i32 \\*,"
+ " length: usize,"
+ "\\}"
+}
+gdb_test_sequence "ptype &b\[..\]" "" {
+ " = struct &\\\[\\*gdb\\*\\\] \\{"
+ " data_ptr: i32 \\*,"
+ " length: usize,"
+ "\\}"
+}
+
gdb_test "print x" " = \\(23, 25\\.5\\)"
gdb_test "ptype x" " = \\(i32, f64\\)"
gdb_test "print x as (i32,f64)" " = \\(23, 25\\.5\\)"