diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/function.c | 23 |
2 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99ea250..9248a10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-02-17 Mark Mitchell <mark@codesourcery.com> + + * function.c (thread_prologue_and_epilogue_insns): Put a line note + after the prologue. + 2000-02-17 Nick Clifton <nickc@cygnus.com> * config/arm/thumb.c: Replace includes of system headers with diff --git a/gcc/function.c b/gcc/function.c index dd4bcb9..914cc95 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 (); |