This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/4] Fortran, typeprint: Decrease level of details when printing elements of a structure.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Bernhard Heckel <bernhard dot heckel at intel dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 12 May 2016 13:44:57 +0100
- Subject: Re: [PATCH 3/4] Fortran, typeprint: Decrease level of details when printing elements of a structure.
- Authentication-results: sourceware.org; auth=none
- References: <1462889739-30359-1-git-send-email-bernhard dot heckel at intel dot com> <1462889739-30359-4-git-send-email-bernhard dot heckel at intel dot com> <86oa8cd870 dot fsf at gmail dot com> <57343808 dot 40807 at intel dot com>
Bernhard Heckel <bernhard.heckel@intel.com> writes:
> This is what the comment says:
> SHOW nonzero means don't print this type as just its name;
> show its real definition even if it has a name.
> SHOW zero means print just typename or struct tag if there is one
> SHOW negative means abbreviate structure elements.
> SHOW is decremented for printing of structure elements.
>
> From that, I understood that I have to print the elements when show is >=0.
My understanding to the comments above is that we should print elements
when show is > 0. When show is zero, "print just typename or struct
tag", which means when we print t3v,
(gdb) ptype t3v
type = Type t3 <--- show is 1
integer(kind=4) :: t3_i <--- show is 0
Type t2 t2_n <--- show is 0
End Type t3
we should only print type name of t2, rather than its elements, right?
> Am I wrong? If so, I have to change Patch2.
I'd like to leave it to you or someone else who is familiar with the
type print or fortran.
--
Yao (éå)