This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug rust/22236] string slices print too much
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 02 Oct 2017 20:13:42 +0000
- Subject: [Bug rust/22236] string slices print too much
- Auto-submitted: auto-generated
- References: <bug-22236-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22236
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=45320ffa0450b27e232d933d2a1c6a09d94ac18b
commit 45320ffa0450b27e232d933d2a1c6a09d94ac18b
Author: Tom Tromey <tom@tromey.com>
Date: Mon Oct 2 13:55:42 2017 -0600
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.
--
You are receiving this mail because:
You are on the CC list for the bug.