This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Ping: [Patch]: Fix call to end_prologue debug hook
- From: Tristan Gingold <gingold at adacore dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Tue, 29 May 2012 11:08:39 +0200
- Subject: Ping: [Patch]: Fix call to end_prologue debug hook
- References: <0F2FAA8B-7702-4D4F-BE29-76DDC0AD4FDD@adacore.com>
Ping for:
On May 15, 2012, at 11:26 AM, Tristan Gingold wrote:
> Hi,
>
> the end_prologue debug hook (only used by dwarf on VMS) is currently called at the NOTE_INSN_FUNCTION_BEG. This is not what its name implies, neither what the VMS debugger expect and neither what a comment in dwarf2out.c says:
>
> /* Recall that this end-of-prologue indication is *not* the same thing
> as the end_prologue debug hook. The NOTE_INSN_PROLOGUE_END note,
> to which the hook corresponds, follows the last insn that was
> emitted by gen_prologue. What we need is to preceed the first insn
> that had been emitted after NOTE_INSN_FUNCTION_BEG, i.e. the first
> insn that corresponds to something the user wrote. These may be
> very different locations once scheduling is enabled. */
>
> This is fixed by this patch.
>
> No regressions on x86_64 GNU/Linux.
>
> Ok for trunk ?
>
> Tristan.
>
> 2012-05-15 Tristan Gingold <gingold@adacore.com>
>
> * final.c (final_scan_insn): Move call to end_prologue debug hook
> to the NOTE_INSN_PROLOGUE_END.
>
> diff --git a/gcc/final.c b/gcc/final.c
> index 718caf1..6efa06f 100644
> --- a/gcc/final.c
> +++ b/gcc/final.c
> @@ -1961,6 +1961,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTR
> case NOTE_INSN_PROLOGUE_END:
> targetm.asm_out.function_end_prologue (file);
> profile_after_prologue (file);
> + if (!DECL_IGNORED_P (current_function_decl))
> + debug_hooks->end_prologue (last_linenum, last_filename);
>
> if ((*seen & (SEEN_EMITTED | SEEN_NOTE)) == SEEN_NOTE)
> {
> @@ -1989,8 +1991,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTR
>
> case NOTE_INSN_FUNCTION_BEG:
> app_disable ();
> - if (!DECL_IGNORED_P (current_function_decl))
> - debug_hooks->end_prologue (last_linenum, last_filename);
>
> if ((*seen & (SEEN_EMITTED | SEEN_NOTE)) == SEEN_NOTE)
> {
>