From dcbe8941df205fa8c8805b022f025e1012dede19 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 11:26:59 -0300 Subject: symbols: a library's separate debug info, when it is of the same build The system glibc stays dynamically linked and is symbolized from the debug file in the debuginfod client's cache or under /usr/lib/debug, used only when its own build id equals the mapped library's; nothing is downloaded. Static functions get names (the loader's resolver is _dl_runtime_resolve_xsavec; main_arena is found by symbol), libc's frames their file and line as the build saw them, and locals, blocks and parameter counts follow. A recording says of each module its build id and where its names came from; ztrace show prints it. Read only when an address in the module needs a name: 44 ms and 25 MB at the first one. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- src/trace/heap_test.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/trace/heap_test.zig') diff --git a/src/trace/heap_test.zig b/src/trace/heap_test.zig index aca05b0..f7919e2 100644 --- a/src/trace/heap_test.zig +++ b/src/trace/heap_test.zig @@ -68,6 +68,8 @@ fn record(arena: std.mem.Allocator, path: []const u8, argv: []const []const u8) else => {}, }; try std.testing.expectEqual(@as(usize, 5), n); + // Where the symbol main_arena is known (the C library's own, or its separate debug info's), the arena is it. + if (dbg.syms.find("main_arena")) |sym| try std.testing.expectEqual(sym.addr, dbg.heap.?.glibc.?.arena); try rec.close(); return stops; } -- cgit v1.3