[PATCH 3/4] Fortran, typeprint: Decrease level of details when printing elements of a structure.

Yao Qi qiyaoltc@gmail.com
Thu May 12 12:45:00 GMT 2016


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 (齐尧)



More information about the Gdb-patches mailing list