mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
debug: correctly detect missing entries in .eh_frame_hdr
This commit is contained in:
parent
025611629f
commit
4adb7eca6a
@ -402,7 +402,7 @@ pub const ExceptionFrameHeader = struct {
|
||||
}
|
||||
}
|
||||
|
||||
if (len == 0) return bad();
|
||||
if (len == 0) return missing();
|
||||
fbr.pos = left * entry_size;
|
||||
|
||||
// Read past the pc_begin field of the entry
|
||||
@ -460,6 +460,8 @@ pub const ExceptionFrameHeader = struct {
|
||||
@sizeOf(usize),
|
||||
native_endian,
|
||||
);
|
||||
|
||||
if (pc < fde.pc_begin or pc >= fde.pc_begin + fde.pc_range) return missing();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -1633,7 +1633,7 @@ pub fn unwindFrameDwarf(
|
||||
&cie,
|
||||
&fde,
|
||||
) catch |err| switch (err) {
|
||||
error.InvalidDebugInfo => {
|
||||
error.MissingDebugInfo => {
|
||||
// `.eh_frame_hdr` appears to be incomplete, so go ahead and populate `cie_map`
|
||||
// and `fde_list`, and fall back to the binary search logic below.
|
||||
try di.scanCieFdeInfo(allocator, base_address);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user