Dwarf: incremental also needs end_sequence

The spec says that addresses can only increase within a sequence, so
every decl must be a separate sequence since they are not sorted.
This commit is contained in:
Jacob Young 2024-08-16 14:44:41 -04:00
parent ad634537ce
commit 00ca818805

View File

@ -1855,12 +1855,10 @@ pub fn finishWipNav(
try dwarf.debug_info.section.replaceEntry(wip_nav.unit, wip_nav.entry, dwarf, wip_nav.debug_info.items);
if (wip_nav.debug_line.items.len > 0) {
if (!dwarf.incremental()) {
const dlw = wip_nav.debug_line.writer(dwarf.gpa);
try dlw.writeByte(DW.LNS.extended_op);
try uleb128(dlw, 1);
try dlw.writeByte(DW.LNE.end_sequence);
}
const dlw = wip_nav.debug_line.writer(dwarf.gpa);
try dlw.writeByte(DW.LNS.extended_op);
try uleb128(dlw, 1);
try dlw.writeByte(DW.LNE.end_sequence);
try dwarf.debug_line.section.replaceEntry(wip_nav.unit, wip_nav.entry, dwarf, wip_nav.debug_line.items);
}
try dwarf.debug_loclists.section.replaceEntry(wip_nav.unit, wip_nav.entry, dwarf, wip_nav.debug_loclists.items);