diff options
author | Tom Tromey <tom@tromey.com> | 2017-10-02 12:15:52 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-10-02 14:06:43 -0600 |
commit | 01af5e0d09ac9c621e7b280f44a2c7ef55784493 (patch) | |
tree | bd93b3095baf09f76ecf92cf5d5e8f818482676f /gdb/testsuite/gdb.rust | |
parent | 888e3ddb20f541220f18709fce832ad0163c3e71 (diff) | |
download | gdb-01af5e0d09ac9c621e7b280f44a2c7ef55784493.zip gdb-01af5e0d09ac9c621e7b280f44a2c7ef55784493.tar.gz gdb-01af5e0d09ac9c621e7b280f44a2c7ef55784493.tar.bz2 |
Allow indexing of &str in Rust
rust_slice_type_p was not recognizing &str as a slice type, so indexing
into (or making a slice of) a slice was not working.
2017-10-02 Tom Tromey <tom@tromey.com>
* rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2017-10-02 Tom Tromey <tom@tromey.com>
* gdb.rust/simple.exp: Test index of slice.
Diffstat (limited to 'gdb/testsuite/gdb.rust')
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.exp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp index 403a11b..1a46317 100644 --- a/gdb/testsuite/gdb.rust/simple.exp +++ b/gdb/testsuite/gdb.rust/simple.exp @@ -55,6 +55,8 @@ gdb_test "print *(&c as &i32)" " = 0" gdb_test "print *(&c as *const i32)" " = 0" gdb_test "print *(&c as *mut i32)" " = 0" +gdb_test "print/c f\[0\]" " = 104 'h'" + gdb_test "print j" " = simple::Unit" gdb_test "ptype j" " = struct simple::Unit" gdb_test "print j2" " = simple::Unit" |