This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes
- From: Pierre-Marie de Rodat <derodat at adacore dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merill <jason at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 8 Sep 2016 23:14:31 +0200
- Subject: Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes
- Authentication-results: sourceware.org; auth=none
- References: <568BD402.8070509@adacore.com> <CAFiYyc0jT1XOngBu9DLk2WkhQtG_+hGvNtAy5egToR_CyOKQ1Q@mail.gmail.com> <569E27DF.5010604@adacore.com> <5658b28c-b365-cf1f-b847-965ddf3a4381@adacore.com> <3a24110d-1063-5c61-a1e3-87e51b866675@adacore.com> <CAFiYyc2RWmzyAUc8uVo99BkmAMcEVBPjnwkjrT=FHfTnYP36bQ@mail.gmail.com>
On 09/07/2016 11:30 AM, Richard Biener wrote:
Ok, had time to look at this issue again. I see the patch works like dwarf2out
works currently with respect to DIE creation order and re-location.
Thank you very much for helping me with this again!
So yes, that was the intent of the patch.
this might be incomplete though for the case where it's say
typedef const T X;
thus the type of decl is a qualified type? In this case the qualification might
be at the correct scope but the actual type not or you just relocate the
qualification but not the type DIE it refers to?
I haven’t tested this yet but I guess you are right. A complete patch
should also probably see if the unqualifier type should be relocated.
That said, with the idea of early debug in place and thus giving
more responsibility to the frontends I wonder in what order the Ada
FE calls debug_hooks.early_global_decl ()? Maybe it's the middle-end
and it should arrange for a more natural order on function nests. So
I'd appreciate if you can investigate this side of the issue a bit,
that is, simply avoid the bad ordering.
Reordering compilation of function nests was the first idea I had in
mind when I first worked on this issue, maybe two years ago. I thought
it would make sense debug info generation-wise, but I wondered if this
specific order was motivated by code generation concerns.
Anyway I agree it would be a more elegant way out. As the GNU cauldron
is going to keep me busy, I think I’ll investigate this way next week.
Thanks again! :-)
--
Pierre-Marie de Rodat