pub const Module = struct mod_info: pdb.ModInfomodule_name: []u8obj_file_name: []u8populated: boolThe fields below are filled on demand.
symbols: []u8subsect_info: []u8checksum_offset: ?usizeinlinee_source_lines: []*align(1) const pdb.InlineeSourceLineThe 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.
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44pub 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);
}
}
}