From 5c6885be53b0e7d791f13dee32cb945b3f8f0d7d Mon Sep 17 00:00:00 2001 From: Mason Remaley Date: Mon, 6 Apr 2026 15:22:45 -0700 Subject: [PATCH] Fixes bug that would stop iterating inline site syms early This fix reveals another bug--we need to display the inline site syms in the reverse of the encoded order. The parent/child relationships are actually encoded on the inline sites, but it's likely a bit fragile to try to trace those, and also more complex. As long as there aren't multiple matches this is fine, and if there are, tracing the parent/child chain won't work anyway. --- lib/std/debug/SelfInfo/Windows.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/debug/SelfInfo/Windows.zig b/lib/std/debug/SelfInfo/Windows.zig index f75fee09d0e26daf07065d9c331f6ee25d2f4a61..260e012c1e65261dc4c8a88907108620030228d1 100644 --- a/lib/std/debug/SelfInfo/Windows.zig +++ b/lib/std/debug/SelfInfo/Windows.zig @@ -62,7 +62,8 @@ pub const SymbolIterator = struct { const pdb = if (di.pdb) |*pdb| pdb else unreachable; // Get the next inlinee if it exists - if (info.inlinees.next(info.module)) |site| { + while (info.inlinees.next(info.module)) |site| { + const parent: *align(1) const std.pdb.RecordPrefix = @ptrCast(&info.module.symbols[site.parent - @sizeOf(u16) * 2]); if (pdb.getInlineeInfo(info.module, site.inlinee) catch null) |loc| { if (info.proc_sym) |proc_sym| { const offset_in_func = info.addr - proc_sym.code_offset; -- 2.54.0