From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31082 invoked by alias); 8 Oct 2008 03:28:21 -0000 Received: (qmail 31070 invoked by uid 22791); 8 Oct 2008 03:28:20 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Oct 2008 03:27:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 038FC2A96BD; Tue, 7 Oct 2008 23:27:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YzcURR2hkZMm; Tue, 7 Oct 2008 23:27:38 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 63B982A9637; Tue, 7 Oct 2008 23:27:38 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4455AE7ACD; Tue, 7 Oct 2008 23:27:31 -0400 (EDT) Date: Wed, 08 Oct 2008 03:28:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Tobias Burnus , Ulrich Weigand , Jim Blandy Subject: Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] Message-ID: <20081008032731.GE3810@adacore.com> References: <20080818111120.GE16894@adacore.com> <200808181553.m7IFrG3w005270@d12av02.megacenter.de.ibm.com> <48A59B3C.9050801@net-b.de> <20080818111120.GE16894@adacore.com> <20080907115637.GA12939@host0.dyn.jankratochvil.net> <20080919221221.GA23372@adacore.com> <20081004202457.GA20726@host0.dyn.jankratochvil.net> <20081006200001.GC3588@adacore.com> <20081007225538.GA1206@host0.dyn.jankratochvil.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081007225538.GA1206@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00241.txt.bz2 > No, according to ISO C99 enums with no assignments get values 0, 1, 2... Yeah, you're right. I checked C90 as well, since I believe we're still restricted to using C90 for GDB for now, and it says the same thing. > Included you as a co-author of this patch. OK to apply? That's very kind, but you really didn't need to do that. You should get sole credit for this work, as you clearly guided me as much as I tried to guide you. > 2008-10-08 Jan Kratochvil > Joel Brobecker > > Convert static_kind into loc_kind enum. > * gdbtypes.h (enum field_loc_kind): New. > (union field_location): New field dwarf_block. > (struct field): Rename static_kind as loc_kind. > (FIELD_STATIC_KIND): Rename to ... > (FIELD_LOC_KIND): ... here. > (TYPE_FIELD_STATIC_KIND): Rename to ... > (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND. > (TYPE_FIELD_STATIC_HAS_ADDR): Remove. > (TYPE_FIELD_STATIC): Remove. > (TYPE_FIELD_BITPOS): Reformat. > (SET_FIELD_BITPOS): New. > (FIELD_PHYSADDR): Rename to ... > (FIELD_STATIC_PHYSADDR): ... here. > (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename. > (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND. > (FIELD_PHYSNAME): Rename to ... > (FIELD_STATIC_PHYSNAME): ... here. > (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename. > (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND. > (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New. > (field_is_static): New declaration. > * gdbtypes.c (field_is_static): New function. > (copy_type_recursive): Update throughout. > * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c, > eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c, > p-valprint.c, valops.c, value.c, varobj.c: Update throughout. Almost there: Pre-approved with the following nit fixed... [in copy_type_recursive] > + break; > + default: > + gdb_assert (0); Can you change that to using an internal_error, instead? For instance, internal_error (__FILE__, __LINE__, _("Unexpected ... kind: %d"), TYPE_FIELD_LOC_KIND (type, i)); Something like that. Thank you, -- Joel