From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29006 invoked by alias); 5 May 2006 19:06:38 -0000 Received: (qmail 28964 invoked by uid 22791); 5 May 2006 19:06:36 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 19:06:29 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 751D548CE79 for ; Fri, 5 May 2006 15:06:26 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16877-01-7 for ; Fri, 5 May 2006 15:06:26 -0400 (EDT) Received: from takamaka.act-europe.fr (s142-179-108-108.bc.hsia.telus.net [142.179.108.108]) by nile.gnat.com (Postfix) with ESMTP id 25C3248CE19 for ; Fri, 5 May 2006 15:06:26 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 35C1B47E7F; Fri, 5 May 2006 12:06:25 -0700 (PDT) Date: Fri, 05 May 2006 19:06:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Cleaner handling of character entities ? Message-ID: <20060505190625.GA1042@adacore.com> References: <20060505182351.GK1109@adacore.com> <20060505182852.GL31029@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060505182852.GL31029@nevyn.them.org> User-Agent: Mutt/1.4i 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-05/txt/msg00081.txt.bz2 > > 2006-05-05 Joel Brobecker > > > > * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR > > for char and unsigned char types. > > * ada-lang.c (ada_is_character_type): Always return true if > > the type code is TYPE_CODE_CHAR. > > * c-valprint.c (c_val_print): Print arrays whose element type > > code is TYPE_CODE_CHAR as strings. > > > > Tested on x86-linux, with GCC 3.4 (dwarf2, stabs+), GCC 4.1 (dwarf2). > > No regression. > > > > What do you guys think? Wouldn't that be a step forward? > > I really suspect this impacts the existing producers in some way, > though I don't know exactly how. You should take a look at the most > recent Modula-2 patch, and the discussion around the previous posting > of it, which contained very similar changes (conditionalized for M2). Thanks for the pointer. I think I found the actual discussion, which started in Feb. Here is the message from Jim expressing these concerns. http://sources.redhat.com/ml/gdb-patches/2006-02/msg00396.html He only says that a discussion about this lead you to stick with INT as opposed to CHAR for C at least, and the resolution was to use CHAR only for Modula 2. It would have been nice to have a pointer to the actual discussion so we could remember the reasons for this, but it's not important. It looks like the Modula-2 patch has been approved, but not applied yet. But I can make the same modification in dwarf2read.c regarding the type code for character types, so that Ada follows Modula-2's lead. Then the changes in c-valprint.c become obsolete, I believe. We would be left with: * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR for char and unsigned char types of Ada compilation units. * ada-lang.c (ada_is_character_type): Always return true if the type code is TYPE_CODE_CHAR. Would that be OK? Thanks, -- Joel PS: Testing with -gstabs+ where we do end up with the char type being defined as an int did not reveal any regression with both the official testsuite and our internal testsuite. Being a curious little bugger, I can't help but wondering what the problems are. Darn curiosity!