aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-26 12:13:01 +0000
committerNick Clifton <nickc@redhat.com>1999-08-26 12:13:01 +0000
commit09a798eacc256a0368dc1e8805372d319cffd9b6 (patch)
treeaf38c4d30154a503c4793181572c4c70c28130bd /gas/dwarf2dbg.c
parente1c05f12ca540a443f91f3eee91dfb6903cedac5 (diff)
downloadfsf-binutils-gdb-09a798eacc256a0368dc1e8805372d319cffd9b6.zip
fsf-binutils-gdb-09a798eacc256a0368dc1e8805372d319cffd9b6.tar.gz
fsf-binutils-gdb-09a798eacc256a0368dc1e8805372d319cffd9b6.tar.bz2
This makes the line number info for the end of a function match what the
standard specifies. The current code could confuse a debugger.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 230e189..c45d598 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -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