From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7746 invoked by alias); 25 Feb 2006 12:33:08 -0000 Received: (qmail 7732 invoked by uid 22791); 25 Feb 2006 12:33:07 -0000 X-Spam-Check-By: sourceware.org Received: from jess.glam.ac.uk (HELO jess.glam.ac.uk) (193.63.147.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 25 Feb 2006 12:33:05 +0000 Received: from mailserv1.isd.glam.ac.uk ([192.168.244.1]) by jess.glam.ac.uk with esmtp (Exim 3.35 #1) id 1FCySU-00063I-00; Sat, 25 Feb 2006 12:23:34 +0000 Received: from j228-gm.comp.glam.ac.uk ([193.63.148.84]) by MAILSERV1.isd.glam.ac.uk with Microsoft SMTPSVC(6.0.3790.211); Sat, 25 Feb 2006 12:33:56 +0000 Received: from gaius by j228-gm.comp.glam.ac.uk with local (Exim 4.60) (envelope-from ) id 1FCyZl-0000hZ-S2; Sat, 25 Feb 2006 12:31:05 +0000 To: "Jim Blandy" Cc: gdb-patches@sources.redhat.com Subject: Re: Enhanced language support for Modula-2 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> From: Gaius Mulley Date: Sat, 25 Feb 2006 13:17:00 -0000 In-Reply-To: <8f2776cb0602211055t572223ecs93e37d5575a31ce@mail.gmail.com> Message-ID: <87wtfjfwmu.fsf@j228-gm.comp.glam.ac.uk> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00475.txt.bz2 "Jim Blandy" writes: > On 21 Feb 2006 10:24:46 +0000, Gaius Mulley wrote: > > here is a reworking of my patch which includes a new version of the > > set reading code in gdb/dwarf2read.c. Also contained is a patch to > > gdb/doc/gdb.texinfo reflecting the enhancements to the Modula-2 mode. > > Okay. That solves that problem. :) > > I'm a little concerned about the change to dwarf2read.c where you > create a TYPE_CODE_CHAR type for DW_ATE_signed_char and > DW_ATE_unsigned_char. GDB uses TYPE_CODE_INT for C 'char' types. I > have vague memories of something going wrong with printing or > evaluation or something if you actually use TYPE_CODE_CHAR, and after > discussion deciding to stick with TYPE_CODE_INT. > > But this patch causes no test suite regressions? Hi, thanks for all your suggestions/feedback about the patch, I'll incorporate these changes, polish it and resubmit. Re: regressions.. hmm, yes it does cause some regression failures, so I'll retract the TYPE_CODE_CHAR type for DW_ATE_signed_char and DW_ATE_unsigned_char in dwarf2read.c. 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. Or is there a better/cleaner way? regards, Gaius