[Dwarf-Discuss] About self-referencial sized types

Jakub Jelinek jakub@redhat.com
Thu May 15 16:42:52 GMT 2014


On Thu, May 15, 2014 at 06:37:14PM +0200, Pierre-Marie de Rodat wrote:
> On 05/15/2014 04:30 PM, Jakub Jelinek wrote:
> >>Nothing: actually, the internal GCC representation for Ada arrays
> >>bounds (GENERIC trees) is already there and works well for quite a
> >>while. My problem here is that I do not know what DWARF operations
> >>to output in the DW_AT_{lower,upper}_bound attributes in order to
> >>retrieve array "neighbors" members so that we can compute the array
> >>bounds using them.
> >
> >If you are talking about GCC infrastructure here, look what Fortran uses
> >for it's VLAs, most likely this is just a matter of implementing
> >LANG_HOOKS_GET_ARRAY_DESCR_INFO for Ada for the cases where the bounds live
> >somewhere in some descriptor.
> 
> Yes, I've actually already started to work with this lang-hook so we
> can master the DWARF information output for Ada array types (very
> useful!). However, it does not solve the issue of knowing what DWARF
> operations to output in order to compute the bounds of VLAs
> *without* descriptors. (see the end of my 05/14/2014 mail)

You still build some trees in that langhook that describe the bounds etc.
and dwarf2out.c just transforms those trees into DWARF4 expression opcodes.

	Jakub




More information about the Dwarf-discuss mailing list