Fortran, typeprint: Decrease level of details when printing elements of a structure.
authorBernhard Heckel <bernhard.heckel@intel.com>
Wed, 25 May 2016 06:47:17 +0000 (08:47 +0200)
committerBernhard Heckel <bernhard.heckel@intel.com>
Wed, 25 May 2016 06:47:17 +0000 (08:47 +0200)
commite188eb36215c031304aa7d2630447e2d0726adf5
treef30ecc0667ade42730c7572c9afc63a9dfd0aeae
parent9b2db1fd27cea1323a7ae0beb9399c8e1c4a3741
Fortran, typeprint: Decrease level of details when printing elements of a structure.

According to the typeprint's description, the level of details is
decreased by one for the typeprint of elements of a structure.

Before:
(gdb) ptype t3v
type = Type t3
    integer(kind=4) :: t3_i
    Type t2
        integer(kind=4) :: t2_i
        Type t1
            integer(kind=4) :: t1_i
            real(kind=4) :: t1_r
        End Type t1 :: t1_n
    End Type t2 :: t2_n
End Type t3

After:
(gdb) ptype t3v
type = Type t3
    integer(kind=4) :: t3_i
    Type t2 :: t2_n
End Type t3

2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>

gdb/Changelog:
* f-typeprint.c (f_type_print_base): Decrease show by one.

gdb/testsuite/Changelog:
* gdb.fortran/type.f90: Add nested structures.
* gdb.fortran/whatis-type.exp: Whatis/ptype nested structures.
* gdb.fortran/derived-type.exp: Adapt expected output.
* gdb.fortran/vla-type.exp: Adapt expected output.
gdb/ChangeLog
gdb/f-typeprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/derived-type.exp
gdb/testsuite/gdb.fortran/type.f90
gdb/testsuite/gdb.fortran/vla-type.exp
gdb/testsuite/gdb.fortran/whatis_type.exp