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

Module

Public Struct
std.debug.Pdb.Module
pub const Module = struct

Fields

mod_info: pdb.ModInfo
module_name: []u8
obj_file_name: []u8
populated: bool

The fields below are filled on demand.

symbols: []u8
subsect_info: []u8
checksum_offset: ?usize
inlinee_source_lines: []*align(1) const pdb.InlineeSourceLine

The inlinee source lines, sorted by inlinee, then file, then line number. This saves us from repeatedly doing linear searches over all inlinees. We prefer binary search over a hashmap as LLVM somtimes outputs multiple entries for a single inlinee ID, see getInlineeSourceLines for more info.

Functions

pub fn deinit(self: *Module, allocator: Allocator) void

File

debug/Pdb.zig:20
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pub const Module = struct {
    mod_info: pdb.ModInfo,
    module_name: []u8,
    obj_file_name: []u8,
    // The fields below are filled on demand.
    populated: bool,
    symbols: []u8,
    subsect_info: []u8,
    checksum_offset: ?usize,
    /// The inlinee source lines, sorted by inlinee, then file, then line number.
    /// This saves us from repeatedly doing linear searches over all inlinees.
    /// We prefer binary search over a hashmap as LLVM somtimes outputs multiple entries
    /// for a single inlinee ID, see `getInlineeSourceLines` for more info.
    inlinee_source_lines: []*align(1) const pdb.InlineeSourceLine,

    pub fn deinit(self: *Module, allocator: Allocator) void {
        allocator.free(self.module_name);
        allocator.free(self.obj_file_name);
        if (self.populated) {
            allocator.free(self.symbols);
            allocator.free(self.subsect_info);
            allocator.free(self.inlinee_source_lines);
        }
    }
}