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 Constant

Native

Public Constant
std.debug.cpu_context.Native
pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
    root.debug.CpuContext
else switch (native_arch)

Register state for the native architecture, used by std.debug for stack unwinding. noreturn if there is no implementation for the native architecture. This can be overriden by exposing a declaration root.debug.CpuContext.

File

debug/cpu_context.zig:4
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
    root.debug.CpuContext
else switch (native_arch) {
    .aarch64, .aarch64_be => Aarch64,
    .alpha => Alpha,
    .arc, .arceb => Arc,
    .arm, .armeb, .thumb, .thumbeb => Arm,
    .csky => Csky,
    .hexagon => Hexagon,
    .kvx => Kvx,
    .lanai => Lanai,
    .loongarch32, .loongarch64 => LoongArch,
    .m68k => M68k,
    .m88k => M88k,
    .mips, .mipsel, .mips64, .mips64el => Mips,
    .or1k => Or1k,
    .powerpc, .powerpcle, .powerpc64, .powerpc64le => Powerpc,
    .sparc, .sparc64 => Sparc,
    .riscv32, .riscv32be, .riscv64, .riscv64be => Riscv,
    .ve => Ve,
    .s390x => S390x,
    .x86_16 => X86_16,
    .x86 => X86,
    .x86_64 => X86_64,
    else => noreturn,
}