authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-11 20:07:55+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-30 13:44:53+01:00
logcedd9de64f183e4ce088654f8a9ed978cbdc8962
treec7429dc0487d54d509308472416c8e2747cd8418
parenta12ce28224f475bd97dc92bc8314ffff60fd6dd2
signaturelock-open Commit is signed but in an unrecognized format.

std.debug.Dwarf: fix names of inlined functions


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

lib/std/debug/Dwarf.zig+7-1
......@@ -348,7 +348,13 @@ pub fn deinit(di: *Dwarf, gpa: Allocator) void {
348348}
349349
350350pub fn getSymbolName(di: *Dwarf, address: u64) ?[]const u8 {
351 for (di.func_list.items) |*func| {
351 // Iterate the function list backwards so that we see child DIEs before their parents. This is
352 // important because `DW_TAG_inlined_subroutine` DIEs will have a range which is a sub-range of
353 // their caller, and we want to return the callee's name, not the caller's.
354 var i: usize = di.func_list.items.len;
355 while (i > 0) {
356 i -= 1;
357 const func = &di.func_list.items[i];
352358 if (func.pc_range) |range| {
353359 if (address >= range.start and address < range.end) {
354360 return func.name;