On Mon, Oct 17, 2016 at 10:45 AM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Mon, Oct 17, 2016 at 10:36:48AM +0200, Richard Biener wrote:
>> GCC would have to cease supporting the stabs variants or output them
>> from the DWARF IL we have.  I believe this is what LLVM does.
>> (I specifically discouraged the AdaCore folks from writing a windows
>> debug format within the current framework).
>> Your langhook could have been sth like lang_hooks.annotate_die
>> (dw_die_ref *, tree)
>> with exposing the dwarf API and thus letting the FE amend a DIE as it likes
>> (instead of just exposing three attributes).
> I think that would risk FEs would then repeat too much stuff that dwarf2out
> could do for them, many attributes are used by multiple languages for the
> same or similar purpose.  E.g. the current langhooks for DW_AT_inline is used
> multiple times, not just to add the attribute but also for other purposes
> before it happens.  Plus allowing other files to use the dwarf2out
> infrastructure would be quite a lot of work.

Sure.  But the current way of trying to put everything into trees somewhere and
then make dwarf2out reverse-engineer stuff doesn't really scale.  Yes, adding
more langhooks and more debug hooks would be the current canonical way
of addressing things in a better way.  But then debug hooks would just become
high-level entry into the DWARF machinery.

> As for emitting other debug formats from DWARF, I guess that is reasonable,
> but the question is whether anybody still cares about stabs enough to
> convert it.

I'd be happy to remove stabs support but IIRC we still have targets that default
to stabs.


>         Jakub

Reply via email to