This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][2/2] early LTO debug, main part
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Sep 2017 17:24:14 +0200
- Subject: Re: [PATCH][2/2] early LTO debug, main part
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jakub at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 631B268D3
- References: <alpine.LSU.2.20.1705191235260.20726@zhemvz.fhfr.qr> <7c94dcc5-ee25-76ca-8abb-e0a22b57cba2@redhat.com> <alpine.LSU.2.20.1708021029230.10808@zhemvz.fhfr.qr> <CADzB+2nDWZOom8MaM-dEFjTNwDTRB6Kq0jSAWr=4nXDu702m2A@mail.gmail.com> <alpine.LSU.2.20.1708031142210.10808@zhemvz.fhfr.qr> <CADzB+2nHQOAOmSO86LzGwWgyUm=kKxMk=KeKosMbOXQAkb6rvg@mail.gmail.com> <alpine.LSU.2.20.1708041418140.10808@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Aug 04, 2017 at 02:21:29PM +0200, Richard Biener wrote:
> ! /* Initialize the various sections and labels for dwarf output. */
>
> static void
> ! init_sections_and_labels (void)
...
These changes broke DWARF-5 support. E.g. in gcc-7 and before this change
there was:
> ! if (!dwarf_split_debug_info)
> {
...
> ! debug_loc_section = get_section (dwarf_version >= 5
> ! ? DEBUG_LOCLISTS_SECTION
> ! : DEBUG_LOC_SECTION,
> ! SECTION_DEBUG, NULL);
the above which would use .debug_loclists section for debug_loc_section
instead of .debug_loc for -gdwarf-5, because that is what DWARF-5 requires
and the section content is ABI incompatible. But current trunk does
> ! debug_loc_section = get_section (DEBUG_LOC_SECTION,
> ! SECTION_DEBUG, NULL);
only, so the DWARF-5 content is emitted into .debug_loc section.
Or, there used to be:
> ! if (!dwarf_split_debug_info && !DWARF2_ASM_LINE_DEBUG_INFO)
> ! debug_line_str_section = get_section (DEBUG_LINE_STR_SECTION,
> ! DEBUG_STR_SECTION_FLAGS, NULL);
which has no replacement at all, debug_line_str_hash is NULL and
so !DWARF2_ASM_LINE_DEBUG_INFO compiler ICEs on pretty much all
-gdwarf-5, because it can't emit the strings into that section.
Do you have rough time when you wrote changes to these functions (so that
I could diff init_sections_and_labels changes in between that date and
before your LTO debug changes and find out what needs to be double checked
besides those two)?
I presume we'll need some name for a LTO .debug_loclists variant.
Also, seeing:
#ifndef DEBUG_LINE_SECTION
#define DEBUG_LINE_SECTION ".debug_line"
#endif
#ifndef DEBUG_DWO_LINE_SECTION
#define DEBUG_DWO_LINE_SECTION ".debug_line.dwo"
#endif
#ifndef DEBUG_LTO_LINE_SECTION
#define DEBUG_LTO_LINE_SECTION ".gnu.debuglto_.debug_line.dwo"
#endif
that looks like a pasto, , I'd expect the last one, since it doesn't have
DWO_ in the name, to be just .gnu.debuglto_.debug_line .
Jakub