| ... | @@ -1057,17 +1057,16 @@ pub const File = struct { | ... | @@ -1057,17 +1057,16 @@ pub const File = struct { |
| 1057 | const init_len_index = di_buf.items.len; | 1057 | const init_len_index = di_buf.items.len; |
| 1058 | di_buf.items.len += init_len_size; | 1058 | di_buf.items.len += init_len_size; |
| 1059 | const after_init_len = di_buf.items.len; | 1059 | const after_init_len = di_buf.items.len; |
| 1060 | mem.writeInt(u16, di_buf.addManyAsArrayAssumeCapacity(2), 5, target_endian); // DWARF version | 1060 | mem.writeInt(u16, di_buf.addManyAsArrayAssumeCapacity(2), 4, target_endian); // DWARF version |
| 1061 | di_buf.appendAssumeCapacity(DW.UT_compile); | | |
| 1062 | const abbrev_offset = self.debug_abbrev_table_offset.?; | 1061 | const abbrev_offset = self.debug_abbrev_table_offset.?; |
| 1063 | switch (self.ptr_width) { | 1062 | switch (self.ptr_width) { |
| 1064 | .p32 => { | 1063 | .p32 => { |
| 1065 | di_buf.appendAssumeCapacity(4); // address size | | |
| 1066 | mem.writeInt(u32, di_buf.addManyAsArrayAssumeCapacity(4), @intCast(u32, abbrev_offset), target_endian); | 1064 | mem.writeInt(u32, di_buf.addManyAsArrayAssumeCapacity(4), @intCast(u32, abbrev_offset), target_endian); |
| | 1065 | di_buf.appendAssumeCapacity(4); // address size |
| 1067 | }, | 1066 | }, |
| 1068 | .p64 => { | 1067 | .p64 => { |
| 1069 | di_buf.appendAssumeCapacity(8); // address size | | |
| 1070 | mem.writeInt(u64, di_buf.addManyAsArrayAssumeCapacity(8), abbrev_offset, target_endian); | 1068 | mem.writeInt(u64, di_buf.addManyAsArrayAssumeCapacity(8), abbrev_offset, target_endian); |
| | 1069 | di_buf.appendAssumeCapacity(8); // address size |
| 1071 | }, | 1070 | }, |
| 1072 | } | 1071 | } |
| 1073 | // Write the form for the compile unit, which must match the abbrev table above. | 1072 | // Write the form for the compile unit, which must match the abbrev table above. |