| ... | ... | @@ -7189,7 +7189,6 @@ fn prelinkInner(elf: *Elf) Error!void { |
| 7189 | 7189 | }) |debug_shndx| { |
| 7190 | 7190 | if (debug_shndx == .UNDEF) continue; |
| 7191 | 7191 | const debug_ni = debug_shndx.get(elf).ni; |
| 7192 | | _ = debug_ni.last(&elf.mf).unwrap() orelse continue; |
| 7193 | 7192 | const frame_format = debug_shndx.debugFrameFormat(elf); |
| 7194 | 7193 | const unit_padding_ni = elf.addNodeAssumeCapacity( |
| 7195 | 7194 | try debug_ni.addFloatingChild(gpa, &elf.mf, .{ |
| ... | ... | @@ -8941,7 +8940,6 @@ fn updateFuncInner( |
| 8941 | 8940 | .debug_frame => elf.shndx.debug_frame, |
| 8942 | 8941 | .eh_frame => elf.shndx.eh_frame, |
| 8943 | 8942 | }.get(elf).ni; |
| 8944 | | try frame_ni.trimStart(gpa, &elf.mf); |
| 8945 | 8943 | switch (wip_nav.frame_format) { |
| 8946 | 8944 | .debug_frame => {}, |
| 8947 | 8945 | .eh_frame => { |
| ... | ... | @@ -8953,11 +8951,6 @@ fn updateFuncInner( |
| 8953 | 8951 | }, |
| 8954 | 8952 | .dwarf2 => |debug| { |
| 8955 | 8953 | try debug.finishFunc(func_length); |
| 8956 | | for ([3]Section.Index{ |
| 8957 | | elf.shndx.debug_info, |
| 8958 | | elf.shndx.debug_line, |
| 8959 | | elf.shndx.debug_rnglists, |
| 8960 | | }) |debug_shndx| try debug_shndx.get(elf).ni.trimStart(gpa, &elf.mf); |
| 8961 | 8954 | const unit = debug.wip_nav.unit.get(debug.wip_nav.dwarf); |
| 8962 | 8955 | { |
| 8963 | 8956 | const debug_info_ni = unit.debug_info_ni.unwrap().?; |
| ... | ... | @@ -10928,19 +10921,21 @@ pub fn printNode( |
| 10928 | 10921 | const zcu = elf.base.comp.zcu.?; |
| 10929 | 10922 | const ip = &zcu.intern_pool; |
| 10930 | 10923 | const nav = ip.getNav(gi.nav(&elf.dwarf)); |
| 10931 | | try w.print("({f}, {f})", .{ |
| 10932 | | Type.fromInterned(nav.resolved.?.type).fmt(.{ .zcu = zcu, .tid = tid }), |
| 10933 | | nav.fqn.fmt(ip), |
| 10924 | try w.writeByte('('); |
| 10925 | if (nav.resolved) |resolved| try w.print("{f}, ", .{ |
| 10926 | Type.fromInterned(resolved.type).fmt(.{ .zcu = zcu, .tid = tid }), |
| 10934 | 10927 | }); |
| 10928 | try w.print("{f})", .{nav.fqn.fmt(ip)}); |
| 10935 | 10929 | }, |
| 10936 | 10930 | .func_frame_fde, .func_debug_info, .func_debug_line => |fi| { |
| 10937 | 10931 | const zcu = elf.base.comp.zcu.?; |
| 10938 | 10932 | const ip = &zcu.intern_pool; |
| 10939 | 10933 | const nav = ip.getNav(fi.nav(&elf.dwarf)); |
| 10940 | | try w.print("({f}, {f})", .{ |
| 10941 | | Type.fromInterned(nav.resolved.?.type).fmt(.{ .zcu = zcu, .tid = tid }), |
| 10942 | | nav.fqn.fmt(ip), |
| 10934 | try w.writeByte('('); |
| 10935 | if (nav.resolved) |resolved| try w.print("{f}, ", .{ |
| 10936 | Type.fromInterned(resolved.type).fmt(.{ .zcu = zcu, .tid = tid }), |
| 10943 | 10937 | }); |
| 10938 | try w.print("{f})", .{nav.fqn.fmt(ip)}); |
| 10944 | 10939 | }, |
| 10945 | 10940 | .decl_debug_info => |di| { |
| 10946 | 10941 | const comp = elf.base.comp; |
| ... | ... | @@ -10948,10 +10943,7 @@ pub fn printNode( |
| 10948 | 10943 | const ip = &zcu.intern_pool; |
| 10949 | 10944 | const src_inst = di.srcInst(&elf.dwarf); |
| 10950 | 10945 | try w.print("({f}, ", .{zcu.fileByIndex(src_inst.resolveFile(ip)).path.fmt(comp)}); |
| 10951 | | if (src_inst.resolve(ip)) |inst| |
| 10952 | | try w.print("%{d}", .{inst}) |
| 10953 | | else |
| 10954 | | try w.writeAll("lost"); |
| 10946 | if (src_inst.resolve(ip)) |inst| try w.print("%{d}", .{inst}) else try w.writeAll("lost"); |
| 10955 | 10947 | try w.writeByte(')'); |
| 10956 | 10948 | }, |
| 10957 | 10949 | } |