⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2004-10-28 18:35:59.0 +00:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2004-10-28 18:35:59.0 +00:00:00
commit
cb1ff25317a95cd0d47792e2f32caf475641262b [patch]
tree
c88d7d3ad2d061b16fbff7e0d927855ddf7791a7
parent
cd8c180f96ddff38d31dce9c272aa39f99d8b684
download
cb1ff25317a95cd0d47792e2f32caf475641262b.tar.gz

fix position of source-line labels when generating debug info.

git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9619 a95241bf-73f2-0310-859d-f6bbb57e9c96

Diff

 gcc/gcc/final.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/gcc/final.c b/gcc/gcc/final.c
index 7a31cde..0859477 100644
--- a/gcc/gcc/final.c
+++ b/gcc/gcc/final.c
@@ -1585,9 +1585,25 @@
     FILE *file;
     int optimize;
{
  rtx insn; 
  block_depth = 0;

  this_is_asm_operands = 0;

  /* [zooey]: gcc-2.95.3 generates incorrect source-line labels when generating
     debug-info because this function is called with first pointing to an note-insn
     that has been deleted (whose NOTE_LINE_NUMBER == NOTE_INSN_DELETED).
     In order to generate correct source-line labels, we skip to the first insn 
     which has a line-number (if any).
     The result of this is a much improved debugging experience...
   */
  if (NOTE_LINE_NUMBER (first) == NOTE_INSN_DELETED)
    for (insn = first; insn; insn = NEXT_INSN (insn))
      if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
        {
	  first = insn;
	  break;
        }

#ifdef NON_SAVING_SETJMP
  /* A function that calls setjmp should save and restore all the