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

StackTrace

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

Fields

return_addresses: []usize

Each element is the "return address" of a function call, meaning the instruction address which control flow will return to when the function returns.

The first slice element corresponds to the innermost stack frame, and the last element to the outermost.

Inlined function calls do not have meaningful return addresses and are therefore not included in this slice. Instead, when printing the stack trace, the source locations of inline calls should be read from debug information and the corresponding "inline frames" printed in the appropriate locations.

skipped: SkippedAddresses

Indicates whether any stack frames were omitted from return_addresses.

File

debug.zig:637
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
pub const StackTrace = struct {
    /// Each element is the "return address" of a function call, meaning the instruction address
    /// which control flow will return to when the function returns.
    ///
    /// The first slice element corresponds to the innermost stack frame, and the last element to
    /// the outermost.
    ///
    /// Inlined function calls do not have meaningful return addresses and are therefore not
    /// included in this slice. Instead, when printing the stack trace, the source locations of
    /// inline calls should be read from debug information and the corresponding "inline frames"
    /// printed in the appropriate locations.
    return_addresses: []usize,
    /// Indicates whether any stack frames were omitted from `return_addresses`.
    skipped: SkippedAddresses,
}