Zig 0.17.0-dev (Split by item)

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 library itself.

unwindFrame

Unwind a frame using MachO compact unwind info (from __unwind_info). If the compact encoding can't encode a way to unwind a frame, it will defer unwinding to DWARF, in which case __eh_frame will be used if available.

MachO.unwindFrame
pub fn unwindFrame(si: *SelfInfo, io: Io, context: *UnwindContext) Error!usize

File

Code

pub fn unwindFrame(si: *SelfInfo, io: Io, context: *UnwindContext) Error!usize {
    return unwindFrameInner(si, io, context) catch |err| switch (err) {
        error.InvalidDebugInfo,
        error.MissingDebugInfo,
        error.UnsupportedDebugInfo,
        error.ReadFailed,
        error.OutOfMemory,
        error.Unexpected,
        error.Canceled,
        => |e| return e,

        error.UnsupportedRegister,
        error.UnsupportedAddrSize,
        error.UnimplementedUserOpcode,
        => return error.UnsupportedDebugInfo,

        error.Overflow,
        error.EndOfStream,
        error.StreamTooLong,
        error.InvalidOpcode,
        error.InvalidOperation,
        error.InvalidOperand,
        error.InvalidRegister,
        error.IncompatibleRegisterSize,
        => return error.InvalidDebugInfo,
    };
}