This makes the line number info for the end of a function match what the
authorNick Clifton <nickc@redhat.com>
Thu, 26 Aug 1999 12:13:01 +0000 (12:13 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 26 Aug 1999 12:13:01 +0000 (12:13 +0000)
standard specifies.  The current code could confuse a debugger.

gas/ChangeLog
gas/dwarf2dbg.c

index 495eb4978a1b16b194eca4e564f16f8215ab6d95..7512e93840cb3720daac82b6a47a1daacd6b6f3e 100644 (file)
@@ -1,3 +1,10 @@
+1999-08-26  David Mosberger  <davidm@hpl.hp.com>
+
+        * dwarf2dbg.c (out_end_sequence): If address changed, directly
+       output "advance_pc" opcode instead of calling gen_addr_line().
+       The latter has the undesired side-effect of creating a new row
+       in the debug line info matrix. 
+
 1999-08-26  Jim Wilson  <wilson@cygnus.com>
 
        * dwarf2dbg.c (out_end_sequence): Correct comments.  Set last to
index 230e189d8786c991ebe37953736273bfd4a01784..c45d598ffc0486c44920eb70c0ab26e4b9669a84 100644 (file)
@@ -341,9 +341,15 @@ out_end_sequence ()
        }
       else
        {
-         delta = addr - ls.sm.addr;
+         delta = (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH;
          if (delta > 0)
-           gen_addr_line (0, delta / DWARF2_LINE_MIN_INSN_LENGTH);
+           {
+             /* Advance address without updating the line-debug
+                matrix---the end_sequence entry is used only to tell
+                the debugger the end of the sequence.*/
+             out_opcode (DW_LNS_advance_pc);
+             out_uleb128 (delta);
+           }
        }
     }
   else
This page took 0.028404 seconds and 4 git commands to generate.