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 Struct

StackUnwindOptions

Public Struct
std.debug.StackUnwindOptions
pub const StackUnwindOptions = struct

Fields

first_address: ?usize = null

If not null, we will ignore all frames up until this return address. This is typically used to omit intermediate handling code (for instance, a panic handler and its machinery) from stack traces.

context: ?CpuContextPtr = null

If not null, we will unwind from this cpu_context.Native instead of the current top of the stack. The main use case here is printing stack traces from signal handlers, where the kernel provides a *const cpu_context.Native of the state before the signal.

allow_unsafe_unwind: bool = false

If true, stack unwinding strategies which may cause crashes are used as a last resort. If false, only known-safe mechanisms will be attempted.

File

debug.zig:666
666
667
668
669
670
671
672
673
674
675
676
677
678
pub const StackUnwindOptions = struct {
    /// If not `null`, we will ignore all frames up until this return address. This is typically
    /// used to omit intermediate handling code (for instance, a panic handler and its machinery)
    /// from stack traces.
    first_address: ?usize = null,
    /// If not `null`, we will unwind from this `cpu_context.Native` instead of the current top of
    /// the stack. The main use case here is printing stack traces from signal handlers, where the
    /// kernel provides a `*const cpu_context.Native` of the state before the signal.
    context: ?CpuContextPtr = null,
    /// If `true`, stack unwinding strategies which may cause crashes are used as a last resort.
    /// If `false`, only known-safe mechanisms will be attempted.
    allow_unsafe_unwind: bool = false,
}