format
Function parameters
Parameters
- writer:*std.io.Writer
Type definitions in this namespace
Types
- StackTrace
- This data structure is used by the Zig language code generation and
- GlobalLinkage
- This data structure is used by the Zig language code generation and
- SymbolVisibility
- This data structure is used by the Zig language code generation and
- AtomicOrder
- This data structure is used by the Zig language code generation and
- ReduceOp
- This data structure is used by the Zig language code generation and
- AtomicRmwOp
- This data structure is used by the Zig language code generation and
- CodeModel
- The code model puts constraints on the location of symbols and the size of code and data.
- OptimizeMode
- This data structure is used by the Zig language code generation and
- CallingConvention
- The calling convention of a function defines how arguments and return values are passed, as well
- AddressSpace
- This data structure is used by the Zig language code generation and
- SourceLocation
- This data structure is used by the Zig language code generation and
- Type
- This data structure is used by the Zig language code generation and
- FloatMode
- This data structure is used by the Zig language code generation and
- Endian
- This data structure is used by the Zig language code generation and
- Signedness
- This data structure is used by the Zig language code generation and
- OutputMode
- This data structure is used by the Zig language code generation and
- LinkMode
- This data structure is used by the Zig language code generation and
- UnwindTables
- This data structure is used by the Zig language code generation and
- WasiExecModel
- This data structure is used by the Zig language code generation and
- CallModifier
- This data structure is used by the Zig language code generation and
- VaListAarch64
- This data structure is used by the Zig language code generation and
- VaListHexagon
- This data structure is used by the Zig language code generation and
- VaListPowerPc
- This data structure is used by the Zig language code generation and
- VaListS390x
- This data structure is used by the Zig language code generation and
- VaListX86_64
- This data structure is used by the Zig language code generation and
- VaListXtensa
- This data structure is used by the Zig language code generation and
- PrefetchOptions
- This data structure is used by the Zig language code generation and
- ExportOptions
- This data structure is used by the Zig language code generation and
- ExternOptions
- This data structure is used by the Zig language code generation and
- BranchHint
- This data structure is used by the Zig language code generation and
- CompilerBackend
- This enum is set by the compiler and communicates which compiler backend is
- TestFn
- This function type is used by the Zig language code generation and
Functions in this namespace
Functions
`explicit_subsystem` is missing when the subsystem is automatically detected,
Values
Source
Implementation
pub fn format(self: StackTrace, writer: *std.io.Writer) std.io.Writer.Error!void {
// TODO: re-evaluate whether to use format() methods at all.
// Until then, avoid an error when using GeneralPurposeAllocator with WebAssembly
// where it tries to call detectTTYConfig here.
if (builtin.os.tag == .freestanding) return;
const debug_info = std.debug.getSelfDebugInfo() catch |err| {
return writer.print("\nUnable to print stack trace: Unable to open debug info: {s}\n", .{@errorName(err)});
};
const tty_config = std.io.tty.detectConfig(std.fs.File.stderr());
try writer.writeAll("\n");
std.debug.writeStackTrace(self, writer, debug_info, tty_config) catch |err| {
try writer.print("Unable to print stack trace: {s}\n", .{@errorName(err)});
};
}