[[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

Jose E. Marchesi jose.marchesi@oracle.com
Thu Jun 24 15:13:38 GMT 2021

>>>> This patch introduces a dwarf2int.h header, to be used by code that
>>>> needs access to the internal DIE structures and their attributes.
>>> Why not put these bits in dwarf2out.h?
>> We think that it makes sense to have a separated interface file for
>> the
>> implementation of DWARF-based debug formats.  It is called `internal'
>> because it provides access to internal data structures as well as the
>> basic accessor functions to the internals of the DWARF DIEs.
> Yes, but "internal data structures" also describes most of the current
> dwarf2out.h.

Yes right, dwarf2out.h contains a mixture of function prototypes and
several data structures, many of them "internal".

> I'm not opposed to refactoring the header, but splitting 
> off a dwarf2cfi.h (for print-rtl.c and final.c) seems like a better
> dividing line.

Ok, so what about this: at this point we remove dwarf2int.h from our
patch, put the definitions in dwarf2out.h instead, and then once the
stuff is upstream we can discuss on how better refactor the dwarf2out*

Is that ok?

More information about the Gcc-patches mailing list