authorgravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-06-25 01:58:55-04:00
committergravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-07-20 22:58:14-04:00
log84a1244b6c8d8b093d514cf267c832ad24d4400f
tree85d1e8cdf91e8c09400d6cef8e80298c53eb1a7c
parent521988299d3e87c00388207319b09eb4ebd5d443

dwarf: use eh_frame length if it's available


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

lib/std/dwarf.zig+2-1
...@@ -1593,10 +1593,11 @@ pub const DwarfInfo = struct {...@@ -1593,10 +1593,11 @@ pub const DwarfInfo = struct {
1593 var mapped_pc: usize = undefined;1593 var mapped_pc: usize = undefined;
15941594
1595 if (di.eh_frame_hdr) |header| {1595 if (di.eh_frame_hdr) |header| {
1596 const eh_frame_len = if (di.section(.eh_frame)) |eh_frame| eh_frame.len else null;
1596 mapped_pc = context.pc;1597 mapped_pc = context.pc;
1597 try header.findEntry(1598 try header.findEntry(
1598 context.isValidMemory,1599 context.isValidMemory,
1599 null, // TODO: Check di for this1600 eh_frame_len,
1600 @intFromPtr(di.section(.eh_frame_hdr).?.ptr),1601 @intFromPtr(di.section(.eh_frame_hdr).?.ptr),
1601 mapped_pc,1602 mapped_pc,
1602 &cie,1603 &cie,