Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Thomas Koenig <Thomas.Koenig@online.de>
Cc: gdb-patches@sources.redhat.com, drow@false.org
Subject: Re: [RFC]: Patch to type and value print Fortran derived type - Fix for gfortran PR24527
Date: Sat, 29 Oct 2005 09:55:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.63.0510291025290.17023@linux.site> (raw)
In-Reply-To: <20051028230308.GA5758@meiner.onlinehome.de>

Hi, Thomas

On Sat, 29 Oct 2005, Thomas Koenig wrote:

> I can't easily test your patch because I don't compile gdb from
> sources.
> 
> One test case that might be worth testing is 
> 
> program main
>   type foo
>     real :: a
>   end type foo
>   type bar
>     type(foo) :: x
>     real :: y
>   end type bar
>   type(bar) :: z
>   z%x%a = 1.0
>   z%y = 1.2
>   print *,z
> end program main
> 
> where a type contains another type.
> 
My patch could handle that.  But I don't take too much time on how to 
print them. So the output is like this:

(gdb) ptype z
type = Type bar
      Type foo
      real*4 a
End type x
      real*4 y
End type
(gdb) p z
$3 = { { 1}, 1.20000005}
(gdb)

Do you have thought on how to print that kind of embedded type? 

In fact, that patch is only a begining.  I just want to use that as a 
strawman to solicit some comments, so that I can made it better to be 
acceptable. To support derived type completely, 'p z%y' is also needed.
But I want to see how are you thinking on this patch first?  Especially 
from GDB community.  :-)  Anyway, my patch needed to be get into gdb 
source to support that.  :-)


Any comment from gdb maintainers?  Daniel, any thought on this patch?

Best Regards
- Wu Zhou


      reply	other threads:[~2005-10-29  2:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27 12:51 Wu Zhou
2005-10-29  2:40 ` Thomas Koenig
2005-10-29  9:55   ` Wu Zhou [this message]

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=Pine.LNX.4.63.0510291025290.17023@linux.site \
    --to=woodzltc@cn.ibm.com \
    --cc=Thomas.Koenig@online.de \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.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