| ... | @@ -1126,18 +1126,6 @@ pub fn commitDeclDebugInfo( | ... | @@ -1126,18 +1126,6 @@ pub fn commitDeclDebugInfo( |
| 1126 | mem.writeIntLittle(u32, ptr, @intCast(u32, text_block.size)); | 1126 | mem.writeIntLittle(u32, ptr, @intCast(u32, text_block.size)); |
| 1127 | } | 1127 | } |
| 1128 | | 1128 | |
| 1129 | { | | |
| 1130 | // Advance line and PC. | | |
| 1131 | // TODO encapsulate logic in a helper function. | | |
| 1132 | try dbg_line_buffer.append(DW.LNS.advance_pc); | | |
| 1133 | try leb.writeULEB128(dbg_line_buffer.writer(), text_block.size); | | |
| 1134 | | | |
| 1135 | try dbg_line_buffer.append(DW.LNS.advance_line); | | |
| 1136 | const func = decl.val.castTag(.function).?.data; | | |
| 1137 | const line_off = @intCast(u28, func.rbrace_line - func.lbrace_line); | | |
| 1138 | try leb.writeULEB128(dbg_line_buffer.writer(), line_off); | | |
| 1139 | } | | |
| 1140 | | | |
| 1141 | try dbg_line_buffer.appendSlice(&[_]u8{ DW.LNS.extended_op, 1, DW.LNE.end_sequence }); | 1129 | try dbg_line_buffer.appendSlice(&[_]u8{ DW.LNS.extended_op, 1, DW.LNE.end_sequence }); |
| 1142 | | 1130 | |
| 1143 | // Now we have the full contents and may allocate a region to store it. | 1131 | // Now we have the full contents and may allocate a region to store it. |