From: Mark Mitchell Date: Thu, 17 Feb 2000 20:15:50 +0000 (+0000) Subject: function.c (thread_prologue_and_epilogue_insns): Put a line note after the prologue. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9185a8d526d92f84d14f4e25734441ea6a69a0f6;p=gcc.git function.c (thread_prologue_and_epilogue_insns): Put a line note after the prologue. * function.c (thread_prologue_and_epilogue_insns): Put a line note after the prologue. From-SVN: r32037 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99ea250022e..9248a10c3a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-02-17 Mark Mitchell + + * function.c (thread_prologue_and_epilogue_insns): Put a line note + after the prologue. + 2000-02-17 Nick Clifton * config/arm/thumb.c: Replace includes of system headers with diff --git a/gcc/function.c b/gcc/function.c index dd4bcb9d089..914cc959f52 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6626,6 +6626,8 @@ thread_prologue_and_epilogue_insns (f) #ifdef HAVE_prologue if (HAVE_prologue) { + rtx insn; + start_sequence (); seq = gen_prologue(); emit_insn (seq); @@ -6634,8 +6636,27 @@ thread_prologue_and_epilogue_insns (f) if (GET_CODE (seq) != SEQUENCE) seq = get_insns (); prologue = record_insns (seq); - emit_note (NULL, NOTE_INSN_PROLOGUE_END); + + /* GDB handles `break f' by setting a breakpoint on the first + line note *after* the prologue. That means that we should + insert a line note here; otherwise, if the next line note + comes part way into the next block, GDB will skip all the way + to that point. */ + insn = next_nonnote_insn (f); + while (insn) + { + if (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) >= 0) + { + emit_line_note_force (NOTE_SOURCE_FILE (insn), + NOTE_LINE_NUMBER (insn)); + break; + } + + insn = PREV_INSN (insn); + } + seq = gen_sequence (); end_sequence ();