mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
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.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user