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 standard library.
std › debug › MachOFile › loadAdjacentDsym Private Function loadAdjacentDsym Doc Source Private Function std.debug.MachOFile.loadAdjacentDsym
fn loadAdjacentDsym (
gpa : Allocator ,
io : Io ,
binary_path : []const u8 ,
arch : std .Target .Cpu .Arch ,
uuid : Uuid ,
) Error !?DsymFile Params Errors InvalidMachO InvalidDwarf MissingDebugInfo UnsupportedDebugInfo ReadFailed OutOfMemory File debug/MachOFile.zig: 386
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409 fn loadAdjacentDsym (
gpa : Allocator ,
io : Io ,
binary_path : []const u8 ,
arch : std .Target .Cpu .Arch ,
uuid : Uuid ,
) Error !?DsymFile {
const s = std .fs .path .sep_str ;
const dsym_path = try std .fmt .allocPrint (
gpa ,
"{s}.dSYM" ++ s ++ "Contents" ++ s ++ "Resources" ++ s ++ "DWARF" ++ s ++ "{s}" ,
.{ binary_path , std .fs .path .basename (binary_path ) },
);
defer gpa .free (dsym_path );
return loadDsymFile (gpa , io , dsym_path , arch , uuid ) catch |err | switch (err ) {
error .MissingDebugInfo ,
error .InvalidMachO ,
error .InvalidDwarf ,
error .UnsupportedDebugInfo ,
error .ReadFailed ,
=> null ,
error .OutOfMemory => |e | return e ,
};
}