aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-typeprint.c
diff options
context:
space:
mode:
authorBernhard Heckel <bernhard.heckel@intel.com>2016-05-25 08:47:18 +0200
committerBernhard Heckel <bernhard.heckel@intel.com>2016-05-25 08:47:18 +0200
commit2bbad2ea1102733a2a4143be4afe195caf730cd0 (patch)
treeee58f4354b2a548dcdf49d28ca2a82e38dd16230 /gdb/f-typeprint.c
parent8b70175dfa76c97e28d83cd09f3604933a7c05f5 (diff)
downloadgdb-2bbad2ea1102733a2a4143be4afe195caf730cd0.zip
gdb-2bbad2ea1102733a2a4143be4afe195caf730cd0.tar.gz
gdb-2bbad2ea1102733a2a4143be4afe195caf730cd0.tar.bz2
Fortran, typeprint: Forward level of details to be printed for pointers.
Variable "show" was hardcoded to zero for pointer and reference types. This implementation didn't allow a correct "whatis" print for those types and results in same output for "ptype" and "whatis". Before: (gdb) whatis t3p type = PTR TO -> ( Type t3 integer(kind=4) :: t3_i Type t2 :: t2_n End Type t3 ) After: (gdb) whatis t3p type = PTR TO -> ( Type t3 ) 2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com> gdb/Changelog: * f-typeprint.c (f_type_print_base): Replace 0 by show. gdb/testsuite/Changelog: * gdb.fortran/type.f90: Add pointer variable. * gdb.fortran/whatis_type.exp: Add whatis/ptype of pointers.
Diffstat (limited to 'gdb/f-typeprint.c')
-rw-r--r--gdb/f-typeprint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index 350def0..920c21f 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -308,12 +308,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
case TYPE_CODE_PTR:
fprintf_filtered (stream, "PTR TO -> ( ");
- f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+ f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
break;
case TYPE_CODE_REF:
fprintf_filtered (stream, "REF TO -> ( ");
- f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+ f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
break;
case TYPE_CODE_VOID: