Fix ptype of Rust slices
authorTom Tromey <tom@tromey.com>
Mon, 2 Oct 2017 19:47:15 +0000 (13:47 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 2 Oct 2017 20:06:48 +0000 (14:06 -0600)
commitb3e3859bc577db5b79bb3d39048fd46c0a0420ef
treedd763223288447e29296b120520b709e4020dded
parent01af5e0d09ac9c621e7b280f44a2c7ef55784493
Fix ptype of Rust slices

Something like "ptype &x[..]" (where "x" was a slice) would crash gdb.
rust_subscript wasn't handling slicing in the EVAL_AVOID_SIDE_EFFECTS
case.

2017-10-02  Tom Tromey  <tom@tromey.com>

* rust-lang.c (rust_subscript): Handle slices in
EVAL_AVOID_SIDE_EFFECTS case.

2017-10-02  Tom Tromey  <tom@tromey.com>

* gdb.rust/simple.exp: Test ptype of a slice.
gdb/ChangeLog
gdb/rust-lang.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.exp