From 9b2db1fd27cea1323a7ae0beb9399c8e1c4a3741 Mon Sep 17 00:00:00 2001 From: Bernhard Heckel Date: Wed, 25 May 2016 08:47:17 +0200 Subject: Fortran, typeprint: Take level of details into account when printing elements of a structure. According to the typeprint's description, elements of a structure should not be printed when show is < 1. This variable is also used to distinguish the level of details between "ptype" and "whatis" expressions. Before: (gdb) whatis t1v type = Type t1 integer(kind=4) :: t1_i real(kind=4) :: t1_r End Type t1 After: (gdb) whatis t1v type = Type t1 2016-05-25 Bernhard Heckel gdb/Changelog: * f-typeprint.c (f_type_print_base): Don't print fields when show < 0. gdb/testsuite/Changelog: * gdb.fortran/whatis_type.exp: Adapt expected output. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.fortran/whatis_type.exp | 14 ++------------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2b05192..712ee2f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2016-05-25 Bernhard Heckel + * gdb.fortran/whatis_type.exp: Adapt expected output. + +2016-05-25 Bernhard Heckel + * gdb.fortran/print_type.exp: Fix expected output. * gdb.fortran/whatis_type.exp: Fix expected output. diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp index 7265923..0b7a1b7 100644 --- a/gdb/testsuite/gdb.fortran/whatis_type.exp +++ b/gdb/testsuite/gdb.fortran/whatis_type.exp @@ -38,18 +38,8 @@ gdb_continue_to_breakpoint "bp1" set t1_i "$int :: t1_i" set t1_r "$real :: t1_r" -gdb_test "whatis t1" \ - [multi_line "type = Type t1" \ - " $t1_i" \ - " $t1_r" \ - "End Type t1"] \ - "whatis t1" -gdb_test "whatis t1v" \ - [multi_line "type = Type t1" \ - " $t1_i" \ - " $t1_r" \ - "End Type t1"] \ - "whatis t1v" +gdb_test "whatis t1" "type = Type t1" +gdb_test "whatis t1v" "type = Type t1" gdb_test "ptype t1" \ [multi_line "type = Type t1" \ -- cgit v1.1