Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Bernhard Heckel <bernhard.heckel@intel.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] Fortran, typeprint: Decrease level of details when printing elements of a structure.
Date: Thu, 12 May 2016 08:00:00 -0000	[thread overview]
Message-ID: <57343808.40807@intel.com> (raw)
In-Reply-To: <86oa8cd870.fsf@gmail.com>

On 11/05/2016 15:40, Yao Qi wrote:
> Bernhard Heckel <bernhard.heckel@intel.com> writes:
>
>> (gdb) ptype t3v
>> type = Type t3
>>      integer(kind=4) :: t3_i
>>      Type t2
>>          integer(kind=4) :: t2_i
>>          Type t1 :: t1_n
>>      End Type t2 :: t2_n
>> End Type t3
> Why do we print the "definition" of Type t2?  Why don't we print
>
>   (gdb) ptype t3v
>   type = Type t3
>       integer(kind=4) :: t3_i
>       Type t2 t2_n
>   End Type t3
>
> If I do the same in C, GDB doesn't print the definition of struct t2.
>
> (gdb) ptype t1
> type = struct t1 {
>      int i;
>      struct t2 t2;
> }
>
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.
Am I wrong? If so, I have to change Patch2.


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2016-05-12  8:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 14:16 [PATCH 0/4] Fortran, typeprint Bernhard Heckel
2016-05-10 14:16 ` [PATCH 3/4] Fortran, typeprint: Decrease level of details when printing elements of a structure Bernhard Heckel
2016-05-11 13:40   ` Yao Qi
2016-05-12  8:00     ` Bernhard Heckel [this message]
2016-05-10 14:16 ` [PATCH 1/4] Fortran, typeprint: Fix wrong indentation when ptype nested structures Bernhard Heckel
2016-05-11 11:58   ` Yao Qi
2016-05-11 11:59   ` Yao Qi
2016-05-10 14:16 ` [PATCH 2/4] Fortran, typeprint: Take level of details into account when printing elements of a structure Bernhard Heckel
2016-05-11 12:09   ` Yao Qi
2016-05-12 12:06   ` Yao Qi
2016-05-12 12:42     ` Bernhard Heckel
2016-05-10 14:18 ` [PATCH 4/4] Fortran, typeprint: Forward level of details to be printed for pointers Bernhard Heckel
2016-05-11 13:42   ` Yao Qi
2016-05-13 14:27   ` Yao Qi
2016-05-13 15:55     ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57343808.40807@intel.com \
    --to=bernhard.heckel@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox