This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>, Jason Merrill <jason at redhat dot com>, David Malcolm <dmalcolm at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 4 Feb 2015 23:19:10 +0100
- Subject: Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}
- Authentication-results: sourceware.org; auth=none
- References: <20150127181926 dot GK1746 at tucnak dot redhat dot com> <CAHACq4qBLwu2eaPejywhVZ_91qJo_oMPtf5PY6vzCOO8i56JEA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 04, 2015 at 01:58:32PM -0800, Cary Coutant wrote:
> > DW_LANG_Fortran03 and DW_LANG_Fortran08 DW_AT_language values were recently
> > accepted into DWARF5. This patch changes GCC to handle those similarly to
> > how e.g. the -std=c++11, -std=c++14 or -std=c11 are handled.
> >
> > As it will take some time for consumers to catch up, I'm enabling that
> > only if -gdwarf-5 is used for now.
>
> My concern with enabling -gdwarf-5 at this point is that all we're
> really doing with it is enabling a subset of DWARF-5 features (as we
Yeah, sure, at this point -gdwarf-5 is highly experimental, mainly meant
for coordination with consumers. We'll incrementally add bits to it, until
DWARF5 will be released and we implement everything we'll want to from the
new standard. Then we need to wait for consumers to catch up and only then
we can switch to -gdwarf-5 by default (perhaps GCC 7.0 timeframe?).
> did with -gdwarf-4). We're still putting a version number of 2 in the
> compilation unit header! But I guess even upgrading the CU header to
We are not. On most targets we default to -gdwarf-4 and emit v. 4:
.section .debug_info,"",@progbits
.Ldebug_info0:
.long 0xae # Length of Compilation Unit Info
.value 0x4 # DWARF version number
.long .Ldebug_abbrev0 # Offset Into Abbrev. Section
.byte 0x8 # Pointer Size (in bytes)
.uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
.long .LASF0 # DW_AT_producer: "GNU C11 5.0.0 20150204 (experimental) -g -O2"
It is only Darwin where because of broken toolchain we need to stick to
DWARF2, because otherwise the buggy tools crash on it (and I think VxWorks).
Jakub