diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-02-17 20:15:50 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-02-17 20:15:50 +0000 |
commit | 9185a8d526d92f84d14f4e25734441ea6a69a0f6 (patch) | |
tree | b03d9e056780762fe4275ffb3de8e1ab8dbb40d5 | |
parent | de3cb4e4c18d35375226e557402ec64b6c70d5ef (diff) | |
download | gcc-9185a8d526d92f84d14f4e25734441ea6a69a0f6.zip gcc-9185a8d526d92f84d14f4e25734441ea6a69a0f6.tar.gz gcc-9185a8d526d92f84d14f4e25734441ea6a69a0f6.tar.bz2 |
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
-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 (); |