From: Thomas Schwinge <thomas@codesourcery.com>
To: Richard Biener <rguenther@suse.de>,
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
Bernd Schmidt <bschmidt@redhat.com>
Cc: <gcc-patches@gcc.gnu.org>, <jason@redhat.com>
Subject: Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations (was: [PATCH] Refactor section/label init for early LTO debug)
Date: Wed, 28 Sep 2016 09:51:00 -0000 [thread overview]
Message-ID: <87lgycnzne.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <alpine.LSU.2.11.1609271227570.26629@t29.fhfr.qr>
[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]
Hi!
On Tue, 27 Sep 2016 12:34:46 +0200 (CEST), Richard Biener <rguenther@suse.de> 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
>
> - /* Make sure the line number table for .text always exists. */
> - text_section_line_info = new_line_info_table ();
> - text_section_line_info->end_label = text_end_label;
> -
> -#ifdef DWARF2_LINENO_DEBUGGING_INFO
> - cur_line_info_table = text_section_line_info;
> -#endif
> -
> /* If front-ends already registered a main translation unit but we were
> not
> ready to perform the association, do this now. */
> if (main_translation_unit != NULL_TREE)
> @@ -25688,6 +25710,14 @@ dwarf2out_assembly_start (void)
> ASM_OUTPUT_LABEL (asm_out_file, text_section_label);
> #endif
>
> + /* Make sure the line number table for .text always exists. */
> + text_section_line_info = new_line_info_table ();
> + text_section_line_info->end_label = text_end_label;
> +
> +#ifdef DWARF2_LINENO_DEBUGGING_INFO
> + cur_line_info_table = 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 <thomas@codesourcery.com>
Date: Wed Sep 28 10:55:23 2016 +0200
Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations
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_hooks =
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üße
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2016-09-28 9:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 13:34 [PATCH] Refactor section/label init for early LTO debug Richard Biener
2016-09-23 19:37 ` Jason Merrill
2016-09-27 10:23 ` Rainer Orth
2016-09-27 10:41 ` Richard Biener
2016-09-27 10:55 ` Rainer Orth
2016-09-28 8:04 ` Richard Biener
2016-09-28 8:37 ` Richard Biener
2016-09-28 9:51 ` Thomas Schwinge [this message]
2016-09-28 10:00 ` Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations (was: [PATCH] Refactor section/label init for early LTO debug) Richard Biener
2016-10-12 13:15 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgycnzne.fsf@kepler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=rguenther@suse.de \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).