From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23721 invoked by alias); 26 Feb 2006 05:44:09 -0000 Received: (qmail 23713 invoked by uid 22791); 26 Feb 2006 05:44:09 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 26 Feb 2006 05:44:08 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FDEhQ-0000tK-HV; Sun, 26 Feb 2006 00:44:04 -0500 Date: Sun, 26 Feb 2006 05:46:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Gaius Mulley , gdb-patches@sources.redhat.com Subject: Re: Enhanced language support for Modula-2 Message-ID: <20060226054404.GA3330@nevyn.them.org> Mail-Followup-To: Jim Blandy , Gaius Mulley , gdb-patches@sources.redhat.com References: <87vevg9puv.fsf@j228-gm.comp.glam.ac.uk> <8f2776cb0602151619w5fd8f043u3e7227e27f3567a9@mail.gmail.com> <20060220150513.GB14155@nevyn.them.org> <8f2776cb0602201322o3791841dv2916e53181e9f308@mail.gmail.com> <87lkw5qaa9.fsf@j228-gm.comp.glam.ac.uk> <8f2776cb0602211055t572223ecs93e37d5575a31ce@mail.gmail.com> <87wtfjfwmu.fsf@j228-gm.comp.glam.ac.uk> <8f2776cb0602252137q7e716ffaibd7b88eeb0d16e43@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0602252137q7e716ffaibd7b88eeb0d16e43@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00478.txt.bz2 On Sat, Feb 25, 2006 at 09:37:05PM -0800, Jim Blandy wrote: > On 25 Feb 2006 12:31:05 +0000, Gaius Mulley wrote: > > I guess the Modula-2 mode can use a different method. Would it be > > allowable for me to extend the > > > > #define TYPE_FLAG_xxx > > > > sequence (currently bits 0..15 are used). So for example: > > > > #define TYPE_FLAG_LANG_CHAR (1 << 16) > > > > and set this flag if we see DW_ATE_signed_char or > > DW_ATE_unsigned_char. Later in the Modula-2 language section this bit > > could be tested and the appropriate action taken. Obviously I'd need > > to set this bit in stabsread.c as well. This would also allow Pascal > > to utilise CHAR rather than see a tiny integer. > > If Modula-2 has a genuinely distinct character type, then I think > TYPE_CODE_CHAR is the right type for you to use. It's just that it > isn't for C. So the code in dwarf2read.c needs to choose the type > code for a given DWARF base type based on the language of the > compilation unit that contains the die. I think you'll need to test > cu->language, and set the type code appropriately in each case. We already use a language hook for read_base_type when the type has no name. Maybe we should regardless of whether the type has a name? I've always been a bit confused by the "fundamental type" code. -- Daniel Jacobowitz CodeSourcery