From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5386 invoked by alias); 30 Jun 2005 07:22:09 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4886 invoked by uid 22791); 30 Jun 2005 07:21:28 -0000 Received: from ausmtp02.au.ibm.com (HELO ausmtp02.au.ibm.com) (202.81.18.187) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 30 Jun 2005 07:21:28 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp02.au.ibm.com (8.12.10/8.12.10) with ESMTP id j5U7GXhV165648 for ; Thu, 30 Jun 2005 17:16:36 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j5U7O2du106424 for ; Thu, 30 Jun 2005 17:24:03 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11/8.13.3) with ESMTP id j5U7L8Jj030327 for ; Thu, 30 Jun 2005 17:21:08 +1000 Received: from [9.181.134.93] ([9.181.134.93]) by d23av04.au.ibm.com (8.12.11/8.12.11) with ESMTP id j5U7L69O030290; Thu, 30 Jun 2005 17:21:07 +1000 Date: Thu, 30 Jun 2005 07:22:00 -0000 From: Wu Zhou To: Feng Wang cc: fortran@gcc.gnu.org, gdb@sources.redhat.com Subject: re: About the debugging of gfortran arrays In-Reply-To: <20050630032305.44227.qmail@web15603.mail.cnb.yahoo.com> Message-ID: References: <20050630032305.44227.qmail@web15603.mail.cnb.yahoo.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-555018764-1120043229=:347" X-SW-Source: 2005-06/txt/msg00315.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-555018764-1120043229=:347 Content-Type: TEXT/PLAIN; charset=gb2312 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-length: 2881 Hi Feng, Thanks for your reply. I had opened a bug:=20 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D22244 and added you into the CC-list. Thanks for looking into this. Cheers - Wu Zhou On Thu, 30 Jun 2005, Feng Wang wrote: > --- Wu Zhou =D0=B4=B5=C0: >=20 > > Hello all, > >=20 > > I am trying to use gdb to debug gfortran program and encountered some=20 > > problems with arrays: > >=20 > > 1. The first one is about the lower bound. It seems that gfortran chan= ge=20 > > the lower bound of some arrays to 0 by default (I got this feeling from= my=20 > > experience and I also see this kind of transfer in part of the code in= =20 > > gcc/fortran/trans-type.c. Dunno know whether it apply to all arrays.=20 > > Anyone could confirm or deny this? Thanks in advance!) >=20 > Yes, all array. >=20 > >=20 > > To handle this, GDB need to make responsive change. But I have one=20 > > question here: is this kind of design (change the lower bound of array = to=20 > > zero) indispensible here? Is it ok to still output the original bounds= in > > the=20 > > debug info?=20=20 >=20 > IMHO, one dimension array is easy to be changed. But multi-dimension arra= y is > not supported under this structure. >=20 > >=20 > > 2. The second one is about two-dimension array. In the debuginfo outpu= t=20 > > by gfortran, two-dimension array will be flatten to one-dimension. Tak= e a=20 > > look at the following testcase please: > > > [snip]=20 > >=20 > > Although there is no problem for the output binary, but it make some=20 > > trouble for GDB. So I am thinking of whether there is any solution > > for this in gfortran's side?=20 > >=20 > > For example, treat it as one-dimension array in the outputed binary, but > > still output two-dimension one in the debug information. Maybe others?= =20 > >=20 > Ok. I think we can build nested array type like C FE and reserve other ty= pe > discriptors. But from the explanation in trans-type.c it seems hard to so= lve > some other problems. This should be comfirmed by maintainers. Paul B, Ste= ven B, > give some comments? >=20 > It's not only gdb problem, but also affects performance and optimization = on the > tree-level. We lose the dimension infomation and can not get correct data > dependency. This limits many optimizations like loop interchange and loop > distribution, etc. >=20 > I think you can file a bug report. See: > http://gcc.gnu.org/bugzilla >=20 >=20 > Best Regards, > Feng Wang >=20 > -- > Creative Compiler Research Group, > National University of Defense Technology, China. >=20 >=20 >=20=09 >=20 >=20=09 >=20=09=09 > ___________________________________________________________=20 > =D1=C5=BB=A2=C3=E2=B7=D1G=D3=CA=CF=E4=A3=AD=D6=D0=B9=FA=B5=DA=D2=BB=BE=F8= =CE=DE=C0=AC=BB=F8=D3=CA=BC=FE=C9=A7=C8=C5=B3=AC=B4=F3=D3=CA=CF=E4 > http://cn.mail.yahoo.com/?id=3D77071 >=20 >=20 >=20= --0-555018764-1120043229=:347--