binutils-gdb/gdb/testsuite/gdb.rust
Andrew Burgess 80062eb949 gdb/rust: Handle printing structures containing strings
When printing a rust structure that contains a string GDB can
currently fail to read the fields that define the string. This is
because GDB mistakenly treats a value that is the parent structure as
though it is the structure that defines the string, and then fails to
find the fields needed to extract a string.

The solution is to create a new value to represent the string field of
the parent value.

gdb/ChangeLog:

	* rust-lang.c (val_print_struct): Handle printing structures
	containing strings.

gdb/testsuite/ChangeLog:

	* gdb.rust/simple.exp: Add new test case.
	* gdb.rust/simple.rs (struct StringAtOffset): New struct.
	(main): Initialise an instance of the new struct.
2019-05-02 22:10:17 +01:00
..
expr.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
generics.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
generics.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
methods.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
methods.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
modules.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
modules.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
simple.exp gdb/rust: Handle printing structures containing strings 2019-05-02 22:10:17 +01:00
simple.rs gdb/rust: Handle printing structures containing strings 2019-05-02 22:10:17 +01:00
traits.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
traits.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
unsized.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
unsized.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
watch.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
watch.rs Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00