authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-06-12 22:17:41+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-12 14:22:45-07:00
log52e7934a21e29b5a39fa207ef29520f58e311bb0
tree80eac8286e71526c10f4d48408d6a888557eab2a
parent1ec14988e146b185d87b09c62a1aa715a49047ab

std.dwarf: fix findCompileUnit when ranges offset is given by const


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

lib/std/dwarf.zig+1
......@@ -936,6 +936,7 @@ pub const DwarfInfo = struct {
936936 const ranges_val = compile_unit.die.getAttr(AT.ranges) orelse continue;
937937 const ranges_offset = switch (ranges_val.*) {
938938 .SecOffset => |off| off,
939 .Const => |c| try c.asUnsignedLe(),
939940 .RangeListOffset => |idx| off: {
940941 if (compile_unit.is_64) {
941942 const offset_loc = @intCast(usize, compile_unit.rnglists_base + 8 * idx);