From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89081 invoked by alias); 28 Sep 2016 09:26:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 89025 invoked by uid 89); 28 Sep 2016 09:26:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=25397, 2539,7, Hx-languages-length:2442, H*r:PDT X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 09:26:41 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1bpB8O-0003HE-GW from Thomas_Schwinge@mentor.com ; Wed, 28 Sep 2016 02:26:36 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Wed, 28 Sep 2016 02:26:36 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 9605DC2319; Wed, 28 Sep 2016 02:26:35 -0700 (PDT) From: Thomas Schwinge To: Richard Biener , Rainer Orth , Bernd Schmidt CC: , Subject: Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations (was: [PATCH] Refactor section/label init for early LTO debug) In-Reply-To: References: User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Wed, 28 Sep 2016 09:51:00 -0000 Message-ID: <87lgycnzne.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2016-09/txt/msg02104.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2471 Hi! On Tue, 27 Sep 2016 12:34:46 +0200 (CEST), Richard Biener wrote: > --- gcc/dwarf2out.c (revision 240521) > +++ gcc/dwarf2out.c (working copy) > @@ -25657,14 +25687,6 @@ dwarf2out_init (const char *filename ATT > vec_alloc (macinfo_table, 64); > #endif >=20=20 > - /* Make sure the line number table for .text always exists. */ > - text_section_line_info =3D new_line_info_table (); > - text_section_line_info->end_label =3D text_end_label; > - > -#ifdef DWARF2_LINENO_DEBUGGING_INFO > - cur_line_info_table =3D text_section_line_info; > -#endif > - > /* If front-ends already registered a main translation unit but we wer= e=20 > not > ready to perform the association, do this now. */ > if (main_translation_unit !=3D NULL_TREE) > @@ -25688,6 +25710,14 @@ dwarf2out_assembly_start (void) > ASM_OUTPUT_LABEL (asm_out_file, text_section_label); > #endif >=20=20 > + /* Make sure the line number table for .text always exists. */ > + text_section_line_info =3D new_line_info_table (); > + text_section_line_info->end_label =3D text_end_label; > + > +#ifdef DWARF2_LINENO_DEBUGGING_INFO > + cur_line_info_table =3D text_section_line_info; > +#endif > + > if (HAVE_GAS_CFI_SECTIONS_DIRECTIVE > && dwarf2out_do_cfi_asm () > && (!(flag_unwind_tables || flag_exceptions) (This got committed in r240545.) For DWARF2_LINENO_DEBUGGING_INFO configurations (that is, nvptx; Bernd CCed, who originally authored the DWARF2_LINENO_DEBUGGING_INFO support), this breaks things because of uninitialized text_section_line_info/cur_line_info_table. OK to fix as follows? commit e745307ac5a90e999133dfeeee21139526230e81 Author: Thomas Schwinge Date: Wed Sep 28 10:55:23 2016 +0200 Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations =20=20=20=20 gcc/ * dwarf2out.c (dwarf2_lineno_debug_hooks): Use dwarf2out_assembly_start. --- gcc/dwarf2out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git gcc/dwarf2out.c gcc/dwarf2out.c index 51cab42..8c18c4c 100644 --- gcc/dwarf2out.c +++ gcc/dwarf2out.c @@ -2539,7 +2539,7 @@ const struct gcc_debug_hooks dwarf2_lineno_debug_hook= s =3D dwarf2out_init, debug_nothing_charstar, debug_nothing_charstar, - debug_nothing_void, + dwarf2out_assembly_start, debug_nothing_int_charstar, debug_nothing_int_charstar, debug_nothing_int_charstar, Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJX64zGAAoJEK3/DN1sMFFt6YQIAJY6OOISdnH98H8dZCWO4box 1WuVSNnZTdKv9Z4mJk2RV0lItQdYR9Ln7m9STVog+z/bR6TyLZk37dFkmZda/FWr vpBhbA0F3zfF1lhUfFLQUm+XCqD/h3aOBvCSg/UYF2efBwbK+vUwkvULytK9Wfs6 uU3E20RbcDv6xYWkVO7T6n6I4M/Dbn17ja9ofVkVMIHPg0FiESD7BIdnX/ivCl/0 TANTMUZeFZdfC0ouwxz9ygjhz69cbRrRfhJdEf/7YW9EsCeWFzI9gkEfeowpOlqZ cRED6SsPbZvJIXeOYxVE/rRL9ZblYnofTwsJIQXTNVEQyp5zhwrgGlhbP55qMWM= =DqQH -----END PGP SIGNATURE----- --=-=-=--