Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Jakub Jelinek
On Sat, Apr 28, 2018 at 08:54:00PM +0200, Eric Botcazou wrote: > > I don't know what LLVMish does, or whether it implements the GNU > > DebugFission variant of split DWARF, the DWARF5 variant or something > > else. For GCC -gsplit-dwarf generates GNU DebugFission output > > (including .debug_addr)

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
On Sat, Apr 28, 2018 at 08:54:00PM +0200, Eric Botcazou wrote: > > For GCC -gsplit-dwarf generates GNU DebugFission output > > (including .debug_addr) for older DWARF versions. > > It is described here: https://gcc.gnu.org/wiki/DebugFission > > Yes, that's what I was referring to. DebugFission is

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Jakub Jelinek
On Sat, Apr 28, 2018 at 09:01:45PM +0200, Mark Wielaard wrote: > gcc/ChangeLog > > * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for > dwarf_version >= 5. > (dwarf_AT): Handle DW_AT_addr_base. > (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_add

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
On Sat, Apr 28, 2018 at 06:36:02PM +0200, Jakub Jelinek wrote: > On Sat, Apr 28, 2018 at 05:23:12PM +0200, Mark Wielaard wrote: > >switch_to_section (debug_addr_section); > > + /* GNU DebugFission didn't have a header for .debug_addr. */ > > + if (dwarf_version >= 5) > > + { >

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Eric Botcazou
> I don't know what LLVMish does, or whether it implements the GNU > DebugFission variant of split DWARF, the DWARF5 variant or something > else. For GCC -gsplit-dwarf generates GNU DebugFission output > (including .debug_addr) for older DWARF versions. > It is described here: https://gcc.gnu.org/w

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Jakub Jelinek
On Sat, Apr 28, 2018 at 05:23:12PM +0200, Mark Wielaard wrote: > GNU DebugFission didn't add table headers for the .debug_addr > tables, but DWARF5 does. The table header make it possible > for a DWARF consumer to parse the address tables without having > to index all .debug_info CUs first. We can

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
Hi Eric, On Sat, 2018-04-28 at 18:00 +0200, Eric Botcazou wrote: > > index d3d925d..51d0ca4 100644 > > --- a/gcc/dwarf2out.c > > +++ b/gcc/dwarf2out.c > > @@ -31293,6 +31293,21 @@ dwarf2out_finish (const char *) > >   } > > > >    switch_to_section (debug_addr_section); > > +  /* GNU De

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Eric Botcazou
> index d3d925d..51d0ca4 100644 > --- a/gcc/dwarf2out.c > +++ b/gcc/dwarf2out.c > @@ -31293,6 +31293,21 @@ dwarf2out_finish (const char *) > } > >switch_to_section (debug_addr_section); > + /* GNU DebugFission didn't have a header for .debug_addr. */ > + if (dwarf_version

[PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
GNU DebugFission didn't add table headers for the .debug_addr tables, but DWARF5 does. The table header make it possible for a DWARF consumer to parse the address tables without having to index all .debug_info CUs first. We can keep using the .debug_addr section label as is, because the DW_AT_addr_