From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15343 invoked by alias); 29 Oct 2005 02:40:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15033 invoked by uid 22791); 29 Oct 2005 02:40:09 -0000 Received: from ausmtp01.au.ibm.com (HELO ausmtp01.au.ibm.com) (202.81.18.186) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 29 Oct 2005 02:40:09 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp01.au.ibm.com (8.12.10/8.12.10) with ESMTP id j9T2hDMs441576 for ; Sat, 29 Oct 2005 12:43:14 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.250.243]) by sd0208e0.au.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j9T2h3rL096140 for ; Sat, 29 Oct 2005 12:43:03 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11/8.13.3) with ESMTP id j9T2e13Q024503 for ; Sat, 29 Oct 2005 12:40:01 +1000 Received: from [9.181.133.252] ([9.181.133.252]) by d23av02.au.ibm.com (8.12.11/8.12.11) with ESMTP id j9T2dx0B024386; Sat, 29 Oct 2005 12:40:00 +1000 Date: Sat, 29 Oct 2005 09:55:00 -0000 From: Wu Zhou To: Thomas Koenig 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 In-Reply-To: <20051028230308.GA5758@meiner.onlinehome.de> Message-ID: References: <20051028230308.GA5758@meiner.onlinehome.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-10/txt/msg00220.txt.bz2 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