╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ crash_report.zig ─────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
172 }; 173 try stderr.print( 174 \\ For full context, use the command 175 \\ {s} ast-check -t {f} 176 \\ 177 \\ 178 , .{ zig_argv0, file.path.fmt(comp) }); 179 180 var parent = anal.parent; 181 while (parent) |curr| { 182 fba.reset(); 183 const cur_block_file = zcu.fileByIndex(curr.block.src_base_inst.resolveFile(&zcu.intern_pool)); 184 try stderr.print(" in {f}\n", .{cur_block_file.path.fmt(comp)}); 185 _, const cur_block_src_base_node = Zcu.LazySrcLoc.resolveBaseNode(curr.block.src_base_inst, zcu) orelse { 186 try stderr.writeAll(" > [lost instruction; this should not happen]\n"); 187 parent = curr.parent; 188 continue; 189 }; 190 try stderr.writeAll(" > "); 191 print_zir.renderSingleInstruction( 192 fba.allocator(), 193 curr.body[curr.body_index], 194 cur_block_file, 195 cur_block_src_base_node, 196 6, // indent 197 stderr, 198 ) catch |err| switch (err) { 199 error.OutOfMemory => try stderr.writeAll(" <out of memory dumping zir>\n"), 200 else => |e| return e, 201 }; 202 try stderr.writeAll("\n"); 203 204 parent = curr.parent; 205 } 206 207 try stderr.writeByte('\n'); 208 } 209 210 const std = @import("std"); 211 const Io = std.Io; 212 const Zir = std.zig.Zir; 213 214 const Sema = @import("Sema.zig"); 215 const Zcu = @import("Zcu.zig"); 216 const link = @import("link.zig"); 217 const InternPool = @import("InternPool.zig"); 218 const print_zir = @import("print_zir.zig"); 219 220 const build_options = @import("build_options"); 221