binutils-gdb/gdb/testsuite/gdb.rust
Tom Tromey 45320ffa04 Fix &str printing in Rust
Printing a string slice ("&str") in Rust would print until the
terminating \0; but that is incorrect because a slice has a length.
This fixes &str printing, and arranges to preserve the type name when
slicing a slice, so that printing a slice of an "&str" works as well.

This is PR rust/22236.

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

	PR rust/22236:
	* rust-lang.c (rust_val_print_str): New function.
	(val_print_struct): Call it.
	(rust_subscript): Preserve name of slice type.

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

	PR rust/22236:
	* gdb.rust/simple.rs (main): New variable "fslice".
	* gdb.rust/simple.exp: Add slice tests.  Update string tests.
2017-10-02 14:06:48 -06:00
..
expr.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
generics.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
generics.rs update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
methods.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
methods.rs update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
modules.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
modules.rs update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
simple.exp Fix &str printing in Rust 2017-10-02 14:06:48 -06:00
simple.rs Fix &str printing in Rust 2017-10-02 14:06:48 -06:00
unsized.exp Print Rust unsized array types a bit more nicely 2017-05-21 17:02:16 -06:00
unsized.rs Print Rust unsized array types a bit more nicely 2017-05-21 17:02:16 -06:00
watch.exp Use watchpoint's language when re-parsing expression 2017-05-19 21:23:16 -06:00
watch.rs Use watchpoint's language when re-parsing expression 2017-05-19 21:23:16 -06:00