This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
patch for gas/dwarf2dbg.c, dwarf2 std conformance problem
- To: binutils@sourceware.cygnus.com
- Subject: patch for gas/dwarf2dbg.c, dwarf2 std conformance problem
- From: Jim Wilson <wilson@cygnus.com>
- Date: Wed, 25 Aug 1999 20:49:16 -0700
- cc: wilson@cygnus.com, rth@cygnus.com
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