const Table = struct offset: u64offset from .debug_abbrev
abbrevs: []Abbrev95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113 const Table = struct {
// offset from .debug_abbrev
offset: u64,
abbrevs: []Abbrev,
fn deinit(table: *Table, gpa: Allocator) void {
for (table.abbrevs) |*abbrev| {
abbrev.deinit(gpa);
}
gpa.free(table.abbrevs);
table.* = undefined;
}
fn get(table: *const Table, abbrev_code: u64) ?*const Abbrev {
return for (table.abbrevs) |*abbrev| {
if (abbrev.code == abbrev_code) break abbrev;
} else null;
}
}