Improve user experience in printing Fortran derived types.
authorWalfred Tedeschi <walfred.tedeschi@intel.com>
Tue, 21 Jun 2016 13:15:04 +0000 (15:15 +0200)
committerWalfred Tedeschi <walfred.tedeschi@intel.com>
Tue, 21 Jun 2016 13:15:04 +0000 (15:15 +0200)
commit04d59df6f311bcc20d74ada64a5e15a4bbb40026
tree0fd8b906cf2cd75b1a9a91842c0397ac9b05dc82
parentbdd582dbf14f12998a0003b5aa772d7868bc3dc7
Improve user experience in printing Fortran derived types.

Output for Fortran derived classes is like:

  "( 9, 'abc')"

with this changes the output is changed to:

  "( lucky_number = 9, letters = 'abc')"

2016-06-21  Walfred Tedeschi  <walfred.tedeschi@intel.com>

* f-valprint.c (f_val_print): Add field names for printing
derived types fields.

gdb/testsuite:

* gdb.fortran/derived-type.exp (print q): Add fields to the output.
* gdb.fortran/vla-type.exp (print twov): Fix vla tests with
structs.
* gdb.fortran/derived-type-function.exp: New file.
* gdb.fortran/derived-type-function.f90: New file.
gdb/ChangeLog
gdb/f-valprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/derived-type-function.exp [new file with mode: 0644]
gdb/testsuite/gdb.fortran/derived-type-function.f90 [new file with mode: 0644]
gdb/testsuite/gdb.fortran/derived-type.exp
gdb/testsuite/gdb.fortran/vla-type.exp