╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ stack_traces.zig ─────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
247 // that inlinees in PDBs are properly deduplicated. 248 .source = 249 \\pub fn main() void { 250 \\ foo(false); 251 \\ foo(true); 252 \\} 253 \\inline fn foo(b: bool) void { 254 \\ if (b) @panic("oh no"); 255 \\} 256 \\ 257 , 258 .unwind = .any, 259 .expect_panic = true, 260 .expect = switch (target.os.tag) { 261 // LLVM doesn't emit column info in the binary annotations for inlinee callees in PDBs, 262 // so the first location has only a row. 263 .windows => 264 \\panic: oh no 265 \\source.zig:6: [address] in foo 266 \\ if (b) @panic("oh no"); 267 \\ 268 \\source.zig:3:8: [address] in main 269 \\ foo(true); 270 \\ ^ 271 \\ 272 , 273 // On all other platforms, we resolve the innermost inline callee but we don't yet 274 // resolve the inline callers. 275 else => 276 \\panic: oh no 277 \\source.zig:6:12: [address] in foo 278 \\ if (b) @panic("oh no"); 279 \\ ^ 280 , 281 }, 282 .expect_strip = switch (target.os.tag) { 283 .windows => 284 \\panic: oh no 285 \\???:?:?: [address] in source.foo 286 \\???:?:?: [address] in source.main 287 \\ 288 , 289 else => 290 \\panic: oh no 291 \\???:?:?: [address] in source.foo 292 \\ 293 , 294 }, 295 }); 296 297 // Make sure all inline calls are resolved and in the right order! 298 cases.addCase(.{ 299 .params = params, 300 .target = target, 301 .name = "nested inline panic", 302 .source = 303 \\pub fn main() void { 304 \\ foo(); 305 \\} 306 \\inline fn foo() void { 307 \\ bar(); 308 \\} 309 \\inline fn bar() void { 310 \\ baz(); 311 \\} 312 \\inline fn baz() void { 313 \\ @panic("oh no"); 314 \\} 315 \\ 316 , 317 .unwind = .any, 318 .expect_panic = true, 319 // This switch serves a similar purpose as in "inline panic". 320 .expect = switch (target.os.tag) { 321 .windows => 322 \\panic: oh no 323 \\source.zig:11: [address] in baz 324 \\ @panic("oh no"); 325 \\ 326 \\source.zig:8: [address] in bar 327 \\ baz(); 328 \\ 329 \\source.zig:5: [address] in foo 330 \\ bar(); 331 \\ 332 \\source.zig:2:8: [address] in main 333 \\ foo(); 334 \\ ^ 335 \\ 336 , 337 else => 338 \\panic: oh no 339 \\source.zig:11:5: [address] in baz 340 \\ @panic("oh no"); 341 \\ ^ 342 , 343 }, 344 .expect_strip = switch (target.os.tag) { 345 .windows => 346 \\panic: oh no 347 \\???:?:?: [address] in baz 348 \\???:?:?: [address] in bar 349 \\???:?:?: [address] in foo 350 \\???:?:?: [address] in main 351 \\ 352 , 353 else => 354 \\panic: oh no 355 \\???:?:?: [address] in baz 356 \\ 357 , 358 }, 359 }); 360 } 361