This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for gas/dwarf2dbg.c, dwarf2 std conformance problem


This makes the line number info for the end of a function match what the
standard specifies.  The current code could confuse a debugger.

1999-08-23  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.

Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/dwarf2dbg.c,v
retrieving revision 1.7
diff -p -r1.7 dwarf2dbg.c
*** dwarf2dbg.c	1999/07/23 22:12:34	1.7
--- dwarf2dbg.c	1999/08/26 03:43:56
*************** out_end_sequence ()
*** 341,349 ****
  	}
        else
  	{
! 	  delta = addr - ls.sm.addr;
  	  if (delta > 0)
! 	    gen_addr_line (0, delta / DWARF2_LINE_MIN_INSN_LENGTH);
  	}
      }
    else
--- 341,355 ----
  	}
        else
  	{
! 	  delta = (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH;
  	  if (delta > 0)
! 	    {
! 	      /* 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]