authorgravatar for mason@gamesbymason.comMason Remaley <mason@gamesbymason.com> 2026-04-06 15:22:45-07:00
committergravatar for mason@gamesbymason.comMason Remaley <mason@gamesbymason.com> 2026-04-12 04:01:29-07:00
log5c6885be53b0e7d791f13dee32cb945b3f8f0d7d
treee14e9928d79e8f76a13a1e066a0af2b7428ef354
parent156f54d8f0165fb772d538382a6c3248e2ee30be

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.

1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/debug/SelfInfo/Windows.zig+2-1
......@@ -62,7 +62,8 @@ pub const SymbolIterator = struct {
6262 const pdb = if (di.pdb) |*pdb| pdb else unreachable;
6363
6464 // Get the next inlinee if it exists
65 if (info.inlinees.next(info.module)) |site| {
65 while (info.inlinees.next(info.module)) |site| {
66 const parent: *align(1) const std.pdb.RecordPrefix = @ptrCast(&info.module.symbols[site.parent - @sizeOf(u16) * 2]);
6667 if (pdb.getInlineeInfo(info.module, site.inlinee) catch null) |loc| {
6768 if (info.proc_sym) |proc_sym| {
6869 const offset_in_func = info.addr - proc_sym.code_offset;