aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-typeprint.c
diff options
context:
space:
mode:
authorBernhard Heckel <bernhard.heckel@intel.com>2016-05-25 08:47:17 +0200
committerBernhard Heckel <bernhard.heckel@intel.com>2016-05-25 08:47:17 +0200
commite188eb36215c031304aa7d2630447e2d0726adf5 (patch)
treef30ecc0667ade42730c7572c9afc63a9dfd0aeae /gdb/f-typeprint.c
parent9b2db1fd27cea1323a7ae0beb9399c8e1c4a3741 (diff)
downloadgdb-e188eb36215c031304aa7d2630447e2d0726adf5.zip
gdb-e188eb36215c031304aa7d2630447e2d0726adf5.tar.gz
gdb-e188eb36215c031304aa7d2630447e2d0726adf5.tar.bz2
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.
Diffstat (limited to 'gdb/f-typeprint.c')
-rw-r--r--gdb/f-typeprint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index f38a3a0..350def0 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -371,12 +371,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
fputs_filtered ("\n", stream);
for (index = 0; index < TYPE_NFIELDS (type); index++)
{
- f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show,
- level + 4);
+ f_type_print_base (TYPE_FIELD_TYPE (type, index), stream,
+ show - 1, level + 4);
fputs_filtered (" :: ", stream);
fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
- stream, 0, 0, 0, 0);
+ stream, show - 1, 0, 0, 0);
fputs_filtered ("\n", stream);
}
fprintfi_filtered (level, stream, "End Type ");