From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/DWARF] Add DW_AT_GNAT_descriptive_type support
Date: Tue, 05 Jan 2010 20:12:00 -0000 [thread overview]
Message-ID: <m38wcc8g77.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20091224180657.GV5942@adacore.com> (Joel Brobecker's message of "Thu, 24 Dec 2009 22:06:57 +0400")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I have taken the time to order the patches to follow the same order
Joel> as if I was to write the patch all over again (gdbtypes updates,
Joel> dwarf2read updates, etc). Hopefully this will help reading it.
Thanks... though I don't really want to encourage this sort of thing,
because it will mean people will start expect it from me ;-)
This patch seems pretty reasonable.
Joel> There are still a couple of things that are worth discussing:
Joel> (a) You'll see that I put a FIXME after modifying the
Joel> TYPE_CPLUS_SPECIFIC macro. The comment says it all. I think
Joel> that the fix is fine; in fact, we could generalize this approach
Joel> to all the accessor macros for the type-specific union - I
Joel> wouldn't see a problem with that, and would make the code more
Joel> resilient to incorrect field access. For now, I opted for just
Joel> fixing this one macro, since C is usually the "universal" "bare"
Joel> language. Ada or C++ might be less so: Who would want to use
Joel> C++ or Ada to display a Fortran array? :-)
The modified macro uses the default if Gnat aux info is available. It
seem to me that the check should instead be to see if the C++ info is
not available.
Joel> (b) We need to determine how GCC will tell GDB that it uses the
Joel> DW_AT_GNAT_descriptive_type attribute.
[...]
Joel> What's the best way for GCC to tell GDB? At AdaCore, we relied
Joel> on a hack, where we parsed a special marker in the CU producer
Joel> attribute. It's kind of gross, but it served us well. Any
Joel> suggestion?
How about a new GNU extension attribute in the CU DIE?
Joel> + if (! HAVE_CPLUS_STRUCT (type))
Joel> + n_base_classes = 0;
Joel> + else
Joel> + n_base_classes = TYPE_N_BASECLASSES (type);
This seems a little weird to me.
Do we need this everywhere we use TYPE_N_BASECLASSES?
Tom
next prev parent reply other threads:[~2010-01-05 20:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 18:07 Joel Brobecker
2009-12-24 19:40 ` Jan Kratochvil
2009-12-25 4:36 ` Joel Brobecker
2009-12-25 9:40 ` Jan Kratochvil
2010-11-03 19:25 ` Jan Kratochvil
2010-11-03 20:48 ` Joel Brobecker
2010-01-05 20:12 ` Tom Tromey [this message]
2010-01-11 10:41 ` Joel Brobecker
2010-01-11 18:15 ` Tom Tromey
2010-01-12 5:53 ` 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=m38wcc8g77.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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