tools: add lldb pretty printer for std.MultiArrayList.Slice

This commit is contained in:
Jacob Young
2023-03-05 23:40:54 -05:00
committed by Andrew Kelley
parent ac1b0e832b
commit c29c4c6f70
2 changed files with 50 additions and 6 deletions

View File

@@ -68,6 +68,15 @@ pub fn MultiArrayList(comptime S: type) type {
other.deinit(gpa);
self.* = undefined;
}
/// This function is used in the debugger pretty formatters in tools/ to fetch the
/// child field order and entry type to facilitate fancy debug printing for this type.
fn dbHelper(self: *Slice, child: *S, field: *Field, entry: *Entry) void {
_ = self;
_ = child;
_ = field;
_ = entry;
}
};
const Self = @This();
@@ -463,16 +472,18 @@ pub fn MultiArrayList(comptime S: type) type {
} });
};
/// This function is used in the debugger pretty formatters in tools/ to fetch the
/// child type to facilitate fancy debug printing for this type.
fn dbHelper(self: *Self, child: *S, entry: *Entry) void {
/// child field order and entry type to facilitate fancy debug printing for this type.
fn dbHelper(self: *Self, child: *S, field: *Field, entry: *Entry) void {
_ = self;
_ = child;
_ = field;
_ = entry;
}
comptime {
if (builtin.mode == .Debug) {
_ = dbHelper;
_ = Slice.dbHelper;
}
}
};