Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

initEhFrameHdr

Public Function
std.debug.Dwarf.Unwind.initEhFrameHdr
pub fn initEhFrameHdr(header: EhFrameHeader, section_vaddr: u64, section_bytes_ptr: [*]const u8) Unwind

Initialize with unwind information from a header loaded from an .eh_frame_hdr section, and a pointer to the contents of the .eh_frame section.

.eh_frame_hdr may embed a binary search table of FDEs. If it does, we will use that table for PC lookups rather than spending time constructing our own search table.

Params

  • header: EhFrameHeader
  • section_vaddr: u64
  • section_bytes_ptr: [*]const u8

File

debug/Dwarf/Unwind.zig:81
81
82
83
84
85
86
87
88
89
90
91
92
93
94
pub fn initEhFrameHdr(header: EhFrameHeader, section_vaddr: u64, section_bytes_ptr: [*]const u8) Unwind {
    return .{
        .frame_section = .{
            .id = .eh_frame,
            .bytes = maxSlice(section_bytes_ptr),
            .vaddr = header.eh_frame_vaddr,
        },
        .lookup = if (header.search_table) |table| .{ .eh_frame_hdr = .{
            .vaddr = section_vaddr,
            .table = table,
        } } else null,
        .cie_list = .empty,
    };
}