mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 20:43:19 +00:00
std.dwarf: fix findCompileUnit when ranges offset is given by const
This commit is contained in:
parent
1ec14988e1
commit
52e7934a21
@ -936,6 +936,7 @@ pub const DwarfInfo = struct {
|
||||
const ranges_val = compile_unit.die.getAttr(AT.ranges) orelse continue;
|
||||
const ranges_offset = switch (ranges_val.*) {
|
||||
.SecOffset => |off| off,
|
||||
.Const => |c| try c.asUnsignedLe(),
|
||||
.RangeListOffset => |idx| off: {
|
||||
if (compile_unit.is_64) {
|
||||
const offset_loc = @intCast(usize, compile_unit.rnglists_base + 8 * idx);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user