From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21185 invoked by alias); 1 Jul 2005 03:35:35 -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 21172 invoked by uid 22791); 1 Jul 2005 03:35:32 -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; Fri, 01 Jul 2005 03:35:32 +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 j613UmhV299978 for ; Fri, 1 Jul 2005 13:30:52 +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 j613cJf2103526 for ; Fri, 1 Jul 2005 13:38:19 +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 j613ZOI8009319 for ; Fri, 1 Jul 2005 13:35:24 +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 j613ZMTo009289; Fri, 1 Jul 2005 13:35:22 +1000 Date: Fri, 01 Jul 2005 03:35:00 -0000 From: Wu Zhou To: Nick Roberts cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: PATCH: Start Fortran support for variable objects. In-Reply-To: <17092.28833.284587.118362@farnswood.snap.net.nz> Message-ID: References: <17091.4780.953681.620094@farnswood.snap.net.nz> <20050630131809.GB8241@nevyn.them.org> <17092.28833.284587.118362@farnswood.snap.net.nz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-07/txt/msg00002.txt.bz2 Hi, Nick and Daniel I have two comments below, hope that they might be helpful. Thanks. On Fri, 1 Jul 2005, Nick Roberts wrote: > As in the patch below? I don't understand the extra cases it appears to > cover, but it worked for the tests I tried. Maybe it is also helpful to test against such arrays definition as: integer array(0:5), integer array(-1:4) or even integer array(0:5,-1:4) (if variable object does support multi-dimension array. I don't know much about variable object, and MI as a whole.) The second comment is about the following text in a former mail Nick sent: > Fortran: > > (top-gdb) p TYPE_LOW_BOUND(var->type) > $3 = 0 > (top-gdb) p* var->type->main_type > $8 = {code = TYPE_CODE_ARRAY, upper_bound_type = BOUND_SIMPLE, > lower_bound_type = BOUND_SIMPLE, name = 0x0, tag_name = 0x0, > objfile = 0x8357618, target_type = 0x83654cc, flags = 0, nfields = 1, > vptr_fieldno = -1, fields = 0x83655c4, vptr_basetype = 0x0, > type_specific = {cplus_stuff = 0x0, floatformat = 0x0}} For Fortran array such as DIMENSION I(4), the lower bound should be 1 by default. The following session on my box shows this: p type->main_type->fields->type->main_type->fields[0].loc.bitpos $3 = 1 p type->main_type->fields->type->main_type->fields[1].loc.bitpos $4 = 4 I guess there might be some errors in the process of creating varobj for Fortran array. Anyway it is just my guess. If the patch works ok with different kinds of array definitions, it should be okay. Cheers - Wu Zhou