binutils-gdb/gdb/testsuite/gdb.rust
Tom Tromey f0fd41c192 Fix ptype of single-member Rust enums
While looking into PR rust/21097, I found that ptype of a
single-element enum in Rust did not always format the result properly.
In particular, it would leave out the members of a tuple struct.
Further testing showed that it also did the wrong thing for ordinary
struct members as well.

This patch fixes these problems.  I'm marking it as being associated
with the PR, since that is where the discovery was made; but this
doesn't actually fix that PR (which I think ultimately is due to a
Rust compiler bug).

Built and regtested on x86-64 Fedora 25, using the system Rust
compiler.  I'm checking this in.

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

	PR rust/21097:
	* rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
	with a single member.

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

	PR rust/21097:
	* gdb.rust/simple.exp: Add new tests.
2017-02-03 22:14:36 -07: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 ptype of single-member Rust enums 2017-02-03 22:14:36 -07:00
simple.rs update copyright year range in GDB files 2017-01-01 10:52:34 +04:00