fn getAttrRef(self: *const Die, id: u64, unit_offset: u64, unit_len: u64) !u64 self: *const Dieid: u64unit_offset: u64unit_len: u64251
252
253
254
255
256
257
258 fn getAttrRef(self: *const Die, id: u64, unit_offset: u64, unit_len: u64) !u64 {
const form_value = self.getAttr(id) orelse return error.MissingDebugInfo;
return switch (form_value.*) {
.ref => |offset| if (offset < unit_len) unit_offset + offset else bad(),
.ref_addr => |addr| addr,
else => bad(),
};
}