This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.
- From: Mark Wielaard <mark at klomp dot org>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Apr 2018 18:18:20 +0200
- Subject: Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.
- References: <1524928992-18156-1-git-send-email-mark@klomp.org> <4488372.nvp5xPsED8@polaris>
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 DebugFission didn't have a header for .debug_addr. */
> > + if (dwarf_version >= 5)
>
> That sounds LLVMish... Did you mean -gsplit-dwarf instead?
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/wiki/DebugFission
This got standardized for DWARF5. But there are some differences. One
particular change is that GNU DebugFission doesn't have address table
headers in .debug_addr sections. But DWARF5 does. This patch fixes
that.
Or did you mean that you expected the code to be guarded by
if (dwarf_split_debug_info)? It is, just a bit higher up in the code.
Cheers,
Mark