Fortran, typeprint: Fix wrong indentation when ptype nested structures.
authorBernhard Heckel <bernhard.heckel@intel.com>
Wed, 25 May 2016 06:47:16 +0000 (08:47 +0200)
committerBernhard Heckel <bernhard.heckel@intel.com>
Wed, 25 May 2016 06:47:16 +0000 (08:47 +0200)
commit72b1705502a891e07d40ad215146c71193920801
tree430ee1cfd4a8636a14843497b875c92fa57fb2c1
parent3cd81d8df727cc961b9333d5e977718c622bf9c3
Fortran, typeprint: Fix wrong indentation when ptype nested structures.

Level of indentation was not proper handled when printing
the elements type's name.

Before:
type = Type t1
integer(kind=4) :: var_1
integer(kind=4) :: var_2
End Type t1

After:
type = Type t1
    integer(kind=4) :: var_1
    integer(kind=4) :: var_2
End Type t1

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

gdb/Changelog:
* f-typeprint.c (f_type_print_base): Take print level into account.

gdb/testsuite/Changelog:
* gdb.fortran/print_type.exp: Fix expected output.
* gdb.fortran/whatis_type.exp: Fix expected output.
gdb/ChangeLog
gdb/f-typeprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/whatis_type.exp