From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] Cleaner handling of character entities ?
Date: Fri, 05 May 2006 19:06:00 -0000 [thread overview]
Message-ID: <20060505190625.GA1042@adacore.com> (raw)
In-Reply-To: <20060505182852.GL31029@nevyn.them.org>
> > 2006-05-05 Joel Brobecker <brobecker@adacore.com>
> >
> > * 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!
next prev parent reply other threads:[~2006-05-05 19:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 18:24 Joel Brobecker
2006-05-05 18:29 ` Daniel Jacobowitz
2006-05-05 19:06 ` Joel Brobecker [this message]
2006-05-05 19:40 ` Jim Blandy
2006-05-05 19:48 ` Daniel Jacobowitz
2006-05-05 20:54 ` Joel Brobecker
2006-05-05 21:47 ` Jim Blandy
2006-05-15 19:06 ` Daniel Jacobowitz
2007-12-24 8:00 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060505190625.GA1042@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox